set-state-expiry macro

Overview

The {set-state-expiry} macro is used to add or replace the expiry date of the active workflow {state}.

Where to use it?

Optional.

One {set-state-expiry} can be put in a {trigger} macro.

Parameters

Parameter

Required

Default

Notes

Ver

duedate

(tick)


Duration until state expiry:

    • Format can be either:
      • Explicit date in the format: YYYY-MM-DD HH:mm (v4.12+)
      • ISO 8601 Duration Period
    • Supports Value References
    • See Expiry Dates for more information
4.9

Events

The following Events are associated with state expiry:

  • stateexpired

Value references

The following Event references are associated with state expiry:

  • @duedate@
  • @expirydate@

Example

In this example, when the workflow transitions in to the Start state, it's expiry date will be set to a Period of 1 Week (P1W). Upon expiry, the workflow will transition to the Stop state.

{workflow:Expiry}
   {state:Stop|submit=Start}
   {state}
   {state:Start|expired=Stop}
   {state}
   {trigger:statechanged|state=Start}
      {set-state-expiry:duedate=P1W}
   {trigger}
{workflow}

All examples

Filter by label

There are no items with the selected labels at this time.

See also

Workflow Authoring Guide:

User Guide: