com.orchestranetworks.workflow
Class UserTask

java.lang.Object
  extended bycom.orchestranetworks.workflow.UserTask

public abstract class UserTask
extends Object

User task node, represents a task in which one or several human users must perform some interactions.

This abstract class must be implemented if a specific behavior is needed, either for creating work items or for completing the user task.

Life cycle

This class is state-less, it is instantiated when:

  1. The process instance control flow has advanced to a user task node: this implies that one or several work items have to be created (see method handleCreate(UserTaskCreationContext).
  2. The interaction of a work item is completed (see method handleWorkItemCompletion(UserTaskWorkItemCompletionContext)).

If the user task's state is set to error (see methods below), the administrator must fix the issue and restart the token.


Example of UserTask.

See Also:
ScriptTask, Condition

Nested Class Summary
static class UserTask.CompletionStrategy
          Defines the different strategies on work items completions.
static interface UserTask.WorkItem
          Defines the resulting state of a work item.
 
Constructor Summary
UserTask()
           
 
Method Summary
 void handleCreate(UserTaskCreationContext aContext)
          This method is automatically executed when the control flow reaches the user task, for creating and offering (or allocating) work item(s).
 void handleWorkItemCompletion(UserTaskWorkItemCompletionContext aContext)
          This method is automatically invoked when a work item is completed, in order to decide whether the whole task instance is completed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTask

public UserTask()
Method Detail

handleCreate

public void handleCreate(UserTaskCreationContext aContext)
                  throws OperationException
This method is automatically executed when the control flow reaches the user task, for creating and offering (or allocating) work item(s).

If this method has not been overridden, its default behavior is to use the properties that are specified under the "Profiles" node on the task definition. Concretely, for each specified profile under this node, a work item is created and:

Throws:
OperationException - if any problem occurs; in this case, the user task is set to an error state.

handleWorkItemCompletion

public void handleWorkItemCompletion(UserTaskWorkItemCompletionContext aContext)
                              throws OperationException
This method is automatically invoked when a work item is completed, in order to decide whether the whole task instance is completed.

If this method has not been overridden, its default behavior is to use the properties that are specified under the "Termination" node on the task definition Concretely:

  1. Based on the "Completion Strategy" property, either the task is considered as completed or it waits until another work item completes. This corresponds to the invocation of the method UserTaskWorkItemCompletionContext.checkAllWorkItemMatchStrategy().
  2. If the number of rejected work items is above the "Rejection Threshold" property, it throws an OperationException (the user task is set to set to an error state).

Overriding this method gives the opportunity to write specific values to the process instance context or to refine the completion/rejection criteria.

Throws:
OperationException - if any problem occurs or user task is rejected; in this case, the user task is set to an error state.


(report a bug)
EBX.Platform 4.8.4 [0722]
Copyright Orchestra Networks 2000-2010. All rights reserved.