Try OpenEdge Now
skip to main content
Customization Guide
Developing custom Managed Adapters : Testing and using the Adapter
 

Testing and using the Adapter

After compiling and making the classes available to OpenEdge Business Process Server, you can test the adapter. Create a BP Server application that uses the adapter. In the Properties dialog window for the Adapter workstep, select the Fields tab and click the Custom dataslot mapping... button. Define the input and output dataslot mapping, then save, publish, and run the application to confirm that you are getting the expected results.
If you try to start the adapter configurator, an error message should appear, telling you that the adapter does not have a pluggable configurator. This is expected behavior, because we do not have a custom configurator GUI for the Math adapter.
Since we do not have a custom configurator GUI, the only way to change the adapter configuration (the "OPERATION" and "ROUNDING" parameters) is to edit the config.xml file directly.
Optional Approaches
If you do not want to define custom adapter configurator, there are two more ways to avoid editing the config.xml file:
The first option is to change the "access" attribute of the configuration parameters in the config.xml file from "HIDDEN" to "I" (see the sample config.xml). Make the block where these parameters are located visible by changing the "hidden" attribute to false. This will enable the Map Configurator to show the configuration parameters in a separate tab. The users of your adapter (the designers of OpenEdge Business Process Server applications) will then be able see and change the default values of these parameters in the map configurator GUI provided by the adapter framework.
Another option is to have several preconfigured instances of your adapter. For example, you can have four separate configurations of the Math adapter, each performing one of the basic arithmetic operations. To do this, make four copies of the MathAdapter directory under the OEBPS_HOME/managedadapters/Demo directory (for example, "MathAdd", "MathSub", "MathMul", and "MathDiv"). Modify the mapping.prop file in each directory to match the adapter name (the name will be "MathAdd" in the "MathAdd" directory, and so on). Modify the config.xml files for each adapter instance in the way you want. When a user (OpenEdge Business Process Server application developer) chooses one of these preconfigured adapters, the appropriate configuration file will be used in the workstep.
When testing the adapter, look for errors and log-messages in the adapter log file, OEBPS_HOME/ebmsapps/<application>/logs/<workstep>.log, on the server. You can change the log-level in mapping.prop file by opening the Workstep Properties dialog and clicking the "Advanced properties..." button in the Configuration tab, and republishing the OpenEdge Business Process Server application. Log-levels 11 and 12 will dump a lot of debug information from the Managed Adapter framework, including a full configuration dump and a complete list of what is passed to and retrieved from the adapter.