public interface IWFProcess extends IWFProcessContext
Interface that represents the process instance. The process instance is created either by
a resource creation ( when IWFProcessDefinition.getType() returns WFProcessDefinitionType.create ) or
user's operation to start the workflow, and provides access to the whole lifecycle of the process.
The interface inherits from IWFProcessContext which provides majority of the process information.
The access to the activity instance is provided here on top of it.
Typically the IWFProcessContext.getState() returns WFProcessState.open while the process is active,
and is marked WFProcessState.complete when the process reaches an activity whose type is WFActivityType.end.
When the process instance is cancelled by the process termination, it is marked WFProcessState.cancelled. Also when
the system is processing a transition in background, the state is marked WFProcessState.executing, until the background
execution completes.
When a workflow process is started on a resource, it uses the latest published version of the process definition, and
would not be impacted by the subsequent change to the process definition or new published version. The version of the process
definition used by the process instance is available by IWFProcessContext.getProcessVersionId().
Currently, the workflow system only allows single active process instance association to a resource. If a user attempts to start new process while the resource already has active process instance, the system throws an error.
| Modifier and Type | Method and Description |
|---|---|
IWFActivityInstance |
getActivityInstance(Id activityInstanceId)
Returns an
IWFActivityInstance by the activity instance ID. |
java.util.List<IWFActivityInstance> |
getActivityInstances()
Returns list of
IWFActivityInstance created out of the process instance. |
IWFActivityInstance |
getCurrentActivityInstance()
Returns an
IWFActivityInstance for the current activity. |
IWFTransitionComment |
getLastTransitionComment()
Returns the comment provided by the user on the last transition.
|
Id |
getOriginatingProcessId()
If this process was started by another process, this method returns
the Id value of that process.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Assigns a process instance attribute by the attribute name via transition actions.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Assigns the process instance attributes via transition actions.
|
void |
setCriticality(WFProcessCriticality criticality)
Assigns criticality of the process instance via transition actions.
|
void |
setDueDate(java.util.Date dueDate)
Assigns due date of the process instance via transition actions.
|
void |
setOwners(java.util.List<java.lang.String> owner)
Assigns the oversight owners of the process instance via transition actions.
|
void |
setStatusMessage(java.lang.String statusMessage)
Assigns status message of the process instance via transition actions.
|
void |
setStatusMessageLabels(java.util.List<ILabel> processStatusLabels)
Assigns status message labels of the process instance via transition actions.
|
getAttribute, getAttributes, getCreatedBy, getCreatedDate, getCriticality, getDueDate, getId, getLastTransition, getLastTransitionBy, getLastTransitionDate, getModifiedBy, getModifiedDate, getOwners, getProcessVersionId, getResourceContext, getResourceId, getState, getStatusMessage, getStatusMessageLabel, getStatusMessageLabels, getTypeIWFActivityInstance getCurrentActivityInstance()
IWFActivityInstance for the current activity.java.util.List<IWFActivityInstance> getActivityInstances()
IWFActivityInstance created out of the process instance.IWFActivityInstance getActivityInstance(Id activityInstanceId)
IWFActivityInstance by the activity instance ID.id - void setCriticality(WFProcessCriticality criticality)
criticality - void setDueDate(java.util.Date dueDate)
dueDate - void setStatusMessage(java.lang.String statusMessage)
statusMessage - void setStatusMessageLabels(java.util.List<ILabel> processStatusLabels)
processStatusLabels - void setOwners(java.util.List<java.lang.String> owner)
setOwners in interface IWFProcessContextowner - void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
attributes - void setAttribute(java.lang.String name,
java.lang.Object value)
name - value - Id getOriginatingProcessId()
IWFTransitionComment getLastTransitionComment()
getLastTransitionComment in interface IWFProcessContext
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.