habip_okcu
habip_okcu11mo ago

Can the approval process be done with another workflow?

I have a form consisting of 2 steps, and I also have a script that checks whether the first form is filled. I will access both forms in the workflow; if the first form is filled, I want to print the second form. However, doing this manually won't be practical for the later stages of the process. That's why I want to write the script that checks the form's status as an approval and automate this approval process in another workflow.
6 Replies
rubenf
rubenf11mo ago
just to be sure, by workflow here you mean windmill's flows right? we will announce today decision trees which might solve some of your issues. Wait tonight for the announcement and maybe it solve your issue
habip_okcu
habip_okcu11mo ago
Yes windmill's flows. okay I'm waiting I couldn't find an answer to my question. I think I didn't ask the question very clearly. What I'm looking for is automatic approval. I have an approval step in my flow, and I want it to decide whether the flow should continue or not based on a script check. Is this possible?
Sindre
Sindre11mo ago
Why do you need approval for that? I do not think you need it. you can use a branch and run the script and use the result to either to some processing or skip it and go to end of flow?
Tiago Serafim
Tiago Serafim11mo ago
If you need that another script, from outside your currently awaiting_approval_flow, to approve said flow, you can use Windmill API https://app.windmill.dev/openapi.html#/operations/resumeSuspendedJobPost
habip_okcu
habip_okcu10mo ago
I need such a solution for the following reason: the part of the flow before approval will iterate like a loop. When I place a branch, I need to rerun the flow and manually access the result each time. What I'm planning to do is to use two flows. One will constantly monitor the status (to be placed within schedules), and the other flow will be waiting until the desired result is received. When the desired result is obtained, it will complete its task. I'm trying to organize a multi-step form. To explain it on an example, the data related to these steps will be dynamically checked in the database. For instance, the user will have one week to fill out this form, and within that week, this checking process will occur continuously. For example, it will run every 5 minutes, and if all the steps of the form are completed flawlessly, it will grant approval for the main flow to proceed. If I rephrase my question like this, it should be fine: Do you have a solution for the form scenario I described?
Sindre
Sindre10mo ago
What about having the script using retry logic and fail if not ok? Then have the retry logic run every 5 min for a week?