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:
![*](chapterTOC_bullet.png)
Success with output: The service succeeds, and receives an acknowledgment document and output. For example, a getBalance service returns an account balance.
![*](chapterTOC_bullet.png)
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.
![*](chapterTOC_bullet.png)
Failure: The service fails and receives a negative acknowledgment document; an AdapterException is thrown with the appropriate error message.