Flow Control

Flow order control.

Available actions:

Action Handler: Sequential steps execution

Run steps one by one, if any of steps fail - chain of execution will stop on it.

Note: parameters for each action will be cloned. Meaning each action will start its own branch unless shareParameters option is used.

ID: com.fireblink.fbl.flow.sequence

Aliases:

  • fbl.flow.sequence

  • flow.sequence

  • sequence

  • sync

  • --

Example 1: Base Declaration

Example 2: Detailed Declaration

Warning: shareParameters usage is considered an anti-pattern

Action Handler: Parallel steps execution

Run all steps in parallel. If any of steps will fail - it will not affect others. However parallel step itself will be marked as failed.

ID: com.fireblink.fbl.flow.parallel

Aliases:

  • fbl.flow.parallel

  • flow.parallel

  • parallel

  • async

  • ||

Example 1: Base syntax

Example 2: Alternative syntax

Action Handler: Attached flow

Allows to reference external flow by its pass. Helps to logically split big flows for better organized structure.

ID: com.fireblink.fbl.flow.attachment

Aliases:

  • fbl.flow.attachment

  • flow.attachment

  • attachment

  • @

Example 1: Specify flow file

Example 2: Specify directory

Example 3: Specify url to download a package

Example 4: Specify target inside the package

Example 5: Custom HTTP headers

Action Handler: Repeat flow

Repeat action multiple times.

ID: com.fireblink.fbl.flow.repeat

Aliases:

  • fbl.flow.repeat

  • flow.repeat

  • repeat

Example:

Action Handler: Retry flow

Retry action multiple times till it passes or reach max failure attempts.

ID: com.fireblink.fbl.flow.retry

Aliases:

  • fbl.flow.retry

  • flow.retry

  • retry

Example:

Action Handler: For Each

Allows to execute action for every item in the array or key of an object.

ID: com.fireblink.fbl.flow.foreach

Aliases:

  • fbl.flow.foreach

  • flow.foreach

  • foreach

  • each

Example: Array

Example: Object

Action Handler: Switch flow

Allows to run action based on some condition

ID: com.fireblink.fbl.flow.switch

Aliases:

  • fbl.flow.switch

  • flow.switch

  • switch

  • if

  • ?

Example:

Action Handler: While

Runs action till condition is successful or not (based on configuration).

ID: com.fireblink.fbl.flow.while

Aliases:

  • fbl.flow.while

  • flow.while

  • while

Example: Positive condition check

Example: Negative condition check

Action Handler: Sleep

Sleep for a given amount of seconds.

ID: com.fireblink.fbl.flow.sleep

Aliases:

  • fbl.flow.sleep

  • flow.sleep

  • sleep

Example:

Action Handler: Try - Catch - Finally Flow

Allows to run sub-step in isolation causing its failure to be ignored by parent step. Optionally catch and finally steps can be invoked.

If catch or finally step block will be failed - this step will also be marked as failed even try block passes successfully.

ID: com.fireblink.fbl.flow.try

Aliases:

  • fbl.flow.try

  • flow.try

  • try

Example:

Action Handler: Template

Run action based on dynamically constructed template. This is handy as you generally can not dynamically construct YAML with EJS template inside most of the actions.

E.g: following is invalid:

It will fail as upon processing everything that goes after something will be treated as string, causing to produce following action:

But there is a template handler that can help you with that.

ID: com.fireblink.fbl.flow.template

Aliases:

  • fbl.flow.template

  • flow.template

  • template

  • tpl

Example:

that will generally produce:

Action Handler: Virtual

Allows to create virtual action handler for another action (that can be represented as one of the flows).

ID: com.fireblink.fbl.flow.virtual

Aliases:

  • fbl.flow.virtual

  • flow.virtual

  • virtual

Example:

Then you can reference your generated handler like any other:

Action Handler: Invoke

Allows to execute action passed as parameter. Can be used in pair with virtual to pass flow actions as parameters and create reach execution flow patterns.

ID: com.fireblink.fbl.flow.invoke

Aliases:

  • fbl.flow.invoke

  • flow.invoke

  • invoke

Example:

Action Handler: Error

Throw error upon execution with given message.

ID: com.fireblink.fbl.flow.error

Aliases:

  • fbl.flow.error

  • flow.error

  • error

Example:

Action Handler: Echo

Print message to console

ID: com.fireblink.fbl.flow.echo

Aliases:

  • fbl.flow.echo

  • flow.echo

  • echo

Example:

Action Handler: Void

Action handler that does nothing. Main usecase to bypass limitations of other action handlers that require action handler to be provided as an option, but you might not want to do that for some reason.

ID: com.fireblink.fbl.flow.void

Aliases:

  • fbl.flow.void

  • flow.void

  • void

Example:

Last updated

Was this helpful?