Hello,
I have Workflow A that sometimes might not work:
When Button Create A is clicked:
- Create an Object A
- Set custom state “new_obj_id” with value of “Result of Step 1 unique id”
- Create a “Workflow Log A” (object id column = “custom_state’s new_obj_id” )
- Error occurs
And I have Workflow B :
When Button Create A has an error running workflow:
- Create a “Workflow Log B” (object id column = “custom_state’s new_obj_id” )
- Delete an Object (unique id = “custom_state’s new_obj_id” )
Essentially Workflow’s A Step 3. and Workflow’s B Step 1. are the same - they take the Object’s A unique id value from the same custom state and create a “Workflow Log” object in a database.
The problem is, when I run these workflows normally, the Workflow Log A is created successfully, with object id column filled properly, but Workflow Log B is created with object id column empty! And what is the most weird to me: both are created properly when I click Button Create A in Debug Mode or Slow mode. Obviously, Object A is not deleted after running in normal mode, but properly deleted in debug mode.
Why is this happening? Is there a way to achieve what I need?
Is it a more general problem with how these “error handling” workflows work?
I’ve tried assigning the custom state to different elements on page and page itself.
I’ve tried adding “Pause before next step” in both workflows in various places.
I’ve tried assigning an arbitrary string in the custom state instead of unique id.