站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.1.3 API 英文版文档

TaskControllerHandler (jbpm-3.1.3) - JBoss JBPM 3.1.3 API 英文版文档


org.jbpm.taskmgmt.def
Interface TaskControllerHandler

All Superinterfaces:
java.io.Serializable

public interface TaskControllerHandler
extends java.io.Serializable


Method Summary
 void initializeTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token)
          extracts all information from the process context (optionally indirect) and initializes the task instance variables.
 void submitTaskVariables(TaskInstance taskInstance, ContextInstance contextInstance, Token token)
          is called when a task completes.
 

Method Detail

initializeTaskVariables

void initializeTaskVariables(TaskInstance taskInstance,
                             ContextInstance contextInstance,
                             Token token)
extracts all information from the process context (optionally indirect) and initializes the task instance variables.

Use VariableContainer.setVariable(String, Object) to set variables in the task instance and use ContextInstance.getVariable(String, Token) to get access to the process variables.

The task instance variable can be

  • A copy of process variable value
  • A reference to a process variable
  • Any object that can be persisted as a variable. This is usefull in case a TaskInstance variable is a function of other process instance variables.

In order to create a reference to an existing process variable, insert a VariableInstance as a value in the returned map. If the TaskInstance is to have copies of the process instance variables, just insert POJO's (non-VariableInstance classes) as values for the TaskInstance variables.


submitTaskVariables

void submitTaskVariables(TaskInstance taskInstance,
                         ContextInstance contextInstance,
                         Token token)
is called when a task completes. The task controller is given the opportunity to update the process context variables with the data that is submitted entered in the task instance.

Use VariableContainer.getVariable(String) to get variables from the task instance context and use ContextInstance.setVariable(String, Object, Token) to update the process variables.



Version : jbpm-3.1.3