org.jbpm.api.task
Class TaskHandler

java.lang.Object
  extended by org.jbpm.api.task.TaskHandler

public class TaskHandler
extends java.lang.Object

for advanced task customization. The default implementation can be found in DefaultTaskHandler.

Author:
Tom Baeyens

Constructor Summary
TaskHandler()
           
 
Method Summary
 boolean executionCreateTask(OpenTask task)
          called after the task is created according to the task definition.
 void executionSignal(OpenTask task)
          called when the related execution gets a signal.
 void taskAssign(OpenTask task, java.lang.String userId)
          called when the given task is assigned to an actor.
 void taskCancel(OpenTask task, java.lang.String reason)
          called when the given task is cancelled.
 void taskComplete(OpenTask task, java.lang.String outcome)
          called when the given task completes.
 void taskSubTaskComplete(OpenTask task, OpenTask subTask, java.lang.String outcome)
          is called when a subtask completes.
 void taskVariableUpdate(OpenTask task, java.lang.String key, java.lang.Object value)
          is called when a variable is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskHandler

public TaskHandler()
Method Detail

executionCreateTask

public boolean executionCreateTask(OpenTask task)
called after the task is created according to the task definition. This method allows to create subtasks.

Returns:
indicates if the process execution should wait.

executionSignal

public void executionSignal(OpenTask task)
called when the related execution gets a signal. this method must either remove signalling from this task or cancel it.


taskAssign

public void taskAssign(OpenTask task,
                       java.lang.String userId)
called when the given task is assigned to an actor.


taskCancel

public void taskCancel(OpenTask task,
                       java.lang.String reason)
called when the given task is cancelled.


taskComplete

public void taskComplete(OpenTask task,
                         java.lang.String outcome)
called when the given task completes. The default behaviour will send a signal to the execution if this task is still signalling.


taskSubTaskComplete

public void taskSubTaskComplete(OpenTask task,
                                OpenTask subTask,
                                java.lang.String outcome)
is called when a subtask completes. this can be used to prematurely signal the execution. e.g. for "5 out of 7" scenarios.


taskVariableUpdate

public void taskVariableUpdate(OpenTask task,
                               java.lang.String key,
                               java.lang.Object value)
is called when a variable is updated. This can be used to propagate the execution based on availability of variables.



Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.