Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Adapter Services | Metadata Model for Adapter Services | Adapter Service Execution
 
Adapter Service Execution
 
Interacting with the Pipeline
When a flow service, or a trigger invokes an adapter service, Designer invokes an adapter service node. The adapter service node calls the WmAdapterService.execute method. The signature is as follows:
public WmRecord execute(WmManagedConnection connection,
WmRecord input) throws ResourceException
Input Parameter
Description
connection
The WmManagedConnection object argument delivers a connection instance from the adapter service's connection node. How the adapter uses this connection object to gain access to the adapter resource is determined by the adapter's design, not by the ADK.
input
The inbound WmRecord object contains data based on the input signature as well as any other information that may be in the flow service pipeline at the time the adapter service is invoked. The execute method is responsible for interrogating the inbound WmRecord object to retrieve the data necessary for the adapter service to perform its function. The validation that the fields specified in the signature are actually present in the pipeline is not performed by Integration Server, but the data type for any field present in the pipeline is guaranteed to conform to the data type specified in the signature. The adapter service must determine whether all the required data is present, and how to respond when data elements are missing.
Output Parameter
Description
WmRecord object
When the execute method completes, the outbound WmRecord object must contain data based on the output signature defined in the metadata. This data is added to the pipeline. (An adapter service may not remove the data from the pipeline because it only works with a copy of the pipeline object, not the original pipeline object.) Once again, the adapter implementation has primary responsibility for determining what portions of the signature is populated. A run time exception might occur if a field that was not populated by the adapter service is mapped within a flow service.