Workflow Manual / Version 2406.0
Table Of ContentsIf you want to implement your own client, for example to trigger external events into the workflows or the query workflow state for reports etc, the Unified API provides the WorkflowRepository. In order to create a workflow client, use a code like the following:
CapConnection connection = Cap.connect("http://localhost:40180/ior" + "?useworkflow=true", "admin", "admin"); try { WorklistRepository r = connection.getWorkflowRepository(); // ... work on the repository ... } finally { connection.close(); }
Example 5.11. Create a workflow client
Remote action handlers
A remote action handler is responsible for executing a user tasks client actions on behalf of the clients user.
Handlers must implement the interface RemoteActionHandler.
A handler receives the command and parameters to process.
It has to return an ActionResult.
A client action is the result of one of the following client calls to the server:
Task.accept()
Task.complete()
Task.retry()
The client call is blocked at least until all client actions have been handled.
Note
Never implement client actions requiring any user interaction by a remote action handler:
They will block server transactions for an undefined time and will eventually time out.
They won't work in a synchronous client.