|
|||||||||
| 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.jbpm.JBPMEngine
public class JBPMEngine
JBoss JBPM based implementation of: Workflow Definition Component Workflow Component Task Component
| Field Summary | |
|---|---|
protected AuthorityDAO |
authorityDAO
|
protected java.lang.String |
companyHomePath
|
protected StoreRef |
companyHomeStore
|
protected DictionaryService |
dictionaryService
|
protected org.springmodules.workflow.jbpm31.JbpmTemplate |
jbpmTemplate
|
protected NamespaceService |
namespaceService
|
protected NodeService |
nodeService
|
protected PersonService |
personService
|
protected ServiceRegistry |
serviceRegistry
|
protected SearchService |
unprotectedSearchService
|
| Constructor Summary | |
|---|---|
JBPMEngine()
|
|
| Method Summary | |
|---|---|
WorkflowInstance |
cancelWorkflow(java.lang.String workflowId)
Cancel an "in-flight" Workflow instance |
protected org.alfresco.repo.workflow.jbpm.JBPMEngine.CompiledProcessDefinition |
compileProcessDefinition(java.io.InputStream definitionStream,
java.lang.String mimetype)
Construct a Process Definition from the provided Process Definition stream |
protected WorkflowDefinition |
createWorkflowDefinition(org.jbpm.graph.def.ProcessDefinition definition)
Creates a Workflow Definition |
protected WorkflowDeployment |
createWorkflowDeployment(org.alfresco.repo.workflow.jbpm.JBPMEngine.CompiledProcessDefinition compiledDef)
Creates a Workflow Deployment |
protected WorkflowInstance |
createWorkflowInstance(org.jbpm.graph.exe.ProcessInstance instance)
Creates a Workflow Instance |
protected WorkflowNode |
createWorkflowNode(org.jbpm.graph.def.Node node)
Creates a Workflow Node |
protected WorkflowPath |
createWorkflowPath(org.jbpm.graph.exe.Token token)
Creates a Workflow Path |
protected WorkflowTask |
createWorkflowTask(org.jbpm.taskmgmt.exe.TaskInstance task)
Creates a Workflow Task |
protected WorkflowTaskDefinition |
createWorkflowTaskDefinition(org.jbpm.taskmgmt.def.Task task)
Creates a Workflow Task Definition |
protected WorkflowTimer |
createWorkflowTimer(org.jbpm.job.Timer timer)
Creates a Workflow Timer |
protected WorkflowTransition |
createWorkflowTransition(org.jbpm.graph.def.Transition transition)
Create a Workflow Transition |
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 |
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(java.lang.String workflowDefinitionId)
Gets all "in-flight" 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 |
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 long |
getJbpmId(java.lang.String id)
Get JBoss JBPM Id from Engine Global Id |
protected QName[] |
getMissingMandatoryTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance)
Get missing mandatory properties on Task |
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 |
protected org.jbpm.graph.def.ProcessDefinition |
getProcessDefinition(org.jbpm.db.GraphSession graphSession,
java.lang.String workflowDefinitionId)
Gets a jBPM process definition |
protected org.jbpm.graph.exe.ProcessInstance |
getProcessInstance(org.jbpm.db.GraphSession graphSession,
java.lang.String workflowId)
Gets a jBPM Process Instance |
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 |
protected org.jbpm.taskmgmt.exe.TaskInstance |
getTaskInstance(org.jbpm.db.TaskMgmtSession taskSession,
java.lang.String taskId)
Gets a jBPM Task Instance |
protected java.util.Map |
getTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance,
boolean localProperties)
Gets Properties of Task |
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.util.List |
getWorkflowPaths(java.lang.String workflowId)
Gets all Paths for the specified Workflow instance |
protected WorkflowTaskState |
getWorkflowTaskState(org.jbpm.taskmgmt.exe.TaskInstance task)
Get the Workflow Task State for the specified JBoss JBPM Task |
protected org.jbpm.graph.exe.Token |
getWorkflowToken(org.jbpm.db.GraphSession session,
java.lang.String pathId)
Get the JBoss JBPM Token for the Workflow Path |
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 |
setAuthorityDAO(AuthorityDAO authorityDAO)
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 |
setDefaultStartTaskDescription(org.jbpm.taskmgmt.exe.TaskInstance instance)
Sets default description for the Task |
protected void |
setDefaultTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance)
Sets Default Properties of Task |
protected void |
setDefaultWorkflowProperties(org.jbpm.taskmgmt.exe.TaskInstance startTask)
Initialise Workflow Instance properties |
void |
setDictionaryService(DictionaryService dictionaryService)
Sets the Dictionary Service |
void |
setJBPMTemplate(org.springmodules.workflow.jbpm31.JbpmTemplate jbpmTemplate)
Sets the JBPM Template used for accessing JBoss JBPM in the correct context |
void |
setMessageService(MessageService messageService)
Sets the Message Service |
void |
setNamespaceService(NamespaceService namespaceService)
Sets the Namespace Service |
void |
setNodeService(NodeService nodeService)
Sets the Node Service |
void |
setPersonService(PersonService personService)
Sets the Person Service |
void |
setServiceRegistry(ServiceRegistry serviceRegistry)
Sets the Service Registry |
protected void |
setTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance,
java.util.Map properties)
Sets Properties of Task |
void |
setTenantService(TenantService tenantService)
Sets the Tenant Service |
void |
setUnprotectedSearchService(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 transition)
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 |
|---|
afterPropertiesSet, createGlobalId, createLocalId, setBPMEngineRegistry, setEngineId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DictionaryService dictionaryService
protected NamespaceService namespaceService
protected NodeService nodeService
protected ServiceRegistry serviceRegistry
protected PersonService personService
protected AuthorityDAO authorityDAO
protected org.springmodules.workflow.jbpm31.JbpmTemplate jbpmTemplate
protected SearchService unprotectedSearchService
protected StoreRef companyHomeStore
protected java.lang.String companyHomePath
| Constructor Detail |
|---|
public JBPMEngine()
| Method Detail |
|---|
public void setJBPMTemplate(org.springmodules.workflow.jbpm31.JbpmTemplate jbpmTemplate)
jbpmTemplate - public void setDictionaryService(DictionaryService dictionaryService)
dictionaryService - public void setNamespaceService(NamespaceService namespaceService)
namespaceService - public void setNodeService(NodeService nodeService)
nodeService - public void setTenantService(TenantService tenantService)
tenantService - public void setMessageService(MessageService messageService)
messageService - public void setPersonService(PersonService personService)
personService - public void setAuthorityDAO(AuthorityDAO authorityDAO)
authorityDAO - public void setServiceRegistry(ServiceRegistry serviceRegistry)
serviceRegistry - public void setCompanyHomePath(java.lang.String companyHomePath)
companyHomePath - public void setCompanyHomeStore(java.lang.String companyHomeStore)
companyHomeStore - public void setUnprotectedSearchService(SearchService unprotectedSearchService)
unprotectedSearchService -
public WorkflowDeployment deployDefinition(java.io.InputStream workflowDefinition,
java.lang.String mimetype)
WorkflowComponent
deployDefinition in interface WorkflowComponentworkflowDefinition - the content object containing the definitionmimetype - (optional) the mime type of the workflow definition
public boolean isDefinitionDeployed(java.io.InputStream workflowDefinition,
java.lang.String mimetype)
WorkflowComponent
isDefinitionDeployed in interface WorkflowComponentworkflowDefinition - the definition to checkmimetype - the mimetype of the definition
public void undeployDefinition(java.lang.String workflowDefinitionId)
WorkflowComponent
undeployDefinition in interface WorkflowComponentworkflowDefinitionId - the id of the definition to undeploypublic java.util.List getDefinitions()
WorkflowComponent
getDefinitions in interface WorkflowComponentpublic java.util.List getAllDefinitions()
WorkflowComponent
getAllDefinitions in interface WorkflowComponentpublic WorkflowDefinition getDefinitionById(java.lang.String workflowDefinitionId)
WorkflowComponent
getDefinitionById in interface WorkflowComponentworkflowDefinitionId - the workflow definition id
public WorkflowDefinition getDefinitionByName(java.lang.String workflowName)
WorkflowComponent
getDefinitionByName in interface WorkflowComponentworkflowName - workflow name e.g. jbpm$wf:review
public java.util.List getAllDefinitionsByName(java.lang.String workflowName)
WorkflowComponent
getAllDefinitionsByName in interface WorkflowComponentworkflowName - workflow name e.g. jbpm$wf:review
public byte[] getDefinitionImage(java.lang.String workflowDefinitionId)
WorkflowComponent
getDefinitionImage in interface WorkflowComponentworkflowDefinitionId - the workflow definition id
public java.util.List getTaskDefinitions(java.lang.String workflowDefinitionId)
WorkflowComponent
getTaskDefinitions in interface WorkflowComponentworkflowDefinitionId - the workflow definition id
protected org.jbpm.graph.def.ProcessDefinition getProcessDefinition(org.jbpm.db.GraphSession graphSession,
java.lang.String workflowDefinitionId)
graphSession - jBPM graph sessionworkflowDefinitionId - workflow definition id
public WorkflowPath startWorkflow(java.lang.String workflowDefinitionId,
java.util.Map parameters)
WorkflowComponent
startWorkflow in interface WorkflowComponentworkflowDefinitionId - the workflow definition idparameters - the initial set of parameters used to populate the "Start Task" properties
public java.util.List getActiveWorkflows(java.lang.String workflowDefinitionId)
WorkflowComponent
getActiveWorkflows in interface WorkflowComponentworkflowDefinitionId - the workflow definition id
public WorkflowInstance getWorkflowById(java.lang.String workflowId)
WorkflowComponent
getWorkflowById in interface WorkflowComponentworkflowId - the id of the workflow to retrieve
protected org.jbpm.graph.exe.ProcessInstance getProcessInstance(org.jbpm.db.GraphSession graphSession,
java.lang.String workflowId)
graphSession - jBPM graph sessionworkflowId - workflow id
public java.util.List getWorkflowPaths(java.lang.String workflowId)
WorkflowComponent
getWorkflowPaths in interface WorkflowComponentworkflowId - workflow instance id
public java.util.Map getPathProperties(java.lang.String pathId)
WorkflowComponent
getPathProperties in interface WorkflowComponentpathId - workflow path id
public WorkflowInstance cancelWorkflow(java.lang.String workflowId)
WorkflowComponent
cancelWorkflow in interface WorkflowComponentworkflowId - the workflow instance to cancel
public WorkflowInstance deleteWorkflow(java.lang.String workflowId)
WorkflowComponent
deleteWorkflow in interface WorkflowComponentworkflowId - the workflow instance to cancel
public WorkflowPath signal(java.lang.String pathId,
java.lang.String transition)
WorkflowComponent
signal in interface WorkflowComponentpathId - the workflow path to signal on
public WorkflowPath fireEvent(java.lang.String pathId,
java.lang.String event)
WorkflowComponent
fireEvent in interface WorkflowComponentpathId - the workflow path to fire event onevent - name of event
public java.util.List getTasksForWorkflowPath(java.lang.String pathId)
WorkflowComponent
getTasksForWorkflowPath in interface WorkflowComponentpathId - the path id
public java.util.List getTimers(java.lang.String workflowId)
WorkflowComponent
getTimers in interface WorkflowComponent
public java.util.List getAssignedTasks(java.lang.String authority,
WorkflowTaskState state)
TaskComponent
getAssignedTasks in interface TaskComponentauthority - the authoritystate - filter by specified workflow task state
public java.util.List getPooledTasks(java.util.List authorities)
TaskComponent
getPooledTasks in interface TaskComponentpublic java.util.List queryTasks(WorkflowTaskQuery query)
TaskComponent
queryTasks in interface TaskComponentquery - the filter by which tasks are queried
protected org.jbpm.taskmgmt.exe.TaskInstance getTaskInstance(org.jbpm.db.TaskMgmtSession taskSession,
java.lang.String taskId)
taskSession - jBPM task sessiontaskId - task id
public WorkflowTask updateTask(java.lang.String taskId,
java.util.Map properties,
java.util.Map add,
java.util.Map remove)
TaskComponent
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 WorkflowTask startTask(java.lang.String taskId)
TaskComponent
startTask in interface TaskComponenttaskId - the task to start
public WorkflowTask suspendTask(java.lang.String taskId)
TaskComponent
suspendTask in interface TaskComponent
public WorkflowTask endTask(java.lang.String taskId,
java.lang.String transition)
TaskComponent
endTask in interface TaskComponenttaskId - the task id to end
public WorkflowTask getTaskById(java.lang.String taskId)
TaskComponent
getTaskById in interface TaskComponenttaskId - the task id
protected org.alfresco.repo.workflow.jbpm.JBPMEngine.CompiledProcessDefinition compileProcessDefinition(java.io.InputStream definitionStream,
java.lang.String mimetype)
workflowDefinition - stream to create process definition frommimetype - mimetype of stream
protected long getJbpmId(java.lang.String id)
id - global id
protected org.jbpm.graph.exe.Token getWorkflowToken(org.jbpm.db.GraphSession session,
java.lang.String pathId)
session - JBoss JBPM Graph SessionpathId - workflow path id
protected java.util.Map getTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance,
boolean localProperties)
instance - task instanceproperties - properties to set
protected void setTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance,
java.util.Map properties)
instance - task instanceproperties - properties to setprotected void setDefaultTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance)
instance - task instancepublic void setDefaultStartTaskDescription(org.jbpm.taskmgmt.exe.TaskInstance instance)
instance - task instanceprotected void setDefaultWorkflowProperties(org.jbpm.taskmgmt.exe.TaskInstance startTask)
startTask - start task instanceprotected QName[] getMissingMandatoryTaskProperties(org.jbpm.taskmgmt.exe.TaskInstance instance)
instance - task instance
protected WorkflowPath createWorkflowPath(org.jbpm.graph.exe.Token token)
token - JBoss JBPM Token
protected WorkflowNode createWorkflowNode(org.jbpm.graph.def.Node node)
node - JBoss JBPM Node
protected WorkflowTransition createWorkflowTransition(org.jbpm.graph.def.Transition transition)
transition - JBoss JBPM Transition
protected WorkflowInstance createWorkflowInstance(org.jbpm.graph.exe.ProcessInstance instance)
instance - JBoss JBPM Process Instance
protected WorkflowDefinition createWorkflowDefinition(org.jbpm.graph.def.ProcessDefinition definition)
definition - JBoss Process Definition
protected WorkflowTask createWorkflowTask(org.jbpm.taskmgmt.exe.TaskInstance task)
task - JBoss Task Instance
protected WorkflowTaskDefinition createWorkflowTaskDefinition(org.jbpm.taskmgmt.def.Task task)
task - JBoss JBPM Task
protected WorkflowDeployment createWorkflowDeployment(org.alfresco.repo.workflow.jbpm.JBPMEngine.CompiledProcessDefinition compiledDef)
compiledDef - compiled JBPM process definition
protected WorkflowTimer createWorkflowTimer(org.jbpm.job.Timer timer)
timer - jBPM Timer
protected WorkflowTaskState getWorkflowTaskState(org.jbpm.taskmgmt.exe.TaskInstance task)
task - task
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||