loading table of contents...

5.8. Programming Clients

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.

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]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.