Package com.orchestranetworks.workflow

# Class UserTask.CompletionStrategy

java.lang.Object
com.orchestranetworks.workflow.UserTask.CompletionStrategy

Enclosing class:
  UserTask

public static final class UserTask.CompletionStrategy extends Object
Defines the different strategies for work items completion.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final UserTask.CompletionStrategy`
  `ALL_WORK_ITEMS_ACCEPTED`
  Terminates the current task when all work items have been accepted.
  `static final UserTask.CompletionStrategy`
  `ALL_WORK_ITEMS_ACCEPTED_BUT_ONE`
  Terminates current task when all work items except one have been accepted.
  `static final UserTask.CompletionStrategy`
  `ALL_WORK_ITEMS_ACCEPTED_OR_ANY_REJECTED`
  Terminates current task either when all work items have been accepted, or as soon as one work item has been rejected.
  `static final UserTask.CompletionStrategy`
  `ALL_WORK_ITEMS_COMPLETED`
  Terminates current task when all work items have been either accepted or rejected.
  `static final UserTask.CompletionStrategy`
  `ANY_WORK_ITEM_ACCEPTED`
  Terminates current task as soon as one work item has been accepted.
  `static final UserTask.CompletionStrategy`
  `AT_LEAST_HALF_WORK_ITEMS_ACCEPTED`
  Terminates current task as soon as half of the work items have been accepted.
  `static final Set<UserTask.CompletionStrategy>`
  `IGNORE_REJECT_STRATEGIES`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final String`
  `format()`
  Returns a persistent identifier of this header.
  `static UserTask.CompletionStrategy`
  `getDefaultStrategy()`
  Returns the default task termination criteria.
  `UserMessage`
  `getLabel()`
  Returns the label associated with the task termination criteria.
  `static UserTask.CompletionStrategy`
  `parse(String flag)`
  Returns the `CompletionStrategy` for the specified string.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### IGNORE_REJECT_STRATEGIES

    public static final Set<UserTask.CompletionStrategy> IGNORE_REJECT_STRATEGIES

  - ### ALL_WORK_ITEMS_ACCEPTED

    public static final UserTask.CompletionStrategy ALL_WORK_ITEMS_ACCEPTED
    Terminates the current task when all work items have been accepted.

  - ### ANY_WORK_ITEM_ACCEPTED

    public static final UserTask.CompletionStrategy ANY_WORK_ITEM_ACCEPTED
    Terminates current task as soon as one work item has been accepted.

  - ### ALL_WORK_ITEMS_ACCEPTED_BUT_ONE

    public static final UserTask.CompletionStrategy ALL_WORK_ITEMS_ACCEPTED_BUT_ONE
    Terminates current task when all work items except one have been accepted.

  - ### AT_LEAST_HALF_WORK_ITEMS_ACCEPTED

    public static final UserTask.CompletionStrategy AT_LEAST_HALF_WORK_ITEMS_ACCEPTED
    Terminates current task as soon as half of the work items have been accepted.

  - ### ALL_WORK_ITEMS_COMPLETED

    public static final UserTask.CompletionStrategy ALL_WORK_ITEMS_COMPLETED
    Terminates current task when all work items have been either accepted or rejected.

  - ### ALL_WORK_ITEMS_ACCEPTED_OR_ANY_REJECTED

    public static final UserTask.CompletionStrategy ALL_WORK_ITEMS_ACCEPTED_OR_ANY_REJECTED
    Terminates current task either when all work items have been accepted, or as soon as one work item has been rejected.

- ## Method Details

  - ### parse

    public static UserTask.CompletionStrategy parse(String flag)
    Returns the `CompletionStrategy` for the specified string. The parameter has to have been generated by `format()`.
    See Also:
      - `format()`

  - ### getDefaultStrategy

    public static UserTask.CompletionStrategy getDefaultStrategy()
    Returns the default task termination criteria.

  - ### format

    public final String format()
    Returns a persistent identifier of this header.
    See Also:
      - `parse(String)`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getLabel

    public UserMessage getLabel()
    Returns the label associated with the task termination criteria.