Try OpenEdge Now
skip to main content
Customization Guide
Developing custom Managed Adapters : The Demo Adapter

The Demo Adapter

In this tutorial we will develop a simple adapter that, given two numbers, can perform one of the four basic arithmetic operations – addition, subtraction, multiplication, or division – and return the result. Optionally, the adapter can round the result to the nearest integer number. Which arithmetic operation will be used, and whether the result should be rounded or not, are parameters that can be configured on a per-workstep basis.
The following diagram illustrates the adapter functionality:
Figure 10. The Demo Adapter
As shown above, "X" and "Y" are the two inputs, that are usually mapped to Business Process Server dataslots. The "OPERATION" and "ROUNDING" are configuration parameters. Together, all inputs determine the value of the "RESULT" output parameter.