Hi Team,
I would like to request a feature that would hugely benefit activepieces flexibility and ease of use.
To my knowledge it is not covered by the loop or the branch function.
It would be a piece that would simply allow the user to define a jump to anywhere else in the flow (either fixed like “step 2” or potentially even dynamic to another piece with a name of XYZ)
Here is a use case.
trigger flow by a webhook with a typical customer email request
forward that request to an openAI or other LLM tools to generate an answer
generate an approval link
have that combination of the user request and the LLM answer be sent via slack or email to the customer rep to check quality with approval a links
use a the branch piece based on the answer of the customer rep (accpet/ deny) to branch into two paths.
if LLM answer is approved, send the reply back to the customer.
if LLM answer is denied send the flow back to step 2 to redo the re-generate a different LLM answer.
Hopefully that’s easy to understand, that practically is a feature that all the zapier, and makes of this world naturally have.
This is just one use case, there are a ton of others, too.
Hi,
not really. What your name suggests would only be one very specific narrow case of what a jump function could do.
Jumping would also allow to a jump ahead (basically skipping parts of the flow, e.g. based on a condition) or into a parallel flow (e.g. if a branching condition was met in the meantime)
Also, I do not see a “loop until approved” piece im my account. And in many cases you would not want an “until approved” which might lead to an endless loop. But even there you could use a jump to function like:
have a loop function
have a counter in the loop counting up the loops cycles.
have a condition in the loop “if counter =3 → jump out of the loop to step x”
This sounds like the “goto” instruction from the ancient days of programming. Without proper control flow mechanisms it’s definitely super useful, but it unfortunately inevitably leads to spaghetti
See for example c++ - What is wrong with using goto? - Stack Overflow.
In the context of Activepieces I’d be particularly worried about the “variable passing” mechanism. With goto the order in which steps execute can essentially be random, which makes it very easy to make mistakes that are very difficult to track down and near impossible to check for upfront.
I’d strongly prefer adding proper control flow mechanisms instead, just like regular programming languages have done over the years.
What could this do that the current branch piece can’t?
I’m not sure I fully understand this one, but it sounds like a function/subroutine mechanism, which I’d absolutely love to have.
This sounds like a while-loop, potentially with break if we’re feeling fancy.
This would be a for-loop, though a while-loop can do this too.
Edit: if non-enumerating loops are added they need some kind of “max iterations” limit to avoid infinite loops and/or racking up costs from malicious user input, thereby potentially DOS’ing your automations (or bank account).