loading table of contents...

5.4.3. Workflow

The package com.coremedia.cap.workflow of CoreMedia Studio provides classes for accessing worklists and workflow objects. A WorkflowObject represents a Task or Process in the Workflow Server. Tasks provide the method getContainingProcess() to navigate to its process. Each task and process links to a definition object by means of its getDefinition() method. Definition objects are either instances of TaskDefinition or ProcessDefinition. Each task definition indicates a TaskDefinitionType through the method getType(), for example USER or AUTOMATED.

Using the methods getTaskState() and getProcessState() the current state of a task or process can be obtained as an enumeration value.

The methods available for workflow objects and definitions correspond to the equivalent Unified API methods.

Using getProperties() on a task or process, it is possible to navigate to a secondary bean of type WorkflowObjectProperties that contains all schema-defined properties of a workflow object. When updating properties, use the inherited, generic set(property, value) method of Bean with Boolean, String, Number, User, Group, Content, or Version objects or arrays of such objects as appropriate for the individual properties. At the moment, timer are not supported. As for all remote beans, the method flush(callback) can be called to force properties to be written to the server immediately.