Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Adapter Services | The Metadata Model for Adapter Services | Adapter Service Execution
 
Adapter Service Execution
 
Interacting with the Pipeline
When a flow service, trigger, Designer invokes an adapter service node, the service calls the WmAdapterService.execute method. This method receives a WmManagedConnection object and a WmRecord object, and it is expected to return a WmRecord object.
The connection 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.
The inbound WmRecord object will contain 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 data necessary for the adapter service to perform its function. The server will not validate that the fields specified in the signature are actually present in the pipeline, 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 required data is present, and how to respond when data elements are missing.
When the execute method completes, the outbound WmRecord object should contain data based on the output signature defined in the metadata. This data will be added to the pipeline. (An adapter service may not remove 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 will be populated. A run time exception might occur if a field that was not populated by the adapter service is mapped within a flow service.