OERA Business Entity Tester
Introduction
When implementing a new BusinessEntity you may have to verify that your BusinessEntity is performing correctly and data is filled into the ProDataSet of the BusinessEntity. The OERA Business Entity Tester is a tool that can perform such tests and validate the whole path from the client to the BusinessEntity without you having to build a custom Form for this purpose.
Setup
You may launch the class UltraBusinessEntityTesterForm.cls located in the folder /Consultingwerk/SmartComponents/Tools/OERABusinessEntityTester. When launching the first time a new Run Configuration is created and you may want to set this to be displayed in the favourites menu of the Run button. This can be archived by switching to the "common" tab of the Run Configuration and check the checkbox next to "Run" in the "Display in favourites menu" listbox. You can share these setting by saving this Run Configuration to a file inside your workspace and in example submit the file to a source code management system (SCM). To write the config to a file again open the Run Configuration and switch to the "common" tab. On the top of this tab you can see the GroupBox "Save as". Select then option "Shared file" and provide a valid path where the Run Configuration then gets saved. The name of the file is automatically build from then Run Configuration Name and the extension ".launch" (UltraBusinessEntityTesterForm.launch).
Using the OERA Business Entity Tester
If you want to test a BusinessEntity you have to provide a fully qualified class name of the BusinessEntity in the ComboBox (top left) and then choose the button "Get Schema". The current schema of the BusinessEntity will be shown in the TreeView on the left. Now you can select some tables to be requested from the backend by checking them in the schema tree and choose the button "GetData", which will go all the way down to the backend. It is also possible to filter the results passed back to the client on the backend. To do so you can choose the “Filter” button for every table selected to be retrieved from the backend and provide a customized query. The applied filter can be removed by using the context menu entry "Remove Filter" inside of the tree, specifying an empty filter using the filter dialog or by just deselecting the table.
Setup the OERA Business Entity Tester with a custom DataAdapter
When working in projects there is almost always the need of a custom DataAdapter implementation to be used (at least recommended). This may it be the case because the used OERA implementation is not the one provided by Consultingwerk (i.e. customers using ticEnterprise) or Consultingwerk’s SmartBusinessEntityAdapter has just been subclassed (i.e. there is a different path to be set to locate the service interface procedures inside the project workspace). To avoid the need to modify the OERA Business Entity Tester for every project we implemented a session startup parameter (Adapter=...) to be able to provide a fully qualified class name of a custom DataAdapter implementation to be used to test the BusinessEntities.
Setting Parameters
Inside the OpenEdge Architect the startup parameter can easily be set inside the "Run Configurations ..." dialog. You may find it by navigating inside the menu to Run -> Run Configurations... then choose the UltraBusinessEntityTester as the current run configuration and navigate to the tab "Startup". Here you can provide the "Session startup parameters:" as follows Adapter=a.b.c where a.b.c is the fully qualified class name of the custom DataAdapter.