public interface IWorkflowService
Modifier and Type | Method and Description |
---|---|
IWFProcessDefinition |
createProcessDefinition(IWFProcessDefinition processDefinition)
Creates a process definition.
|
void |
deleteProcessDefinitions(java.util.Set<Id> processDefinitionIds)
Deletes process definitions by IDs.
|
IWFProcessDefinition |
discardDraftDefinition(Id processDefinitionId)
Discard the draft content of the process definition.
|
void |
enableProcessDefinitions(java.util.Set<Id> processDefinitionIds,
boolean enabled)
enable or disable process definitions by IDs
|
int |
estimateStartingProcessesInBulk(Id processDefinitionId)
Returns estimated count that would meet the criteria to start the workflow processes in bulk
|
boolean |
evaluateCondition(IWFConditionEval conditionEval,
Id resourceId)
Evaluates condition in the context of specified resource that does not necessarily have active workflow.
|
java.util.List<IWFProcess> |
getActiveProcesses(Id resourceId)
Returns list of active processes (open/executing) for the given resource id.
|
java.util.List<IWFActivityInstance> |
getActivityInstances(Id processId)
Retrieves the list of activity instances for the given process id.
|
WFActivityInstanceList |
getActivityInstances(IWFActivityInstanceFindOptions wfOptions)
Retrieves activity instances based on the supplied options.
|
IWFProcess |
getProcess(Id processId)
Retrieves a process object for the given id.
|
IWFProcessDefinition |
getProcessDefinition(Id processDefinitionId,
boolean draft)
Returns a process definition by ID
|
IWFProcessDefinition |
getProcessDefinition(java.lang.String name,
Id typeDefinitionId,
boolean draft)
Returns a process definition by name, type definition ID
|
IWFProcessDefinition |
getProcessDefinitionByVersionId(Id versionId)
Returns a process definition by the version ID
|
java.util.List<IWFProcessDefinition> |
getProcessDefinitions(Id processDefinitionId)
Returns the published and draft versions of the process definition if they exist.
|
WFProcessDefinitionList |
getProcessDefinitions(IWFProcessDefinitionFindOptions wfOptions)
Fetches list of process definitions based on the criteria defined by the
IWFProcessDefinitionFindOptions |
java.util.List<IWFProcessDefinition> |
getProcessDefinitionsToStartOn(IGRCObject grcObject)
Returns the list of process definitions that a user can start on the given resource.
|
java.util.List<IWFProcessEvent> |
getProcessEventLog(Id processId)
Retrieves the list of process events for the given process id.
|
java.util.List<IWFProcessEvent> |
getProcessEventLog(Id processId,
Id activityInstanceId,
java.util.List<WFProcessEventType> types)
Retrieves process events for the given parameters.
|
java.util.List<IWFProcess> |
getStartedProcesses(Id resourceId)
Returns list of started processes (open/executing/initialization error) for the given resource id.
|
java.util.List<IWFTransition> |
getTransitions(Id processId)
Returns currently valid transitions for the given process id.
|
java.util.List<IWFTransition> |
getTransitions(IWFProcess procInst)
Returns currently valid transitions for the given process instance.
|
IWorkflowFactory |
getWorkflowFactory()
Returns a new workflow factory object.
|
void |
hardDeleteProcessDefinitions(java.util.Set<Id> processDefinitionIds)
Hard-deletes process definitions by IDs.
|
void |
processTransition(Id processId,
java.lang.String transitionName)
Deprecated.
|
void |
processTransition(Id processId,
java.lang.String transitionName,
IWFTransitionOptions options)
Processes the transition for the given process id.
|
IWFProcessDefinition |
publishProcessDefinition(Id processDefinitionId)
Publish the draft content of the process definition, so it can be started
on a resource during the resource creation or the user's submission.
|
void |
setAssignees(Id activityInstanceId,
java.util.List<java.lang.String> newAssignees,
boolean append)
Sets the list of assignees on the given activity instance.
|
IWFProcess |
startProcess(Id processDefinitionId,
Id resourceId)
Instantiates a workflow process for the given resource id.
|
IWFProcess |
startProcess(Id processDefinitionId,
Id resourceId,
java.util.Map<java.lang.String,java.lang.Object> processVariables)
Instantiates a workflow process for the given resource id with given process variables.
|
Id |
startProcessesInBulk(StartProcessesOptions wfOptions)
Starts workflow process on any objects that meet the following criteria, through a long running process
- on the object type referred by the process definition
- there is no active workflow on the object
- object is unlocked
- the object meets the applicability criteria of the process definition
|
void |
syncProcess(Id processId)
The process/activity fields are typically set based on related objects.
|
void |
terminateProcesses(java.util.Set<Id> processIds)
Terminates the given processes and any active activities.
|
IWFProcessDefinition |
updateProcessDefinition(IWFProcessDefinition processDefinition)
Updates a process definition.
|
void |
validateCustomActionClass(java.lang.String className)
Validates that the action class can be instantiated and properly extends
AbstractCustomAction |
WFConditionReport |
validateTransition(Id processId,
java.lang.String transitionName)
Validates all the validations defined for the transition for the given process id.
|
java.util.List<IWFProcessDefinition> getProcessDefinitions(Id processDefinitionId)
processDefinitionId
- WFProcessDefinitionList getProcessDefinitions(IWFProcessDefinitionFindOptions wfOptions)
IWFProcessDefinitionFindOptions
wfOptions
- IWFProcessDefinition getProcessDefinitionByVersionId(Id versionId)
versionId
- IWFProcessDefinition getProcessDefinition(java.lang.String name, Id typeDefinitionId, boolean draft)
name
- typeDefinitionId
- draft
- IWFProcessDefinition getProcessDefinition(Id processDefinitionId, boolean draft)
processDefinitionId
- draft
- IWFProcessDefinition createProcessDefinition(IWFProcessDefinition processDefinition)
processDefinition
- IWFProcessDefinition updateProcessDefinition(IWFProcessDefinition processDefinition)
processDefinition
- void deleteProcessDefinitions(java.util.Set<Id> processDefinitionIds)
processDefinitionIds
- void hardDeleteProcessDefinitions(java.util.Set<Id> processDefinitionIds)
deleteProcessDefinitions(Set)
, this API will completely
remove the process definition and its associated process/activity instances from the database, so there is not way to recover it.processDefinitionIds
- IWFProcessDefinition publishProcessDefinition(Id processDefinitionId)
processDefinitionId
- IWFProcessDefinition discardDraftDefinition(Id processDefinitionId)
processDefinitionId
- void enableProcessDefinitions(java.util.Set<Id> processDefinitionIds, boolean enabled)
processDefinitionIds
- enabled
- java.util.List<IWFProcessDefinition> getProcessDefinitionsToStartOn(IGRCObject grcObject)
grcObject
- java.util.List<IWFProcess> getActiveProcesses(Id resourceId)
resourceId
- java.util.List<IWFProcess> getStartedProcesses(Id resourceId)
resourceId
- IWFProcess getProcess(Id processId)
processId
- java.util.List<IWFProcessEvent> getProcessEventLog(Id processId)
processId
- java.util.List<IWFProcessEvent> getProcessEventLog(Id processId, Id activityInstanceId, java.util.List<WFProcessEventType> types)
processId
- activityInstanceId
- types
- java.util.List<IWFActivityInstance> getActivityInstances(Id processId)
processId
- WFActivityInstanceList getActivityInstances(IWFActivityInstanceFindOptions wfOptions)
wfOptions
- IWFProcess startProcess(Id processDefinitionId, Id resourceId)
processDefinitionId
- resourceId
- IWFProcess startProcess(Id processDefinitionId, Id resourceId, java.util.Map<java.lang.String,java.lang.Object> processVariables)
processDefinitionId
- resourceId
- processVariables
- java.util.List<IWFTransition> getTransitions(Id processId)
IWFTransition.getCondition()
from the transitions defined on an activity,
and list the ones that meets the criteria. It also evaluates IWFActivity.getAccessType()
and returns
only available transtitions for the current user.processId
- java.util.List<IWFTransition> getTransitions(IWFProcess procInst)
IWFTransition.getCondition()
from the transitions defined on an activity,
and list the ones that meets the criteria. It also evaluates IWFActivity.getAccessType()
and returns
only available transtitions for the current user.procInst
- WFConditionReport validateTransition(Id processId, java.lang.String transitionName)
WFConditionReport
object. The WFConditionReport
object contains all the
validations along with the evaluation result including both passed and failed validations.processId
- transitionName
- void processTransition(Id processId, java.lang.String transitionName, IWFTransitionOptions options)
WFException
.processId
- transitionName
- @Deprecated void processTransition(Id processId, java.lang.String transitionName)
void syncProcess(Id processId)
processId
- void setAssignees(Id activityInstanceId, java.util.List<java.lang.String> newAssignees, boolean append)
activityInstanceId
- newAssignees
- append
- void terminateProcesses(java.util.Set<Id> processIds)
processIds
- IWorkflowFactory getWorkflowFactory()
void validateCustomActionClass(java.lang.String className)
AbstractCustomAction
className
- boolean evaluateCondition(IWFConditionEval conditionEval, Id resourceId)
conditionEval
- resourceId
- Id startProcessesInBulk(StartProcessesOptions wfOptions)
wfOptions
- int estimateStartingProcessesInBulk(Id processDefinitionId)
processDefinitionId
-
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.