Just wondering if you could help me with an issue. Indeed, I created a workflow in a workflow (in the example, once a contract is validated, it generates a certificate (step 10). My issue is that it seems that data are not pushed to the certificate so it generates a pdf without data inside. Any idea why would be welcome !
Itâs probably because the execution rules that bubble uses for the actions in your workflow.
From the execution rules documentation:
Backend workflows are triggered as soon as the workflow is triggered, independently from steps. For example, a âSchedule API Workflowââ action will be triggered as soon as the workflow is triggered even if it is placed last in the workflow action sequence.
Custom events run in sequence, not parallel. If Workflow 1 triggers a custom event that starts Workflow 2, Workflow 2 will complete before the remaining actions in Workflow 1 run.
Basically if you need to wait the full execution of some actions you need to create separate custom events and trigger them in sequence.
A backend custom WF can only be trigerred in the backend. To trigger a WF from Frontend, you need to create an api Wf in backend.
In your case (first screenshots) if the data is not coming, add a delay in your schedule pdf wf (and watch for logs to see whatâs going on - I always create a âadmin-logâ table in my db, and when I donât understand why data doesnât come somewhere, I add a âcreate an admin logâ where I store data to see if it s here or not)
You have a backend workflow that you schedule from the frontend.
Your backend workflow is modifying data + scheduling another workflow that requires that data.
Move the logic that modifies data in a custom event, move the logic that requires the data in a second custom event.
From the first backend workflow trigger the 2 events one after the other, they will run in sequence.
The logic from the frontend remains unchanged: you still schedule the first backend workflow.