org.jbpm
Interface ExecutionService


public interface ExecutionService

manages runtime process executions.

Author:
Tom Baeyens

Method Summary
 ExecutionQuery createExecutionQuery()
          search for executions with criteria
 ExecutionQuery createProcessInstanceQuery()
          search for process instances with criteria
 void deleteProcessInstance(java.lang.String processInstanceId)
          delete a process instance
 void endProcessInstance(java.lang.String processInstanceId, java.lang.String state)
          end a process instance
 Execution findExecution(java.lang.String executionId)
          the execution that is uniquely defined by the process definition and the business key.
 Execution findExecution(java.lang.String processDefinitionName, java.lang.String executionKey)
          the execution that is uniquely defined by the process definition and the business key.
 java.util.List<Execution> findExecutions(java.lang.String executionId)
          this method returns this execution and all its child executions recursively.
 java.lang.Object getVariable(java.lang.String executionId, java.lang.String variableName)
          retrieves a variable
 java.util.Set<java.lang.String> getVariableNames(java.lang.String executionId)
          all the variables visible in the given execution scope
 java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId, java.util.Set<java.lang.String> variableNames)
          retrieves a map of variables
 void setConnection(java.sql.Connection connection)
          provide a JDBC connection that will be used in the next method invocation on this service by this thread.
 void setUserId(java.lang.String userId)
          provide a userId that will be used in the next method invocation on this service by this thread.
 void setVariable(java.lang.String executionId, java.lang.String name, java.lang.Object value)
          creates or overwrites a variable value on the referenced execution
 void setVariables(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> variables)
          creates or overwrites the variable values on the referenced execution
 Execution signalExecutionById(java.lang.String executionId)
          provides an external trigger to an execution.
 Execution signalExecutionById(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> parameters)
          provides a external trigger to an execution with parameters.
 Execution signalExecutionById(java.lang.String executionId, java.lang.String signalName)
          provides a named external trigger to an execution.
 Execution signalExecutionById(java.lang.String executionId, java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          provides a named external trigger to an execution with parameters.
 Execution signalExecutionByKey(java.lang.String processDefinitionKey, java.lang.String executionKey)
          provides a named external trigger to an execution.
 Execution signalExecutionByKey(java.lang.String processDefinitionKey, java.lang.String executionKey, java.util.Map<java.lang.String,java.lang.Object> parameters)
          provides a named external trigger to an execution with parameters.
 Execution signalExecutionByKey(java.lang.String processDefinitionKey, java.lang.String executionKey, java.lang.String signalName)
          provides a named external trigger to an execution.
 Execution signalExecutionByKey(java.lang.String processDefinitionKey, java.lang.String executionKey, java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          provides a named external trigger to an execution with parameters.
 Execution startProcessInstanceById(java.lang.String processDefinitionId)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 Execution startProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 Execution startProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String executionKey)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 Execution startProcessInstanceById(java.lang.String processDefinitionId, java.lang.String executionKey)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 Execution startProcessInstanceByKey(java.lang.String processDefinitionKey)
          starts a new process instance in the latest version of the given process definition.
 Execution startProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables)
          starts a new process instance in the latest version of the given processDefinitionName.
 Execution startProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String executionKey)
          starts a new process instance in the latest version of the given processDefinitionName.
 Execution startProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String executionKey)
          starts a new process instance in the latest version of the given processDefinitionName.
 

Method Detail

startProcessInstanceById

Execution startProcessInstanceById(java.lang.String processDefinitionId)
starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.

Parameters:
processDefinitionId - the unique id of the process definition.

startProcessInstanceById

Execution startProcessInstanceById(java.lang.String processDefinitionId,
                                   java.lang.String executionKey)
starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.

Parameters:
processDefinitionId - the unique id of the process definition.
executionKey - is a user provided reference for the new execution that must be unique over all process versions with the same name.

startProcessInstanceById

Execution startProcessInstanceById(java.lang.String processDefinitionId,
                                   java.util.Map<java.lang.String,java.lang.Object> variables)
starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.

Parameters:
processDefinitionId - the unique id of the process definition.
variables - are the initial values of the process variables that will be set before the execution starts.

startProcessInstanceById

Execution startProcessInstanceById(java.lang.String processDefinitionId,
                                   java.util.Map<java.lang.String,java.lang.Object> variables,
                                   java.lang.String executionKey)
starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.

Parameters:
processDefinitionId - the unique id of the process definition.
variables - are the initial values of the process variables that will be set before the execution starts.
executionKey - is a user provided reference for the new execution that must be unique over all process versions with the same name.

startProcessInstanceByKey

