|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.workflow.BPMEngine
org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine
public class ActivitiWorkflowEngine
Field Summary | |
---|---|
protected static java.lang.String |
ERR_FIND_COMPLETED_TASK_INSTS
|
protected static java.lang.String |
ERR_FIRE_EVENT_NOT_SUPPORTED
|
Constructor Summary | |
---|---|
ActivitiWorkflowEngine()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
WorkflowInstance |
cancelWorkflow(java.lang.String workflowId)
Cancel an "in-flight" Workflow instance |
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 |
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 |
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)
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 |
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 |
Methods inherited from class org.alfresco.repo.workflow.BPMEngine |
---|
createGlobalId, createLocalId, getEngineId, setBPMEngineRegistry, setEngineId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ERR_FIRE_EVENT_NOT_SUPPORTED
protected static final java.lang.String ERR_FIND_COMPLETED_TASK_INSTS
Constructor Detail |
---|
public ActivitiWorkflowEngine()
Method Detail |
---|
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class BPMEngine
java.lang.Exception
public WorkflowInstance cancelWorkflow(java.lang.String workflowId)
cancelWorkflow
in interface WorkflowComponent
workflowId
- the workflow instance to cancel
public WorkflowInstance deleteWorkflow(java.lang.String workflowId)
deleteWorkflow
in interface WorkflowComponent
workflowId
- the workflow instance to cancel
public WorkflowDeployment deployDefinition(java.io.InputStream workflowDefinition, java.lang.String mimetype)
deployDefinition
in interface WorkflowComponent
workflowDefinition
- the content object containing the definitionmimetype
- (optional) the mime type of the workflow definition
public WorkflowDeployment deployDefinition(java.io.InputStream workflowDefinition, java.lang.String mimetype, java.lang.String name)
deployDefinition
in interface WorkflowComponent
workflowDefinition
- the content object containing the definitionmimetype
- (optional) the mime type of the workflow definitionname
- (optional) a name to represent the deployment
public WorkflowPath fireEvent(java.lang.String pathId, java.lang.String event)
fireEvent
in interface WorkflowComponent
pathId
- the workflow path to fire event onevent
- name of event
public java.util.List getActiveWorkflows()
getActiveWorkflows
in interface WorkflowComponent
public java.util.List getCompletedWorkflows()
getCompletedWorkflows
in interface WorkflowComponent
public java.util.List getWorkflows()
getWorkflows
in interface WorkflowComponent
public java.util.List getActiveWorkflows(java.lang.String workflowDefinitionId)
getActiveWorkflows
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public java.util.List getAllDefinitions()
getAllDefinitions
in interface WorkflowComponent
public java.util.List getAllDefinitionsByName(java.lang.String workflowName)
getAllDefinitionsByName
in interface WorkflowComponent
workflowName
- workflow name e.g. jbpm$wf:review
public java.util.List getCompletedWorkflows(java.lang.String workflowDefinitionId)
getCompletedWorkflows
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public WorkflowDefinition getDefinitionById(java.lang.String workflowDefinitionId)
getDefinitionById
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public WorkflowDefinition getDefinitionByName(java.lang.String workflowName)
getDefinitionByName
in interface WorkflowComponent
workflowName
- workflow name e.g. jbpm$wf:review
public byte[] getDefinitionImage(java.lang.String workflowDefinitionId)
getDefinitionImage
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public java.util.List getDefinitions()
getDefinitions
in interface WorkflowComponent
public java.util.Map getPathProperties(java.lang.String pathId)
getPathProperties
in interface WorkflowComponent
pathId
- workflow path id
public java.util.List getTaskDefinitions(java.lang.String workflowDefinitionId)
getTaskDefinitions
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public java.util.List getTasksForWorkflowPath(java.lang.String pathId)
getTasksForWorkflowPath
in interface WorkflowComponent
pathId
- the path id
protected java.lang.String getExecutionIdFromPath(java.lang.String workflowPath)
public java.util.List getTimers(java.lang.String workflowId)
getTimers
in interface WorkflowComponent
public WorkflowInstance getWorkflowById(java.lang.String workflowId)
getWorkflowById
in interface WorkflowComponent
workflowId
- the id of the workflow to retrieve
public java.util.List getWorkflowPaths(java.lang.String workflowId)
getWorkflowPaths
in interface WorkflowComponent
workflowId
- workflow instance id
public java.util.List getWorkflows(java.lang.String workflowDefinitionId)
getWorkflows
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition id
public boolean isDefinitionDeployed(java.io.InputStream workflowDefinition, java.lang.String mimetype)
isDefinitionDeployed
in interface WorkflowComponent
workflowDefinition
- the definition to checkmimetype
- the mimetype of the definition
public WorkflowPath signal(java.lang.String pathId, java.lang.String transitionId)
signal
in interface WorkflowComponent
pathId
- the workflow path to signal on
public WorkflowPath startWorkflow(java.lang.String workflowDefinitionId, java.util.Map parameters)
startWorkflow
in interface WorkflowComponent
workflowDefinitionId
- the workflow definition idparameters
- the initial set of parameters used to populate the "Start Task" properties
public void undeployDefinition(java.lang.String workflowDefinitionId)
undeployDefinition
in interface WorkflowComponent
workflowDefinitionId
- the id of the definition to undeploypublic boolean hasWorkflowImage(java.lang.String workflowInstanceId)
hasWorkflowImage
in interface WorkflowComponent
workflowInstanceId
- the workflow instance id
public java.io.InputStream getWorkflowImage(java.lang.String workflowInstanceId)
getWorkflowImage
in interface WorkflowComponent
workflowInstanceId
- the workflow instance id
public void setPropertyConverter(ActivitiPropertyConverter propertyConverter)
propertyConverter
- the propertyConverter to setpublic 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 TaskComponent
taskId
- the task id to end
public java.util.List getAssignedTasks(java.lang.String authority, WorkflowTaskState state)
getAssignedTasks
in interface TaskComponent
authority
- the authoritystate
- filter by specified workflow task state
public java.util.List getPooledTasks(java.util.List authorities)
getPooledTasks
in interface TaskComponent
public WorkflowTask getTaskById(java.lang.String taskId)
getTaskById
in interface TaskComponent
taskId
- the task id
public java.util.List queryTasks(WorkflowTaskQuery query)
queryTasks
in interface TaskComponent
query
- the filter by which tasks are queried
public WorkflowTask getStartTask(java.lang.String workflowInstanceId)
getStartTask
in interface TaskComponent
public WorkflowTask startTask(java.lang.String taskId)
startTask
in interface TaskComponent
taskId
- the task to start
public WorkflowTask suspendTask(java.lang.String taskId)
suspendTask
in interface TaskComponent
public WorkflowTask updateTask(java.lang.String taskId, java.util.Map properties, java.util.Map add, java.util.Map remove)
updateTask
in interface TaskComponent
taskId
- 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 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 set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |