Expiry dates use in macros
Overview
This article describes how Expiry Dates interact with specific macros
state
The expiry date for a workflow state is set via the duedate
parameter.
The duedate
parameter accepts both date and duration formats, as well as Value References.
The duedate
for a state is set on the transition into the state. The time period to expiry is displayed in the workflow popup for the state.
Upon expiry of the duedate
fixed date or duration period
the expiry indicator in the workflow popup turns red
See: State expiry date
If the expiry date occurs whilst the page or blog post is in the state (not before, not after):
the
stateexpired
event is sent
If the expiring state has an expired
parameter, the workflow transitions to the state specified in the expired
parameter.
On the expired
parameter, the following workflow events are sent
statechanged
pagestatechanged
if the event occurred for a workflow applied to a pagenewstatechanged
if the event occurred for a workflow applied to a blog post
Watchers and participants receive a notification
If the expiry date is set as a date that is before the occurrence of the transition to the state
the state shows as expired but does not trigger any events or transition to another state
This is good reason to use duration periods for duedate
values rather than a fixed date.
Examples
-
Communardo Metadata for Confluence app — Using the Communardo metadata as value references in a workflow - including use in a custom condition for a trigger macro
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable
set-state-expiry
This macro can be used during an event (including expiry events) to set a new expiry date for a state.
It accepts both date and duration formats, as well as Value References.
Examples
-
Require Parameters on a state transition — Require workflow parameter values to be set before moving into a workflow state.
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable
-
Updating a mandatory reviewer for an approval assigned using a workflow parameter — Use workflow parameter as a mandatory assignee and the pageparameterupdate event to update the reviewer if the workflow parameter value changes
-
Using workflow parameters to create reviewer teams in a space — Using workflow parameters to create teams of users for use in approvals
task
The expiry date for a task is set via the duedate
parameter, which accepts both date and duration formats, as well as Value References.
Upon expiry
the expiry date and time is displayed in the tasks popup
If the expiry date occurs whilst the state is active (not before, not after):
the
taskexpired
event is sent
The expiry of the task event is displayed in the document activity report for the page.
If the state in which the expiring task has a taskcompleted
parameter, the workflow transitions to the state the taskcompleted
parameter specifies
On the taskcompleted
parameter transition, the following events are sent
statechanged
pagestatechanged
if the event occurred for a workflow applied to a pagenewstatechanged
if the event occurred for a workflow applied to a blog post
Examples
Filter by label
There are no items with the selected labels at this time.
set-message
When a set-message macro in a trigger has a duedate
parameter value and this expires
the message is removed
Examples
-
-
-
Use attachment events in workflow triggers — Triggering events when attachments are created, updated, or removed.
workflowparameter
This macro creates editable Value References which, depending on its edit
parameter setting, can be edited by space admins or users:
Be sure to specify the type
as duration.
Examples:
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable