public interface WorkflowService
| Modifier and Type | Method and Description |
|---|---|
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
|
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 a Workflow instance.
|
WorkflowDeployment |
deployDefinition(org.alfresco.service.cmr.repository.NodeRef workflowDefinition)
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
|
WorkflowDeployment |
deployDefinition(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype,
java.lang.String name)
Deploy a Workflow Definition to the Alfresco Repository
|
WorkflowTask |
endTask(java.lang.String taskId,
java.lang.String transitionId)
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 active workflow instances.
|
java.util.List |
getActiveWorkflows(java.lang.String workflowDefinitionId)
Gets all 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 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 |
getStartTask(java.lang.String workflowInstanceId)
Gets the start task instance for the given workflow instance.
|
java.util.List |
getStartTasks(java.util.List workflowInstanceIds,
boolean sameSession)
Gets the start task instances for the given workflow instances.
|
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 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
|
java.util.List |
getWorkflowsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem,
boolean active)
Gets the Workflows that act upon the specified Repository content.
|
boolean |
hasWorkflowImage(java.lang.String workflowInstanceId)
Determines if a graphical view of the workflow instance exists
|
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)
Deprecated.
Use overloaded method with the
sameSession parameter
(this method defaults the parameter to false). |
java.util.List |
queryTasks(WorkflowTaskQuery query,
boolean sameSession)
Query for tasks
|
WorkflowPath |
signal(java.lang.String pathId,
java.lang.String transitionId)
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
|
@Auditable(parameters={"engineId", "workflowDefinition", "mimetype"},
recordable={true, false, true})
WorkflowDeployment deployDefinition(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype)
engineId - the bpm engine idworkflowDefinition - the workflow definitionmimetype - the mimetype of the workflow definition@Auditable(parameters={"engineId", "workflowDefinition", "mimetype", "name"},
recordable={true, false, true, true})
WorkflowDeployment deployDefinition(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype,
java.lang.String name)
engineId - the bpm engine idworkflowDefinition - the workflow definitionmimetype - the mimetype of the workflow definitionname - a name representing the deployment@Auditable(parameters="workflowDefinition") WorkflowDeployment deployDefinition(org.alfresco.service.cmr.repository.NodeRef workflowDefinition)
workflowDefinition - the content object containing the definition@Auditable(parameters="definitionContent") boolean isDefinitionDeployed(org.alfresco.service.cmr.repository.NodeRef workflowDefinition)
workflowDefinition - the content object containing the definition@Auditable(parameters={"engineId", "workflowDefinition", "mimetype"},
recordable={true, false, true})
boolean isDefinitionDeployed(java.lang.String engineId,
java.io.InputStream workflowDefinition,
java.lang.String mimetype)
engineId - the bpm engine idworkflowDefinition - the definition to checkmimetype - the mimetype of the definition@Auditable(parameters="workflowDefinitionId") void undeployDefinition(java.lang.String workflowDefinitionId)
workflowDefinitionId - the id of the definition to undeploy@Auditable java.util.List getDefinitions()
@Auditable java.util.List getAllDefinitions()
@Auditable(parameters="workflowDefinitionId") WorkflowDefinition getDefinitionById(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition id@Auditable(parameters="workflowName") WorkflowDefinition getDefinitionByName(java.lang.String workflowName)
workflowName - workflow name e.g. jbpm$wf:review@Auditable(parameters="workflowName") java.util.List getAllDefinitionsByName(java.lang.String workflowName)
workflowName - workflow name e.g. jbpm$wf:review@Auditable(parameters="workflowDefinitionId") byte[] getDefinitionImage(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition id@Auditable(parameters="workflowDefinitionId") java.util.List getTaskDefinitions(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition id@Auditable(parameters={"workflowDefinitionId", "parameters"})
WorkflowPath startWorkflow(java.lang.String workflowDefinitionId,
java.util.Map parameters)
workflowDefinitionId - the workflow definition idparameters - the initial set of parameters used to populate the "Start Task" properties@Auditable(parameters="templateDefinition") WorkflowPath startWorkflowFromTemplate(org.alfresco.service.cmr.repository.NodeRef templateDefinition)
templateDefinition - the node representing the Start Task properties@Auditable(parameters="workflowDefinitionId") java.util.List getActiveWorkflows(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition id@Auditable(parameters="workflowDefinitionId") java.util.List getCompletedWorkflows(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition id@Auditable(parameters="workflowDefinitionId") java.util.List getWorkflows(java.lang.String workflowDefinitionId)
workflowDefinitionId - the workflow definition idjava.util.List getWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
workflowInstanceQuery - @Auditable java.util.List getActiveWorkflows()
@Auditable java.util.List getCompletedWorkflows()
java.util.List getWorkflows()
@Auditable(parameters="workflowId") WorkflowInstance getWorkflowById(java.lang.String workflowId)
workflowId - the id of the workflow to retrieve@Auditable(parameters="workflowId") java.util.List getWorkflowPaths(java.lang.String workflowId)
workflowId - workflow instance id@Auditable(parameters="pathId") java.util.Map getPathProperties(java.lang.String pathId)
pathId - workflow path id@Auditable(parameters="workflowId") WorkflowInstance cancelWorkflow(java.lang.String workflowId)
workflowId - the workflow instance to cancel@Auditable(parameters="workflowIds") java.util.List cancelWorkflows(java.util.List workflowIds)
workflowIds - List of the workflow instances to cancel@Auditable(parameters="workflowId") WorkflowInstance deleteWorkflow(java.lang.String workflowId)
workflowId - the workflow instance to cancel@Auditable(parameters={"pathId", "transitionId"})
WorkflowPath signal(java.lang.String pathId,
java.lang.String transitionId)
pathId - the workflow path to signal ontransition - the transition to follow (or null, for the default transition)@Auditable(parameters={"pathId", "event"})
WorkflowPath fireEvent(java.lang.String pathId,
java.lang.String event)
pathId - the workflow path to fire event onevent - name of event@Auditable(parameters="pathId") java.util.List getTasksForWorkflowPath(java.lang.String pathId)
pathId - the path id@Auditable(parameters="pathId") WorkflowTask getStartTask(java.lang.String workflowInstanceId)
workflowInstanceId - @Auditable(parameters="pathIds")
java.util.List getStartTasks(java.util.List workflowInstanceIds,
boolean sameSession)
workflowInstanceIds - sameSession - 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.@Auditable(parameters="workflowInstanceId") boolean hasWorkflowImage(java.lang.String workflowInstanceId)
workflowInstanceId - the workflow instance id@Auditable(parameters="workflowInstanceId",
recordReturnedObject=false)
java.io.InputStream getWorkflowImage(java.lang.String workflowInstanceId)
workflowInstanceId - the workflow instance id@Auditable(parameters="workflowId") java.util.List getTimers(java.lang.String workflowId)
@Auditable(parameters="taskId") WorkflowTask getTaskById(java.lang.String taskId)
taskId - the task id@Auditable(parameters={"authority", "state"})
java.util.List getAssignedTasks(java.lang.String authority,
WorkflowTaskState state)
authority - the authoritystate - filter by specified workflow task state@Auditable(parameters="authority") java.util.List getPooledTasks(java.lang.String authority)
authority - the authorityjava.util.List queryTasks(WorkflowTaskQuery query)
sameSession parameter
(this method defaults the parameter to false).@Auditable(parameters="query") java.util.List queryTasks(WorkflowTaskQuery query, boolean sameSession)
query - 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.@Auditable(parameters={"taskId", "properties", "add", "remove"})
WorkflowTask updateTask(java.lang.String taskId,
java.util.Map properties,
java.util.Map add,
java.util.Map remove)
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)@Auditable(parameters={"taskId", "transitionId"})
WorkflowTask endTask(java.lang.String taskId,
java.lang.String transitionId)
taskId - the task id to endtransition - the task transition to take on completion (or null, for the default transition)@Auditable(parameters={"task", "username"})
boolean isTaskEditable(WorkflowTask task,
java.lang.String username)
task - The task to checkusername - The user to check@Auditable(parameters={"task", "username"})
boolean isTaskReassignable(WorkflowTask task,
java.lang.String username)
task - The task to checkusername - The user to check@Auditable(parameters={"task", "username"})
boolean isTaskClaimable(WorkflowTask task,
java.lang.String username)
task - The task to checkusername - The user to check@Auditable(parameters={"task", "username"})
boolean isTaskReleasable(WorkflowTask task,
java.lang.String username)
task - The task to checkusername - The user to check@Auditable(parameters="container") org.alfresco.service.cmr.repository.NodeRef createPackage(org.alfresco.service.cmr.repository.NodeRef container)
container - (optional) a pre-created container (e.g. folder, versioned folder or layered folder)@Auditable(parameters={"packageItem", "active"})
java.util.List getWorkflowsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem,
boolean active)
packageItem - the repository content item to get workflows foractive - true => active workflows only, false => completed workflows only@Auditable(parameters={"packageItem", "active"})
java.util.List getPackageContents(java.lang.String taskId)
taskId - - the task idCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.