Forum Academy Marketplace Showcase Pricing Features

Break statements in workflows

It would be nice to have a break action that would terminate further processing in a workflow. This would be useful for convenience (less conditions to set downstream) and for performance (less conditions to check).

5 Likes

Like an IF-THEN-ELSE-END IF statement?

Cus that would be hecka cool

1 Like

I guess you can kinda do that by now using the WF blocks running conditions and custom events (run event only if Condition=true).
But yes, this was one of the first things I felt like missing once I started tinkering with WF.

While that would be a game changer, I’m thinking of a function similar to break statements that will exit loops and if blocks.

I currently do that, but it would be nice to have break statements as it would mean less conditions I would need to maintain and less comparisons that need to be made during runtime. It also makes the workflow more human readable rather than having to check all of the conditions downstream.

1 Like

I would recommend making use of the Custom events trigger.

For example, your current workflow has 5 steps. Instead, create a “break” using a Custom event after the relevant workflow event (Ie. if Workflow Event 3 criteria is satisfied, trigger Custom Event that does Events 4 and 5).

1 Like

I currently do this extensively. What I hope to achieve though is better performance and improved convenience.