org.activiti
Interface ProcessService


public interface ProcessService

provides access to Deployments, ProcessDefinitions and ProcessInstances.

Author:
Tom Baeyens, Joram Barrez

Method Summary
 DeploymentBuilder createDeployment()
          starts creating a new deployment
 ProcessInstanceQuery createProcessInstanceQuery()
          creates a new ProcessInstanceQuery instance, that can be used to dynamically query the process instances.
 void deleteDeployment(java.lang.String deploymentId)
          deletes the given deployment and fails if there are still process instances or jobs for this deployment.
 void deleteDeploymentCascade(java.lang.String deploymentId)
          deletes the given deployment and cascade deletion to process instances and jobs
 void deleteProcessInstance(java.lang.String processInstanceId)
          delete an existing runtime process instance
 java.util.List<java.lang.String> findDeploymentResources(java.lang.String deploymentId)
          retrieves a list of deployment resources for the given deployment, ordered alphabetically.
 java.util.List<Deployment> findDeployments()
          lists all deployments, ordered by deployment date (ascending).
 java.util.List<Deployment> findDeploymentsByName(java.lang.String name)
          lists all deployments by name, ordered by deployment date (ascending).
 Execution findExecutionById(java.lang.String executionId)
          gets the details of an execution
 Execution findExecutionInActivity(java.lang.String processInstanceId, java.lang.String activityId)
          returns the execution that currently is waiting at the given activityId, or null if none exists.
 ProcessDefinition findProcessDefinitionById(java.lang.String processDefinitionId)
          returns the ProcessDefinition with the given id, or null if none is found.
 java.util.List<ProcessDefinition> findProcessDefinitions()
          lists all versions of all process definitions ordered by key (asc) and version (desc).
 ProcessInstance findProcessInstanceById(java.lang.String processInstanceId)
          gets the details of a process instance
 java.io.InputStream getDeploymentResourceContent(java.lang.String deploymentId, java.lang.String resourceName)
          gives access to a deployment resource through a stream of bytes.
 java.lang.Object getStartFormById(java.lang.String processDefinitionId)
          get a rendered startform, for collecting parameters from a user to start a new process instance
 java.lang.Object getStartFormByKey(java.lang.String processDefinitionKey)
          get a rendered startform, for collecting parameters from a user to start a new process instance
 java.lang.Object getVariable(java.lang.String executionId, java.lang.String variableName)
          retrieve a specific variable from an execution
 java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId)
          variables for the given execution.
 void sendEvent(java.lang.String executionId)
          sends an external trigger to an execution that is waiting.
 void sendEvent(java.lang.String executionId, java.lang.Object eventData)
          sends an external trigger to an execution that is waiting.
 void setVariable(java.lang.String executionId, java.lang.String variableName, java.lang.Object value)
          update or create a variable
 void setVariables(java.lang.String executionId, java.util.Map<java.lang.String,java.lang.Object> variables)
          update or create given variables
 ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId)
          starts a new process instance in the exactly specified version of the process definition with the given id
 ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)
          starts a new process instance in the exactly specified version of the process definition with the given id
 ProcessInstance startProcessInstanceByKey(java.lang.String processDefinitionKey)
          starts a new process instance in the latest version of the process definition with the given key
 ProcessInstance 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 process definition with the given key
 

Method Detail

createDeployment

DeploymentBuilder createDeployment()
starts creating a new deployment


deleteDeployment

void deleteDeployment(java.lang.String deploymentId)
deletes the given deployment and fails if there are still process instances or jobs for this deployment.

Throws:
ActivitiException - if there are still process instances or jobs related to this deployment.

deleteDeploymentCascade

void deleteDeploymentCascade(java.lang.String deploymentId)
deletes the given deployment and cascade deletion to process instances and jobs


getStartFormByKey

java.lang.Object getStartFormByKey(java.lang.String processDefinitionKey)
get a rendered startform, for collecting parameters from a user to start a new process instance


getStartFormById

java.lang.Object getStartFormById(java.lang.String processDefinitionId)
get a rendered startform, for collecting parameters from a user to start a new process instance


startProcessInstanceByKey

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


startProcessInstanceByKey

ProcessInstance 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 process definition with the given key


startProcessInstanceById

ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId)
starts a new process instance in the exactly specified version of the process definition with the given id


startProcessInstanceById

ProcessInstance startProcessInstanceById(java.lang.String processDefinitionId,
                                         java.util.Map<java.lang.String,java.lang.Object> variables)
starts a new process instance in the exactly specified version of the process definition with the given id


deleteProcessInstance

void deleteProcessInstance(java.lang.String processInstanceId)
delete an existing runtime process instance


findProcessInstanceById

ProcessInstance findProcessInstanceById(java.lang.String processInstanceId)
gets the details of a process instance

Returns:
the process instance or null if no process instance could be found with the given id.

createProcessInstanceQuery

ProcessInstanceQuery createProcessInstanceQuery()
creates a new ProcessInstanceQuery instance, that can be used to dynamically query the process instances.


findExecutionById

Execution findExecutionById(java.lang.String executionId)
gets the details of an execution

Returns:
the execution or null if no execution could be found with the given id.

findExecutionInActivity

Execution findExecutionInActivity(java.lang.String processInstanceId,
                                  java.lang.String activityId)
returns the execution that currently is waiting at the given activityId, or null if none exists.


sendEvent

void sendEvent(java.lang.String executionId)
sends an external trigger to an execution that is waiting.


sendEvent

void sendEvent(java.lang.String executionId,
               java.lang.Object eventData)
sends an external trigger to an execution that is waiting.


getVariables

java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String executionId)
variables for the given execution.


getVariable

java.lang.Object getVariable(java.lang.String executionId,
                             java.lang.String variableName)
retrieve a specific variable from an execution


setVariable

void setVariable(java.lang.String executionId,
                 java.lang.String variableName,
                 java.lang.Object value)
update or create a variable


setVariables

void setVariables(java.lang.String executionId,
                  java.util.Map<java.lang.String,java.lang.Object> variables)
update or create given variables


findProcessDefinitions

java.util.List<ProcessDefinition> findProcessDefinitions()
lists all versions of all process definitions ordered by key (asc) and version (desc).


findProcessDefinitionById

ProcessDefinition findProcessDefinitionById(java.lang.String processDefinitionId)
returns the ProcessDefinition with the given id, or null if none is found.


findDeployments

java.util.List<Deployment> findDeployments()
lists all deployments, ordered by deployment date (ascending). Note that it is impossible to retrieve the deployment resources through the results of this operation, since that would cause a huge transfer of (possibly) unneeded bytes over the wire. To retrieve the actual bytes of a deployment resource use the operations findDeploymentResources and getDeploymentResource.


findDeploymentsByName

java.util.List<Deployment> findDeploymentsByName(java.lang.String name)
lists all deployments by name, ordered by deployment date (ascending). To retrieve the actual bytes of a deployment resource use the operations findDeploymentResources and getDeploymentResource.


findDeploymentResources

java.util.List<java.lang.String> findDeploymentResources(java.lang.String deploymentId)
retrieves a list of deployment resources for the given deployment, ordered alphabetically.


getDeploymentResourceContent

java.io.InputStream getDeploymentResourceContent(java.lang.String deploymentId,
                                                 java.lang.String resourceName)
gives access to a deployment resource through a stream of bytes.



Copyright © 2010 Alfresco. All Rights Reserved.