Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Sample Adapter | Phase 3: Adding Adapter Services | Implementing the Adapter Service Template | Implementing the execute Method in the FunctionInvocation Class
 
Implementing the execute Method in the FunctionInvocation Class
When the flow service 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 execute method uses the Sample Server client API to create a request document with the input parameters and sends it to the Sample Server. The request can receive one of three possible responses:
*Success with output: The service succeeds, and receives an acknowledgment document and output. For example, a getBalance service returns an account balance.
*Success with no output: The service succeeds, and receives an acknowledgment document, but there is no output. For example, a Deposit service simply deposits an amount, but returns no output.
*Failure: The service fails and receives a negative acknowledgment document; an AdapterException is thrown with the appropriate error message.