I am using the Toolbox plugin to run JavaScript and store the returned JSON as text inside the database.
Here is the flow:
- Button clicks.
- Run JavaScript and store the response in a state.
- Pass the state to a backend workflow.
- Backend workflow updates the database.
Steps 2 and 3 are executed in their own Custom Events to ensure they are synchronous.
The issue is that the value stored in the database is empty on the first try. However, when I retry, the value is successfully stored.
Could it be that Run JavaScript takes more time to execute, causing the backend workflow to trigger before it’s completed?