Try OpenEdge Now
skip to main content
Customization Guide
Developing custom Managed Adapters : File formats
 

File formats

The following sections describe the format of the files used by the Adapter Configuration and Mapping Framework and provide examples of file formats. For information on file location and usage, refer to Interaction of the framework components.

mapping.prop

This is the adapter definition file, containing information about the Adapter Configurator, mapping data and log level.

Format

adapter-configurator=<adapter configurator class name [optional]>
map-configurator=<map configurator class name [optional]>
runtime-mapper=<runtime mapper class name>
adapter-class=<adapter class name>
AdapterCategory=<adapter category [optional]>
AdapterName=<adapter name [optional]>
log-level=<log level [optional]>
icon=<adapter icon file name [optional]>
adaplet=<true or false [optional]>
inline-enabled=<true or false [optional]>
adapter-configurator=com.savvion.sbm.adapters.email.EmailAdapterConfigurator
map-configurator=com.savvion.sbm.adapters.framework.GroupMapConfigurator
runtime-mapper=com.savvion.sbm.adapters.framework.GroupMapper
AdapterCategory=EmailAdapters
AdapterName=GenericEmailAdapter
adapter-class=com.savvion.sbm.adapters.email.EmailAdapter
log-level=10
icon=mail.png
adaplet=false

config.xml

This file contains the adapter configuration. The configuration required by the default MapConfigurator is stored in XML, but a custom implementation of a MapConfigurator may use other custom format.
This file is stored in the OEBPS_HOME\ebmsapps\<Application_Name>\maps\<WS_Name> directory, where WS_Name is the name of the workstep.
The XML file contents are:
<configform synchronous="true|false">
<block title="title" description="description" hidden="true|false">
<param name="name" access="I|O|IO|HIDDEN|PASSWORD" description="description" type="java_type" value="default_value"/>
...
</block>
...
</configform>
The schema is given below:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="configform">
<xs:complexType>
<xs:attribute name="synchronous" type="xs:string" use="optional"/>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="block">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="param"> <xs:complexType>
<xs:attribute name="name" type="xs:string"
use="required" />
<xs:attribute name="access" type="xs:string"
use="required" />
<xs:attribute name="description"
type="xs:string" use="optional" />
<xs:attribute name="type" type="xs:string"
use="optional" />
<xs:attribute name="value" type="xs:string"
use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="title" type="xs:string"
use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The interpretation of the schema elements is shown in the following table.
Table 14. Default ConfigForm format
Element
Description
<configform synchronous="true|false"> ... </configform>
[required] The root element of the adapter configuration. This parameter specifies the adapter execution mode—synchronous or asynchronous.
<block title="title" description="description" hidden="true|false">
[required] Defines a block of adapter parameters. One or more blocks can be defined in a ConfigForm. Grouping of the parameters in a block is useful for several purposes:
*Visual grouping of the parameters later in the MapConfigurator GUI.
*Defining a group of parameters as "hidden", not visible from the MapConfigurator GUI.
The "title" [required] attribute is used solely for visual purposes, to group the contained properties in a labeled block. The "description" [optional] attribute is not used in the default GUI, but may be used in extended GUI versions. The "hidden" [optional] attribute defines the visibility of all the parameters in the block. When this parameter is not specified, the value is taken as "true".
<param name="name" access="I|O|IO|HIDDEN|PASSWORD" description="description" type="java_type" value="default_value"/>
[required] Each block contains one or more adapter parameters. The parameters represent adapter inputs, outputs and configuration values. The "name" [required] attribute defines parameter's name. The "access" [required] attribute defines how the parameter is to be used:
*I – adapter input
*O – adapter output
*IO – input/output
*HIDDEN – hidden parameter (for example a configuration constant)
*PASSWORD - the same as an IO field, except that it is displayed as a password field.
The "description" [optional] attribute can be used by the MapConfigurator GUI to display short description or help message about the parameter. The "type" [optional] attribute is used by the mapper to specify the Java data type of the parameter. When this parameter is not specified, the type is assumed as "java.lang.String".The "value" [optional] attribute gives the default value of the parameter.

input.map and output.map

These two files are used to store the input and output maps for an adapter. The files are located in the <Process_Directory>\maps\<WS_Name> directory.
The information in this section is given as a reference only. Neither the Business Process Server users nor adapter developers are expected to directly manipulate the mapping files.
Adapters introduced with OpenEdge Business Process Server store the input and output map files in XML. Typically, the new tabbed map configurator (com.savvion.sbm.adapters.framework.TabbedMapConfigurator) generates XML files, while the simpler map configurators (for example, com.savvion.sbm.adapters.framework.TwoWayMapConfigurator) generate property files. The property format is now deprecated, and although it is still supported, maps in property file format will be automatically converted to XML.
The following example of the ConfigForm generates the input/output maps.

Config Form

<configform>
<block title="Adapter Data" hidden="false">
<param name="Price" access="IO" type="java.lang.Object"
value=""/>
<param name="VAT" access="I" type="java.lang.Object" value=""/>
</block>
<block title="Configuration" hidden="false">
<param name="WORKBOOK" access="IO" description="Workbook"
type="java.lang.String" value="M:\\conf\\VAT.xls"/>
<param name="WORKSHEET" access="IO" description="Default
worksheet" type="java.lang.String" value="Sheet1"/>
<param name="INPUTS" access="HIDDEN" description="Input cells
list" type="java.lang.String" value="Price=A1,VAT=B1"/>
<param name="OUTPUTS" access="HIDDEN" description="Output cells
list" type="java.lang.String" value="Price=C1"/>
</block>
</configform>

Input Mapping

Price=java.lang.Object:@AskingPrice
VAT=java.lang.Object:0.08
WORKBOOK=java.lang.String:M:\\conf\\VAT.xls
WORKSHEET=java.lang.String:Sheet1
INPUTS=java.lang.String:Price=A1,VAT=B1
OUTPUTS=java.lang.String:Price=C1

Output Mapping from the Adapter to Progress Developer Studio for OpenEdge

UpdatedPrice=java.lang.Double:@Price

XML Map format

As mentioned before, the Managed Adapters in the current release use XML files to store the mapping data. The file names and locations are the same as prior releases, but the XML content is in the following format:
*Input Map
<map version="1.1"
param name="AdapterParameterName" type="java_type"
value="value"/>
...
</map>
*Output Map
<map version="1.1"
<param name="DataslotName" type="java_type"
value="value"/>
...
</map>