Replies: 3 comments 3 replies
-
You can get the result of the approval at the next step (using We recommend adding a selectbox or similar and treat it in a branchone to have the desired effect, cancel will always stop a flow at that step. We may make removing the cancel button a configuration later. This documentation is pretty complete at https://www.windmill.dev/docs/flows/flow_approval |
Beta Was this translation helpful? Give feedback.
-
Aaahhhh, now I get it - the "actual approval" is not driven by the Can that form be edited? I could not find a link to the UI editor. If it cannot, I will go for an email that only has the "resume" URL (as "approved") and handle the non-approval manually. I saw that the "resume" URL points to a blank page, I guess that this cannot be edited either (even with a simple message "approved" or something like that)? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I was not clear. I meant "can it be edited completely". That is create my own page with form elements (an approval switch for instance, and some text, and an extra comment text field, ...), the same way as auto-generated forms can be edited.
I am aware of that, thank you for reminding that point. I would have control over the MTA (especially if we go for the Enterprise license) |
Beta Was this translation helpful? Give feedback.
-
I managed to write my first approval in Python, and then accept or reject it 🎉
I now would like to react differently depending on the result, but the exact flow is not clear to me.
As an example, I have a single approver and the approval step is:
This allows me to grab the JSON structure with the approve and reject URLs. When I call these URLs, the flow completes successfully (approved), or with an error (rejected).
What I would like to understand is
where the script is suspended
My approval will be rather typical: at the place where I
print(urls)
above, I would actually send an email with some content. My understanding is that the script will go pastreturn x
, and stop right before handing over the flow (and awaiting for the web call). Is that correct?how to retrieve the result of the approval
If the above is correct, how can I get the results of the approval? Is this based on a success/failure of the step? In which case a success would continue the script - but how can I catch the failure?
I am hoping for two branches - one for the approved step, and the other for the failed one:
The "resume" URL goes as expected. The "cancel" URL ends the whole flow with
I would like to be able to redirect the flow when the above happens
Beta Was this translation helpful? Give feedback.
All reactions