The CoreMedia Workflow comes with a workflow client integrated in the Site Manager. If 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:44441/coremedia/ior" + "?useworkflow=true", "admin", "admin"); try { WorklistRepository r = connection.getWorkflowRepository(); // ... work on the repository ... } finally { connection.close(); }
Example 5.14. 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:
|