Package com.orchestranetworks.workflow
Interface UserTask.WorkItem
- Enclosing class:
- UserTask
public static interface UserTask.WorkItem
Defines the resulting state of a work item.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturns the work item comment.Returns the completion date of the work item.Returns description of the associated node.int
Returns the work item index.getLabel()
Returns label of the associated node.Deprecated.Since 5.7.0.Returns the list of profiles the work item is offered to.Returns theProcessInstanceKey
of the workflow associated to the current work item.Returns the specific label of the work item.Returns the start date of the work item.getState()
Returns the current state of the work item.Returns the owner of the work item.Returns the identifier of the work item.boolean
Returnstrue
if the deadline has been reached for the current work item.boolean
Returnstrue
if the work item is accepted.boolean
Returnstrue
if the work item is rejected.boolean
Returnstrue
if the rejection is enabled for the work item (the activation of the rejection is specified in the user task definition).
-
Method Details
-
getProcessInstanceKey
ProcessInstanceKey getProcessInstanceKey()Returns theProcessInstanceKey
of the workflow associated to the current work item.- Since:
- 5.7.0
-
isAccepted
boolean isAccepted()Returnstrue
if the work item is accepted.Returns
false
if no interaction has been found for the work item. -
isRejected
boolean isRejected()Returnstrue
if the work item is rejected.Returns
false
if no interaction has been found for the work item. -
isRejectEnabled
boolean isRejectEnabled()Returnstrue
if the rejection is enabled for the work item (the activation of the rejection is specified in the user task definition).- Since:
- 5.7.1 fix D
-
hasReachedDeadline
boolean hasReachedDeadline()Returnstrue
if the deadline has been reached for the current work item.Returns
false
if the work item is completed or past.- Since:
- 5.6.0
-
getComment
String getComment()Returns the work item comment. -
getUserReference
UserReference getUserReference()Returns the owner of the work item. -
getOfferedTo
Deprecated.Since 5.7.0. This method is replaced bygetOfferedToProfiles()
.Returns the role to which the work item is offered. For the default user task mode (single work item), if only one role is defined, returns this, else throws an exception.- Throws:
IllegalStateException
- if the work item is offered to more than one profile or if the profile is not a role.- Since:
- 5.2.3
-
getOfferedToProfiles
Returns the list of profiles the work item is offered to. In the legacy user task mode, this method returns a list with at most one element.- Since:
- 5.7.0
-
getLabel
UserMessage getLabel()Returns label of the associated node. -
getDescription
UserMessage getDescription()Returns description of the associated node. -
getItemIndex
int getItemIndex()Returns the work item index. In the default user task mode (single work item), this method always returns 0. -
getSpecificLabel
UserMessage getSpecificLabel()Returns the specific label of the work item. -
getState
UserTask.WorkItem.State getState()Returns the current state of the work item. -
getStartDate
Date getStartDate()Returns the start date of the work item.This is the date on which the work item entered the started state.
-
getCompletionDate
Date getCompletionDate()Returns the completion date of the work item.This is the date on which the work item entered the completed state.
Returns
null
if the work item has not been completed.- See Also:
-
getWorkItemKey
WorkItemKey getWorkItemKey()Returns the identifier of the work item.This method may return
null
in some cases, for example, if the work item has been deleted and does not have primary key.- Since:
- 5.2.3
-