Making Calls
Calls within the AgilePoint API fall into two categories – synchronous or asynchronous.
Synchronous Call
Synchronous calls are used for short transactions. In a synchronous call, a request is sent to the AgilePoint Server, the server acknowledges the request, and then acts upon it immediately.
Asynchronous Call
Synchronous calls are used for short transactions. In a synchronous call, a request is sent to the AgilePoint Server, the server acknowledges the request, and then acts upon it immediately.
Asynchronous calls are used for longer transactions. In an asynchronous call, a request is sent to the AgilePoint Server, the server acknowledges the request, but it does not immediately act upon it immediately. The server creates a WFEvent object, which contains the call's status, and returns the WFEvent object to the client. The client can call GetEvent(EventID) to retrieve the WFEvent object with the updated status. The status can be:
- Processed – The transaction was completed successfully.
- Failed – The transaction failed, and was not completed.
- Sent – The call was received, but it has not been acted upon.
Completing an asynchronous call could take any amount of time, from one second to several days. As a best practice a user interface should handle GetEvent() calls to update end users or the application itself regarding the status of asynchronous calls. You might, for example, use Ajax to check status to display on an ASP.NET page in real time.