Accessing Hidden Work Items
If a hiddenPeriod is specified on a pendWorkItem or closeWorkItem operation, the work item will transition to the PendHidden state, rather than Pended.
Operations that work on the Pended state (for example, reallocateWorkItem) cannot then access the work item until either of the following occurs:
- the hiddenPeriod expires.
- a further pendWorkItem operation is specified with a hiddenPeriod of 0. This cancels the current hiddenPeriod. (A negative hiddenPeriod duration or a date that is in the past will have the same effect.)
When one of these events occurs, the work item either:
- reverts to the state it was in when it was hidden (Allocated or Pended), if it was hidden using pendWorkItem.
- transitions to the Pended state, if it was hidden using closeWorkItem.
The duration of a hiddenPeriod can also be extended or reduced by issuing a further pendWorkItem operation 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 a further pendWorkItem is issued 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.