Interface UserTaskWorkItemCompletionContext

All Superinterfaces:
DataContext, DataContextReadOnly, ProcessExecutionContext, ProcessExecutionInfoContext

public interface UserTaskWorkItemCompletionContext extends ProcessExecutionContext, DataContext
This interface is used as the context for work item completion.
See Also:
  • Method Details

    • completeUserTask

      void completeUserTask() throws OperationException
      Method to call when we consider that the user task is completed so that the token is asynchronously positioned to the next node in the process.

      This method must be called regardless of the user task mode.

      Throws:
      OperationException
    • countStartedWorkItems

      int countStartedWorkItems()
      Returns the number of work items that have been started. When the user task is in default mode (single work item), this method always returns 1.
    • countRejectedWorkItems

      int countRejectedWorkItems()
      Returns the number of work items that have been rejected. When the user task is in default mode (single work item), this method returns 1 if the work item has been rejected or else 0.
    • countAcceptedWorkItems

      int countAcceptedWorkItems()
      Returns the number of work items that have been accepted. When the user task is in default mode (single work item), this method returns 1 if the work item has been accepted or else 0.
    • countAllWorkItems

      int countAllWorkItems()
      Returns the total number of work items that have been created. When the user task is in default mode (single work item), this method returns always 1.
    • getCompletedWorkItem

      UserTask.WorkItem getCompletedWorkItem()
      Returns the state of the work item that has just been completed.
    • checkAllWorkItemMatchStrategy

      boolean checkAllWorkItemMatchStrategy()
      Returns true if the work items match the completion strategy as it is defined by the method getCompletionStrategyProperty(). When the user task is in default mode (single work item), this method always returns true.
    • getCompletionStrategyProperty

      UserTask.CompletionStrategy getCompletionStrategyProperty()
      Returns the user task completion strategy.

      The returned value corresponds to the property "Termination/Completion Strategy", as it is specified on the current task definition. If this property is not specified, the default value is UserTask.CompletionStrategy.ALL_WORK_ITEMS_ACCEPTED.

      When the user task is in default mode (single work item), this method always returns UserTask.CompletionStrategy.ALL_WORK_ITEMS_COMPLETED.

    • getRejectionThresholdProperty

      int getRejectionThresholdProperty()
      Returns the rejection threshold.

      The returned integer corresponds to the property "Termination/Rejection Threshold", as it is specified on the current task definition If this property is not specified, the default value is zero.

      When user task is in default mode, this method always returns 1.