org.jbpm.api
Interface ExecutionService


public interface ExecutionService

manages runtime process executions.

Author:
Tom Baeyens

Method Summary
 ProcessInstanceQuery createProcessInstanceQuery()
          search for process instances with criteria
 void deleteProcessInstance(java.lang.String processInstanceId)
          delete a process instance.
 void deleteProcessInstanceCascade(java.lang.String processInstanceId)
          delete a process instance, including the history information.
 void endProcessInstance(java.lang.String processInstanceId, java.lang.String state)
          end a process instance
 Execution findExecutionById(java.lang.String executionId)
          the path of execution that is uniquely defined by the execution id.
 ProcessInstance findProcessInstanceById(java.lang.String processInstanceId)
          the process instance that is uniquely defined by the process execution id.
 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 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,?> variables)
          creates or overwrites the variable values on the referenced execution
 ProcessInstance signalExecutionById(java.lang.String executionId)
          provides an external trigger to an execution.
 ProcessInstance signalExecutionById(java.lang.String executionId, java.util.Map<java.lang.String,?> parameters)
          provides a external trigger to an execution with parameters.
 ProcessInstance signalExecutionById(java.lang.String executionId, java.lang.String signalName)
          provides a named external trigger to an execution.
 ProcessInstance signalExecutionById(java.lang.String executionId, java.lang.String signalName, java.util.Map<java.lang.String,?> parameters)
          provides a named external trigger to an execution with parameters.
 ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 ProcessInstance 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.
 ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables, java.lang.String processInstanceKey)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.lang.String processInstanceKey)
          starts a new process instance for the ProcessDefinition with the given processDefinitionDbid.
 ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey)
          starts a new process instance in the latest version of the given process definition.
 ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,?> variables)
          starts a new process instance in the latest version of the given processDefinitionName.
 ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.util.Map<java.lang.String,?> variables, java.lang.String processInstanceKey)
          starts a new process instance in the latest version of the given processDefinitionName.
 ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey, java.lang.String processInstanceKey)
          starts a new process instance in the latest version of the given processDefinitionName.
 

Method Detail

startProcessInstanceById

ProcessInstance 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

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

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

startProcessInstanceById

ProcessInstance 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

ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId,
                                         java.util.Map<java.lang.String,java.lang.Object> variables,
                                         java.lang.String processInstanceKey)
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.
processInstanceKey - is a user provided reference for the new process instance that must be unique over all process versions with the same name.

startProcessInstanceByKey

ProcessInstance 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

ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                          java.lang.String processInstanceKey)
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.
processInstanceKey - is a user provided reference for the new process instance that must be unique over all process versions with the same name.

startProcessInstanceByKey

ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                          java.util.Map<java.lang.String,?> 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

ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey,
                                          java.util.Map<java.lang.String,?> variables,
                                          java.lang.String processInstanceKey)
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.
processInstanceKey - is a user provided reference for the new execution that must be unique over all process versions with the same name.

findExecutionById

Execution findExecutionById(java.lang.String executionId)
the path of execution that is uniquely defined by the execution id.


findProcessInstanceById

ProcessInstance findProcessInstanceById(java.lang.String processInstanceId)
the process instance that is uniquely defined by the process execution id.


signalExecutionById

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


signalExecutionById

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


signalExecutionById

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


signalExecutionById

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


createProcessInstanceQuery

ProcessInstanceQuery 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,?> 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. The history information will still be in the database.


deleteProcessInstanceCascade

void deleteProcessInstanceCascade(java.lang.String processInstanceId)
delete a process instance, including the history information.



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