|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.workflow.WorkflowServiceImpl
public class WorkflowServiceImpl
Default Alfresco Workflow Service whose implementation is backed by registered BPM Engine plug-in components.
| Constructor Summary | |
|---|---|
WorkflowServiceImpl()
|
|
| Method Summary | |
|---|---|
WorkflowInstance |
cancelWorkflow(java.lang.String workflowId)
Cancel an "in-flight" Workflow instance |
org.alfresco.service.cmr.repository.NodeRef |
createPackage(org.alfresco.service.cmr.repository.NodeRef container)
Create a Workflow Package (a container of content to route through the Workflow). |
WorkflowInstance |
deleteWorkflow(java.lang.String workflowId)
Delete an "in-flight" Workflow instance NOTE: This will force a delete, meaning that the workflow instance may not go through all the appropriate cancel events. |
WorkflowDeployment |
deployDefinition(org.alfresco.service.cmr.repository.NodeRef definitionContent)
Deploy a Workflow Definition to the Alfresco Repository Note: The specified content object must be of type bpm:workflowdefinition. |
WorkflowDeployment |
deployDefinition(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype)
Deploy a Workflow Definition to the Alfresco Repository |
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" 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(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 the latest Workflow Definition by unique name |
byte[] |
getDefinitionImage(java.lang.String workflowDefinitionId)
Gets a graphical view of the Workflow Definition |
java.util.List |
getDefinitions()
Gets latest deployed Workflow Definitions |
java.util.List |
getPackageContents(java.lang.String taskId)
Get a list of node refs to all the package contents for the given task id. |
java.util.Map |
getPathProperties(java.lang.String pathId)
Gets the properties associated with the specified path (and parent paths) |
java.util.List |
getPooledTasks(java.lang.String authority)
Gets the pooled tasks available to the specified authority |
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.util.List |
getWorkflowPaths(java.lang.String workflowId)
Gets all Paths for the specified Workflow instance |
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 |
getWorkflowsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem,
boolean active)
Gets the Workflows that act upon the specified Repository content. |
boolean |
isDefinitionDeployed(org.alfresco.service.cmr.repository.NodeRef workflowDefinition)
Is the specified Workflow Definition already deployed? Note: the notion of "already deployed" may differ between bpm engines. |
boolean |
isDefinitionDeployed(java.lang.String engineId,
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. |
boolean |
isTaskClaimable(WorkflowTask task,
java.lang.String username)
Determines if the given user can claim the given task |
boolean |
isTaskEditable(WorkflowTask task,
java.lang.String username)
Determines if the given user can edit the given task |
boolean |
isTaskReassignable(WorkflowTask task,
java.lang.String username)
Determines if the given user can reassign the given task |
boolean |
isTaskReleasable(WorkflowTask task,
java.lang.String username)
Determines if the given user can release the given task |
java.util.List |
queryTasks(WorkflowTaskQuery query)
Query for tasks |
void |
setAuthorityService(AuthorityService authorityService)
Sets the Authority Service |
void |
setAvmSyncService(AVMSyncService avmSyncService)
Set the avm sync service |
void |
setBPMEngineRegistry(BPMEngineRegistry registry)
Sets the BPM Engine Registry |
void |
setContentService(ContentService contentService)
Sets the Content Service |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionary service |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the Node Service |
void |
setProtectedNodeService(org.alfresco.service.cmr.repository.NodeService protectedNodeService)
Set the node service which applies permissions |
void |
setWorkflowPackageComponent(WorkflowPackageComponent workflowPackageComponent)
Sets the Workflow Package Component |
WorkflowPath |
signal(java.lang.String pathId,
java.lang.String transition)
Signal the transition from one Workflow Node to another |
WorkflowPath |
startWorkflow(java.lang.String workflowDefinitionId,
java.util.Map parameters)
Start a Workflow Instance |
WorkflowPath |
startWorkflowFromTemplate(org.alfresco.service.cmr.repository.NodeRef templateDefinition)
Start a Workflow Instance from an existing "Start Task" template node held in the Repository. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkflowServiceImpl()
| Method Detail |
|---|
public void setAuthorityService(AuthorityService authorityService)
authorityService - public void setBPMEngineRegistry(BPMEngineRegistry registry)
registry - bpm engine registrypublic void setWorkflowPackageComponent(WorkflowPackageComponent workflowPackageComponent)
workflowPackageComponent - workflow package componentpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - public void setContentService(ContentService contentService)
contentService - public void setAvmSyncService(AVMSyncService avmSyncService)
avmSyncService - public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - public void setProtectedNodeService(org.alfresco.service.cmr.repository.NodeService protectedNodeService)
protectedNodeService -
public WorkflowDeployment deployDefinition(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype)
WorkflowService
deployDefinition in interface WorkflowServiceengineId - the bpm engine idworkflowDefinition - the workflow definitionmimetype - the mimetype of the workflow definition
public boolean isDefinitionDeployed(org.alfresco.service.cmr.repository.NodeRef workflowDefinition)
WorkflowService
isDefinitionDeployed in interface WorkflowServiceworkflowDefinition - the content object containing the definition
public boolean isDefinitionDeployed(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype)
WorkflowService
isDefinitionDeployed in interface WorkflowServiceengineId - the bpm engine idworkflowDefinition - the definition to checkmimetype - the mimetype of the definition
public WorkflowDeployment deployDefinition(org.alfresco.service.cmr.repository.NodeRef definitionContent)
WorkflowService
deployDefinition in interface WorkflowServicedefinitionContent - the content object containing the definition
public void undeployDefinition(java.lang.String workflowDefinitionId)
WorkflowService
undeployDefinition in interface WorkflowServiceworkflowDefinitionId - the id of the definition to undeploypublic java.util.List getDefinitions()
WorkflowService
getDefinitions in interface WorkflowServicepublic java.util.List getAllDefinitions()
WorkflowService
getAllDefinitions in interface WorkflowServicepublic WorkflowDefinition getDefinitionById(java.lang.String workflowDefinitionId)
WorkflowService
getDefinitionById in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public WorkflowDefinition getDefinitionByName(java.lang.String workflowName)
WorkflowService
getDefinitionByName in interface WorkflowServiceworkflowName - workflow name e.g. jbpm$wf:review
public java.util.List getAllDefinitionsByName(java.lang.String workflowName)
WorkflowService
getAllDefinitionsByName in interface WorkflowServiceworkflowName - workflow name e.g. jbpm$wf:review
public byte[] getDefinitionImage(java.lang.String workflowDefinitionId)
WorkflowService
getDefinitionImage in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public java.util.List getTaskDefinitions(java.lang.String workflowDefinitionId)
WorkflowService
getTaskDefinitions in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public WorkflowPath startWorkflow(java.lang.String workflowDefinitionId,
java.util.Map parameters)
WorkflowService
startWorkflow in interface WorkflowServiceworkflowDefinitionId - the workflow definition idparameters - the initial set of parameters used to populate the "Start Task" properties
public WorkflowPath startWorkflowFromTemplate(org.alfresco.service.cmr.repository.NodeRef templateDefinition)
WorkflowService
startWorkflowFromTemplate in interface WorkflowServicetemplateDefinition - the node representing the Start Task properties
public java.util.List getActiveWorkflows(java.lang.String workflowDefinitionId)
WorkflowService
getActiveWorkflows in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public java.util.List getCompletedWorkflows(java.lang.String workflowDefinitionId)
WorkflowService
getCompletedWorkflows in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public java.util.List getWorkflows(java.lang.String workflowDefinitionId)
WorkflowService
getWorkflows in interface WorkflowServiceworkflowDefinitionId - the workflow definition id
public WorkflowInstance getWorkflowById(java.lang.String workflowId)
WorkflowService
getWorkflowById in interface WorkflowServiceworkflowId - the id of the workflow to retrieve
public java.util.List getWorkflowPaths(java.lang.String workflowId)
WorkflowService
getWorkflowPaths in interface WorkflowServiceworkflowId - workflow instance id
public java.util.Map getPathProperties(java.lang.String pathId)
WorkflowService
getPathProperties in interface WorkflowServicepathId - workflow path id
public WorkflowInstance cancelWorkflow(java.lang.String workflowId)
WorkflowService
cancelWorkflow in interface WorkflowServiceworkflowId - the workflow instance to cancel
public WorkflowInstance deleteWorkflow(java.lang.String workflowId)
WorkflowService
deleteWorkflow in interface WorkflowServiceworkflowId - the workflow instance to cancel
public WorkflowPath signal(java.lang.String pathId,
java.lang.String transition)
WorkflowService
signal in interface WorkflowServicepathId - the workflow path to signal on
public WorkflowPath fireEvent(java.lang.String pathId,
java.lang.String event)
WorkflowService
fireEvent in interface WorkflowServicepathId - the workflow path to fire event onevent - name of event
public java.util.List getTimers(java.lang.String workflowId)
WorkflowService
getTimers in interface WorkflowServicepublic java.util.List getTasksForWorkflowPath(java.lang.String pathId)
WorkflowService
getTasksForWorkflowPath in interface WorkflowServicepathId - the path id
public java.util.List getAssignedTasks(java.lang.String authority,
WorkflowTaskState state)
WorkflowService
getAssignedTasks in interface WorkflowServiceauthority - the authoritystate - filter by specified workflow task state
public java.util.List getPooledTasks(java.lang.String authority)
WorkflowService
getPooledTasks in interface WorkflowServiceauthority - the authority
public java.util.List queryTasks(WorkflowTaskQuery query)
WorkflowService
queryTasks in interface WorkflowServicequery - the filter by which tasks are queried
public WorkflowTask updateTask(java.lang.String taskId,
java.util.Map properties,
java.util.Map add,
java.util.Map remove)
WorkflowService
updateTask in interface WorkflowServicetaskId - 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 endTask(java.lang.String taskId,
java.lang.String transition)
WorkflowService
endTask in interface WorkflowServicetaskId - the task id to end
public boolean isTaskEditable(WorkflowTask task,
java.lang.String username)
WorkflowService
isTaskEditable in interface WorkflowServicetask - The task to checkusername - The user to check
public boolean isTaskReassignable(WorkflowTask task,
java.lang.String username)
WorkflowService
isTaskReassignable in interface WorkflowServicetask - The task to checkusername - The user to check
public boolean isTaskClaimable(WorkflowTask task,
java.lang.String username)
WorkflowService
isTaskClaimable in interface WorkflowServicetask - The task to checkusername - The user to check
public boolean isTaskReleasable(WorkflowTask task,
java.lang.String username)
WorkflowService
isTaskReleasable in interface WorkflowServicetask - The task to checkusername - The user to check
public WorkflowTask getTaskById(java.lang.String taskId)
WorkflowService
getTaskById in interface WorkflowServicetaskId - the task id
public org.alfresco.service.cmr.repository.NodeRef createPackage(org.alfresco.service.cmr.repository.NodeRef container)
WorkflowService
createPackage in interface WorkflowServicecontainer - (optional) a pre-created container (e.g. folder, versioned folder or layered folder)
public java.util.List getWorkflowsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem,
boolean active)
WorkflowService
getWorkflowsForContent in interface WorkflowServicepackageItem - the repository content item to get workflows foractive - true => active workflows only, false => completed workflows only
public java.util.List getPackageContents(java.lang.String taskId)
WorkflowService
getPackageContents in interface WorkflowServicetaskId - - the task id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||