Execution startProcessInstanceByKey(java.lang.String processDefinitionKey)
starts a new process instance in the latest version of the given process definition.

Parameters:
processDefinitionKey - is the key of the process definition for which the latest version will be taken.

startProcessInstanceByKey

Execution startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                    java.lang.String executionKey)
starts a new process instance in the latest version of the given processDefinitionName.

Parameters:
processDefinitionKey - is the key of the process definition for which the latest version will be taken.
executionKey - is a user provided reference for the new execution that must be unique over all process versions with the same name.

startProcessInstanceByKey

Execution startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                    java.util.Map<java.lang.String,java.lang.Object> variables)
starts a new process instance in the latest version of the given processDefinitionName.

Parameters:
processDefinitionKey - is the key of the process definition for which the latest version will be taken.
variables - are the initial values of the process variables that will be set before the execution starts (read: before the initial activity is executed).

startProcessInstanceByKey

Execution startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                    java.util.Map<java.lang.String,java.lang.Object> variables,
                                    java.lang.String executionKey)
starts a new process instance in the latest version of the given processDefinitionName.

Parameters:
processDefinitionKey - is the key of the process definition for which the latest version will be taken.
variables - are the initial values of the process variables that will be set before the execution starts.
executionKey - is a user provided reference for the new execution that must be unique over all process versions with the same name.

findExecution

Execution findExecution(java.lang.String processDefinitionName,
                        java.lang.String executionKey)
the execution that is uniquely defined by the process definition and the business key.


findExecution

Execution findExecution(java.lang.String executionId)
the execution that is uniquely defined by the process definition and the business key.


findExecutions

java.util.List<Execution> findExecutions(java.lang.String executionId)
this method returns this execution and all its child executions recursively.


signalExecutionById

Execution signalExecutionById(java.lang.String executionId)
provides an external trigger to an execution.


signalExecutionById

Execution signalExecutionById(java.lang.String executionId,
                              java.lang.String signalName)
provides a named external trigger to an execution.


signalExecutionById

Execution signalExecutionById(java.lang.String executionId,
                              java.lang.String signalName,
                              java.util.Map<java.lang.String,java.lang.Object> parameters)
provides a named external trigger to an execution with parameters.


signalExecutionById

Execution signalExecutionById(java.lang.String executionId,
                              java.util.Map<java.lang.String,java.lang.Object> parameters)
provides a external trigger to an execution with parameters.


signalExecutionByKey

Execution signalExecutionByKey(java.lang.String processDefinitionKey,
                               java.lang.String executionKey)
provides a named external trigger to an execution.


signalExecutionByKey

Execution signalExecutionByKey(java.lang.String processDefinitionKey,
                               java.lang.String executionKey,
                               java.lang.String signalName)
provides a named external trigger to an execution.


signalExecutionByKey

Execution signalExecutionByKey(java.lang.String processDefinitionKey,
                               java.lang.String executionKey,
                               java.util.Map<java.lang.String,java.lang.Object> parameters)
provides a named external trigger to an execution with parameters.


signalExecutionByKey

Execution signalExecutionByKey(java.lang.String processDefinitionKey,
                               java.lang.String executionKey,
                               java.lang.String signalName,
                               java.util.Map<java.lang.String,java.lang.Object> parameters)
provides a named external trigger to an execution with parameters.


createExecutionQuery

ExecutionQuery createExecutionQuery()
search for executions with criteria


createProcessInstanceQuery

ExecutionQuery createProcessInstanceQuery()
search for process instances with criteria


setVariable

void setVariable(java.lang.String executionId,
                 java.lang.String name,
                 java.lang.Object value)
creates or overwrites a variable value on the referenced execution


setVariables

void setVariables(java.lang.String executionId,
                  java.util.Map<java.lang.String,java.lang.Object> variables)
creates or overwrites the variable values on the referenced execution


getVariable

java.lang.Object getVariable(java.lang.String executionId,
                             java.lang.String variableName)
retrieves a variable


getVariableNames

java.util.Set<java.lang.String> getVariableNames(java.lang.String executionId)
all the variables visible in the given execution scope


getVariables

java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId,
                                                              java.util.Set<java.lang.String> variableNames)
retrieves a map of variables


endProcessInstance

void endProcessInstance(java.lang.String processInstanceId,
                        java.lang.String state)
end a process instance


deleteProcessInstance

void deleteProcessInstance(java.lang.String processInstanceId)
delete a process instance


setUserId

void setUserId(java.lang.String userId)
provide a userId that will be used in the next method invocation on this service by this thread.


setConnection

void setConnection(java.sql.Connection connection)
provide a JDBC connection that will be used in the next method invocation on this service by this thread.



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