Accessing Hidden Work Items

If a hiddenPeriod is specified when calling pendWorkItem (in WorkItemManagementService), the work item transitions to the PendHidden state, rather than Pended.

Functions that work on the Pended state (for example, reallocateWorkItem) cannot access the work item until either of the following occurs:

  • the hiddenPeriod expires.
  • pendWorkItem is called with a hiddenPeriod of 0. This cancels the current hiddenPeriod. (A negative hiddenPeriod duration or a date that is in the past have the same effect.)

When one of these events occurs, the work item reverts to the state it was in when it was hidden (Allocated or Pended), if it was hidden using pendWorkItem.

The duration of a hiddenPeriod can also be extended or reduced by calling pendWorkItem again with a new hiddenPeriod. The new hiddenPeriod overrides the existing hiddenPeriod and is calculated from the current date/time.

For example, suppose that pendWorkItem was used to pend an allocated work item at 14:30, with a hiddenPeriod of 30 minutes. If pendWorkItem is called again at 14:45 with:

  • a hiddenPeriod of 2 hours, the work item will remain hidden until 16:45.
  • a hiddenPeriod of 5 minutes, the work item will remain hidden until 14:50.
  • a hiddenPeriod of 0, the work item will immediately revert to Allocated state.
  • a hiddenPeriod of -5 minutes, the work item will immediately revert to Allocated state.