[Discussion] Routing in the piece framework #4633
Labels
🌟 announcement
this feature needs announcement
🌟 feature
new major feature
help wanted
Extra attention is needed
🥄 scooping
features that require scooping and designing
Description
Adding a routing based functionality in the piece framework which would act as a branching mechanism on the piece itself. A piece action like "Wait for approval" could be a great example of why routing could be useful, as it is an action that would have possibly 2 or more outputs which would have their paths directly from the piece (without the need to add a branch after the piece to handle the run based on the outcome).
The current method:
What we want to do:
Describe the solution you'd like
A solution would be adding an outcomes array in the piece action, which would then have the branching made according to the possible outcomes array and then returning a Map after running the piece action as key:value, where the key is the name of the outcome and the value is the result of that possible outcome.
Example for "Wait for approval" piece action:
We would like to know your feedback about this feature and how it would impact your experience using Activepieces.
In case you have a better solution for implementing routing in the piece framework, we are welcoming all suggestions!
The text was updated successfully, but these errors were encountered: