public class ActivitiWorkflowEngine extends BPMEngine implements WorkflowEngine
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ERR_FIND_COMPLETED_TASK_INSTS |
protected static java.lang.String |
ERR_FIRE_EVENT_NOT_SUPPORTED |
static org.alfresco.service.namespace.QName |
QNAME_INITIATOR |
| Constructor and Description |
|---|
ActivitiWorkflowEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
WorkflowInstance |
cancelWorkflow(java.lang.String workflowId)
Cancel an "in-flight" Workflow instance
|
java.util.List |
cancelWorkflows(java.util.List workflowIds)
Cancel a batch of "in-flight" Workflow instances
|
WorkflowInstance |
deleteWorkflow(java.lang.String workflowId)
Delete an "in-flight" Workflow instance
|
WorkflowDeployment |
deployDefinition(java.io.InputStream workflowDefinition,
java.lang.String mimetype)
Deploy a Workflow Definition
|
WorkflowDeployment |
deployDefinition(java.io.InputStream workflowDefinition,
java.lang.String mimetype,
java.lang.String name)
Deploy a Workflow Definition
|
WorkflowTask |
endTask(java.lang.String taskId,
java.lang.String transition)
End the Task (i.e.
|
WorkflowPath |
fireEvent(java.lang.String pathId,
java.lang.String event)
Fire custom event against specified path
|
java.util.List |
getActiveWorkflows()
Gets all "in-flight" active workflow instances.
|
java.util.List |
getActiveWorkflows(java.lang.String workflowDefinitionId)
Gets all "in-flight" active workflow instances of the specified Workflow Definition
|
java.util.List |
getAllDefinitions()
Gets all deployed Workflow Definitions (with all previous versions)
|
java.util.List |
getAllDefinitionsByName(java.lang.String workflowName)
Gets all (including previous) Workflow Definitions for the given unique name
|
java.util.List |
getAssignedTasks(java.lang.String authority,
WorkflowTaskState state)
Gets all tasks assigned to the specified authority
|
java.util.List |
getCompletedWorkflows()
Gets all completed workflow instances.
|
java.util.List |
getCompletedWorkflows(java.lang.String workflowDefinitionId)
Gets all "in-flight" completed workflow instances of the specified Workflow Definition
|
WorkflowDefinition |
getDefinitionById(java.lang.String workflowDefinitionId)
Gets a Workflow Definition by unique Id
|
WorkflowDefinition |
getDefinitionByName(java.lang.String workflowName)
Gets a Workflow Definition by unique name
|
byte[] |
getDefinitionImage(java.lang.String workflowDefinitionId)
Gets a graphical view of the Workflow Definition
|
java.util.List |
getDefinitions()
Gets all deployed Workflow Definitions
|
protected java.lang.String |
getExecutionIdFromPath(java.lang.String workflowPath) |
java.util.Map |
getPathProperties(java.lang.String pathId)
Gets the properties associated with the specified path (and parent paths)
|
java.util.List |
getPooledTasks(java.util.List authorities)
Gets the pooled tasks available to the specified authority
|
WorkflowTask |
getStartTask(java.lang.String workflowInstanceId)
Gets all active timers for the specified workflow
|
java.util.List |
getStartTasks(java.util.List workflowInstanceIds,
boolean sameSession)
Gets all start tasks for the specified workflow
|
WorkflowTask |
getTaskById(java.lang.String taskId)
Gets a Task by unique Id
|
java.util.List |
getTaskDefinitions(java.lang.String workflowDefinitionId)
Gets the Task Definitions for the given Workflow Definition
|
java.util.List |
getTasksForWorkflowPath(java.lang.String pathId)
Gets all Tasks associated with the specified path
|
java.util.List |
getTimers(java.lang.String workflowId)
Gets all active timers for the specified workflow
|
WorkflowInstance |
getWorkflowById(java.lang.String workflowId)
Gets a specific workflow instances
|
java.io.InputStream |
getWorkflowImage(java.lang.String workflowInstanceId)
Gets a graphical view of the workflow instance
|
java.util.List |
getWorkflowPaths(java.lang.String workflowId)
Gets all Paths for the specified Workflow instance
|
java.util.List |
getWorkflows()
Gets all workflow instances (both active and completed).
|
java.util.List |
getWorkflows(java.lang.String workflowDefinitionId)
Gets all "in-flight" workflow instances (both active and completed) of the specified Workflow Definition
|
java.util.List |
getWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
Gets all "in-flight" workflow instances according to the specified workflowInstanceQuery parameter
|
boolean |
hasWorkflowImage(java.lang.String workflowInstanceId)
Determines if a graphical view of the workflow instance exists
|
boolean |
isDefinitionDeployed(java.io.InputStream workflowDefinition,
java.lang.String mimetype)
Is the specified Workflow Definition already deployed?
Note: the notion of "already deployed" may differ between bpm engines.
|
java.util.List |
queryTasks(WorkflowTaskQuery query) |
java.util.List |
queryTasks(WorkflowTaskQuery query,
boolean sameSession)
Query for tasks
|
void |
setActivitiUtil(ActivitiUtil activitiUtil) |
void |
setAuthorityManager(WorkflowAuthorityManager authorityManager)
Sets the Authority DAO
/**
|
void |
setCompanyHomePath(java.lang.String companyHomePath)
Sets the Company Home Path
|
void |
setCompanyHomeStore(java.lang.String companyHomeStore)
Sets the Company Home Store
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Sets the Dictionary Service
|
void |
setFactory(WorkflowObjectFactory factory) |
void |
setMessageService(MessageService messageService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeConverter(WorkflowNodeConverter nodeConverter) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the Node Service
|
void |
setPersonService(PersonService personService)
Sets the Person Service
|
void |
setPropertyConverter(ActivitiPropertyConverter propertyConverter) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setTypeConverter(ActivitiTypeConverter typeConverter) |
void |
setUnprotectedSearchService(org.alfresco.service.cmr.search.SearchService unprotectedSearchService)
Set the unprotected search service - so we can find the node ref for
company home when folk do not have read access to company home TODO:
review use with DC
|
WorkflowPath |
signal(java.lang.String pathId,
java.lang.String transitionId)
Signal the transition from one Workflow Node to another within an "in-flight"
process.
|
WorkflowTask |
startTask(java.lang.String taskId)
Start the specified Task
Note: this is an optional task operation.
|
WorkflowPath |
startWorkflow(java.lang.String workflowDefinitionId,
java.util.Map parameters)
Start a Workflow Instance
|
WorkflowTask |
suspendTask(java.lang.String taskId)
Suspend the specified Task
|
void |
undeployDefinition(java.lang.String workflowDefinitionId)
Undeploy an exisiting Workflow Definition
TODO: Determine behaviour when "in-flight" workflow instances exist
|
WorkflowTask |
updateTask(java.lang.String taskId,
java.util.Map properties,
java.util.Map add,
java.util.Map remove)
Update the Properties and Associations of a Task
|
createGlobalId, createLocalId, getEngineId, setBPMEngineRegistry, setEngineIdprotected static final java.lang.String ERR_FIRE_EVENT_NOT_SUPPORTED
protected static final java.lang.String ERR_FIND_COMPLETED_TASK_INSTS
public static final org.alfresco.service.namespace.QName QNAME_INITIATOR
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class BPMEnginejava.lang.Exceptionpublic java.util.List cancelWorkflows(java.util.List workflowIds)
WorkflowComponentcancelWorkflows in interface WorkflowComponentworkflowIds - List of the workflow instances to cancelpublic WorkflowInstance cancelWorkflow(java.lang.String workflowId)
cancelWorkflow in interface WorkflowComponentworkflowId - the workflow instance to cancelpublic WorkflowInstance deleteWorkflow(java.lang.String workflowId)
deleteWorkflow in interface WorkflowComponentworkflowId - the workflow instance to cancelpublic WorkflowDeployment deployDefinition(java.io.InputStream workflowDefinition, java.lang.String mimetype)
deployDefinition in interface WorkflowComponentworkflowDefinition - the content object containing the definitionmimetype - (optional) the mime type of the workflow definitionpublic WorkflowDeployment deployDefinition(java.io.InputStream workflowDefinition, java.lang.String mimetype, java.lang.String name)
deployDefinition in interface WorkflowComponentworkflowDefinition - the content object containing the definitionmimetype - (optional) the mime type of the workflow definitionname - (optional) a name to represent the deploymentpublic WorkflowPath fireEvent(java.lang.String pathId, java.lang.String event)
fireEvent in interface WorkflowComponentpathId - the workflow path to fire event onevent - name of eventpublic java.util.List getActiveWorkflows()
getActiveWorkflows in interface WorkflowComponentpublic java.util.List getCompletedWorkflows()
getCompletedWorkflows in interface WorkflowComponentpublic java.util.List getWorkflows()
getWorkflows in interface WorkflowComponentpublic java.util.List getActiveWorkflows(java.lang.String workflowDefinitionId)
getActiveWorkflows in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic java.util.List getAllDefinitions()
getAllDefinitions in interface WorkflowComponentpublic java.util.List getAllDefinitionsByName(java.lang.String workflowName)
getAllDefinitionsByName in interface WorkflowComponentworkflowName - workflow name e.g. jbpm$wf:reviewpublic java.util.List getCompletedWorkflows(java.lang.String workflowDefinitionId)
getCompletedWorkflows in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic WorkflowDefinition getDefinitionById(java.lang.String workflowDefinitionId)
getDefinitionById in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic WorkflowDefinition getDefinitionByName(java.lang.String workflowName)
getDefinitionByName in interface WorkflowComponentworkflowName - workflow name e.g. jbpm$wf:reviewpublic byte[] getDefinitionImage(java.lang.String workflowDefinitionId)
getDefinitionImage in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic java.util.List getDefinitions()
getDefinitions in interface WorkflowComponentpublic java.util.Map getPathProperties(java.lang.String pathId)
getPathProperties in interface WorkflowComponentpathId - workflow path idpublic java.util.List getTaskDefinitions(java.lang.String workflowDefinitionId)
getTaskDefinitions in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic java.util.List getTasksForWorkflowPath(java.lang.String pathId)
getTasksForWorkflowPath in interface WorkflowComponentpathId - the path idprotected java.lang.String getExecutionIdFromPath(java.lang.String workflowPath)
public java.util.List getTimers(java.lang.String workflowId)
getTimers in interface WorkflowComponentpublic WorkflowInstance getWorkflowById(java.lang.String workflowId)
getWorkflowById in interface WorkflowComponentworkflowId - the id of the workflow to retrievepublic java.util.List getWorkflowPaths(java.lang.String workflowId)
getWorkflowPaths in interface WorkflowComponentworkflowId - workflow instance idpublic java.util.List getWorkflows(java.lang.String workflowDefinitionId)
getWorkflows in interface WorkflowComponentworkflowDefinitionId - the workflow definition idpublic boolean isDefinitionDeployed(java.io.InputStream workflowDefinition,
java.lang.String mimetype)
isDefinitionDeployed in interface WorkflowComponentworkflowDefinition - the definition to checkmimetype - the mimetype of the definitionpublic WorkflowPath signal(java.lang.String pathId, java.lang.String transitionId)
signal in interface WorkflowComponentpathId - the workflow path to signal onpublic WorkflowPath startWorkflow(java.lang.String workflowDefinitionId, java.util.Map parameters)
startWorkflow in interface WorkflowComponentworkflowDefinitionId - the workflow definition idparameters - the initial set of parameters used to populate the "Start Task" propertiespublic void undeployDefinition(java.lang.String workflowDefinitionId)
undeployDefinition in interface WorkflowComponentworkflowDefinitionId - the id of the definition to undeploypublic boolean hasWorkflowImage(java.lang.String workflowInstanceId)
hasWorkflowImage in interface WorkflowComponentworkflowInstanceId - the workflow instance idpublic java.io.InputStream getWorkflowImage(java.lang.String workflowInstanceId)
getWorkflowImage in interface WorkflowComponentworkflowInstanceId - the workflow instance idpublic void setPropertyConverter(ActivitiPropertyConverter propertyConverter)
propertyConverter - the propertyConverter to setpublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - public void setCompanyHomePath(java.lang.String companyHomePath)
companyHomePath - public void setCompanyHomeStore(java.lang.String companyHomeStore)
companyHomeStore - public void setUnprotectedSearchService(org.alfresco.service.cmr.search.SearchService unprotectedSearchService)
unprotectedSearchService - public void setPersonService(PersonService personService)
personService - public void setAuthorityManager(WorkflowAuthorityManager authorityManager)
authorityManager - the authorityManager to setpublic WorkflowTask endTask(java.lang.String taskId, java.lang.String transition)
endTask in interface TaskComponenttaskId - the task id to endpublic java.util.List getAssignedTasks(java.lang.String authority,
WorkflowTaskState state)
getAssignedTasks in interface TaskComponentauthority - the authoritystate - filter by specified workflow task statepublic java.util.List getPooledTasks(java.util.List authorities)
getPooledTasks in interface TaskComponentpublic WorkflowTask getTaskById(java.lang.String taskId)
getTaskById in interface TaskComponenttaskId - the task idpublic java.util.List queryTasks(WorkflowTaskQuery query, boolean sameSession)
TaskComponentqueryTasks in interface TaskComponentquery - the filter by which tasks are queriedsameSession - indicates that the returned WorkflowTask elements will be used in
the same session. If true, the returned List will be a lazy loaded list
providing greater performance.public java.util.List queryTasks(WorkflowTaskQuery query)
queryTasks in interface TaskComponentpublic java.util.List getStartTasks(java.util.List workflowInstanceIds,
boolean sameSession)
TaskComponentgetStartTasks in interface TaskComponentpublic WorkflowTask getStartTask(java.lang.String workflowInstanceId)
getStartTask in interface TaskComponentpublic WorkflowTask startTask(java.lang.String taskId)
startTask in interface TaskComponenttaskId - the task to startpublic WorkflowTask suspendTask(java.lang.String taskId)
suspendTask in interface TaskComponentpublic WorkflowTask updateTask(java.lang.String taskId, java.util.Map properties, java.util.Map add, java.util.Map remove)
updateTask in interface TaskComponenttaskId - the task id to updateproperties - the map of properties to set on the task (or null, if none to set)add - the map of items to associate with the task (or null, if none to add)remove - the map of items to dis-associate with the task (or null, if none to remove)public java.util.List getWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
WorkflowComponentgetWorkflows in interface WorkflowComponentpublic void setNodeConverter(WorkflowNodeConverter nodeConverter)
nodeConverter - the nodeConverter to setpublic void setFactory(WorkflowObjectFactory factory)
factory - the factory to setpublic void setMessageService(MessageService messageService)
messageService - the messageService to setpublic void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
tenantService - the tenantService to setpublic void setTypeConverter(ActivitiTypeConverter typeConverter)
typeConverter - the typeConverter to setpublic void setActivitiUtil(ActivitiUtil activitiUtil)
activitiUtil - the activitiUtil to setpublic void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
namespaceService - the namespaceService to setCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.