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

Defining the Adapter

Before any managed adapter can be used in OpenEdge Business Process Server, the adapter should be described using the adapter metadata file. All metadata files are located in the .com.savvion.studio/adapters directory located in the Progress Developer Studio for OpenEdge workspace folder. There, the managed adapters are organized in groups, each group being a set of adapters with similar functionality.
In order to create a separate group, create a directory named DemoAdapters under <workspace>/.com.savvion.studio/adapters. DemoAdapters will be the name of the new adapter group.
Next, we should create the adapter directory for our new adapter. Under the <workspace>/.com.savvion.studio/adapters/DemoAdapters directory, create a new subdirectory named MathAdapter. This will be the adapter name. The adapter metadata files are stored in this directory.
The first file that we have to create is mapping.prop. This file defines all the basic properties of the adapter, such as run-time class, type of mapping, and log-level.
In the <workspace>/.com.savvion.studio/adapters/DemoAdapters/MathAdapter directory, create a file named mapping.prop with the content shown below (alternatively, you can copy an existing mapping.prop file from some other adapter in the managedadapters directory, and just edit the property values):
mapping.prop
adapter-class=demo.MathAdapter
adapter-configurator=
map-configurator=com.savvion.sbm.adapters.framework.GroupMapConfigurator
runtime-mapper=com.savvion.sbm.adapters.framework.GroupMapper
AdapterCategory=DemoAdapters
AdapterName=MathAdapter
log-level=10
The meaning of each property is given in the table below:
Table 16. Information on mapping.prop
Property
Description
adapter-class
The fully qualified name of the adapter class. This is the class that will be invoked by OpenEdge Business Process Server at run time.
adapter-configurator
The fully qualified name of the adapter configurator GUI class (if the adapter has a configurator). This class is invoked by Progress Developer Studio for OpenEdge, when the adapter is configured. In our case, the adapter-configurator parameter is empty, meaning that, at least at this stage, we will not have an adapter configurator GUI, but will use a static configuration file.
map-configurator
The fully qualified name of the map configurator GUI class. This class is provided by OpenEdge Business Process Server. We recommend always using the GroupMapConfigurator.
runtime-mapper
The fully qualified name of the run-time mapper class. This class is provided by OpenEdge Business Process Server. Although custom mappers can be developed, we recommend using the GroupMapper when possible.
AdapterCategory, AdapterName
These two parameters specify the adapter category and name. The values must match the directory structure where the file is located.
log-level
The current log-level. Higher numbers mean more detailed logging. For debugging purposes set this to 10; later, when the adapter is tested, the log-level could be changed to 1 (ERROR), or 2 (WARNING).