Skip to content

Home

Development

IDEs

API Explorer

Delaying transitions in Flux

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 - waits 5 seconds before invoking the transition.
  • date:1735660800000 - waits for January 1, 2025.
  • date:${myDate} - waits for myDate, a transition input of type GloopDate.

Bash

  • duration:echo 5 - waits 5 seconds before invoking the transition.
  • date:date -d "+${num} days" - uses the GNU date command to wait after num days, where num is a transition input of type GloopInteger.
  • date:date -v+${num}d - uses the BSD date command to wait after num days, where num is a transition input of type GloopInteger.

Batch

  • duration:echo 5 - waits 5 seconds before invoking the transition.
  • date:echo 1735660800000 - waits for January 1, 2025.
  • date:echo 2025-${m}-${d} - waits for year 2025 of month m and day d, where m and d are transition inputs of type GloopInteger.

JavaScript

  • duration:5 - waits 5 seconds before invoking the transition.
  • date:new Date('2025-01-01') - waits for January 1, 2025.
  • date:new Date(new Date().getTime()+(num*24*60*60*1000)) - waits after num days, where num is a transition input of type GloopInteger.