top | item 46236104

(no title)

brene | 2 months ago

How does it deal with loops? I’ve often see workflow builders struggle at that?

discuss

order

waleedlatif1|2 months ago

for loops we use two sentinel nodes with a backwards edge, and before each iteration, we check the condition and update loop variables.

  sentinel -> body -> sentinel (condition with backwards edge to first sentinel)
in the UI, this is just represented as another block, and depending on the varying types of loops you can either define a collection or the number of iterations

Natfan|2 months ago

and specifically nested loops. if you're spinning up full runtime copies for each loop, you're gonna have a hard time

waleedlatif1|2 months ago

at the moment, we don't support 'loops in loops' on the client-side, but not for any other reason asides from it becoming confusing for users. since we don't actually make copies for each loop, it wouldn't be a performance issue.