Delaying transitions in Event Based Workflow
Transitions can be delayed for a particular amount of time or even wait for a certain date. This can be configured
on the Wait
property of a transition. The syntax for its value is duration|date:<expression>
. duration
is in
seconds while date
can be a GloopDate
or a timestamp. <expression>
can be a
Script expression and can use any transition inputs.
Examples
Groovy
duration:5
- waits5
seconds before invoking the transition.date:1735660800000
- waits forJanuary 1, 2025
.date:${myDate}
- waits formyDate
, a transition input of typeGloopDate
.
Bash
duration:echo 5
- waits5
seconds before invoking the transition.date:date -d "+${num} days"
- uses the GNUdate
command to wait afternum
days, wherenum
is a transition input of typeGloopInteger
.date:date -v+${num}d
- uses the BSDdate
command to wait afternum
days, wherenum
is a transition input of typeGloopInteger
.
Batch
duration:echo 5
- waits5
seconds before invoking the transition.date:echo 1735660800000
- waits forJanuary 1, 2025
.date:echo 2025-${m}-${d}
- waits for year 2025 of monthm
and dayd
, wherem
andd
are transition inputs of typeGloopInteger
.
JavaScript
duration:5
- waits5
seconds before invoking the transition.date:new Date('2025-01-01')
- waits forJanuary 1, 2025
.date:new Date(new Date().getTime()+(num*24*60*60*1000))
- waits afternum
days, wherenum
is a transition input of typeGloopInteger
.