Ignore all other workflows except the very first one (purple). So here I:
Get the local storage value called Token (works)
Run a javascript to bubble that uses the token and fetches the boolean yes or no (it also works, its value called auth does change after this action is run, I can see on my page when I debug)
However, on step 3, when I set the state of this page (called Authenticated) to the value of the auth (set from the javascript to bubble in step 2 and again I can confirm that value changes), steps 4 and 5 read the state of the page Authentication as empty and thus ânoâ.
Why is that? I feel like actions run at the same time and whatever values they read (steps 3-5) they do not then dare to read the new value.
Note:
I know that I can just delete the step 3 and run step 4 and 5 by just reading the value auth from step 2 but I tried that too and it failed the same way
So I just tested another thing⌠If I create a custom state for the javascript to bubble element and set to true after it ran and make all other subsequent steps to run only on that state to be true then they work as I presume they read the values only after the state is set to true
It is very possible youâre running into an issue with the synchronous workflow steps - these steps donât necessary function one after the other, in the order you have them laid out. Your step 3 âset stateâ is most likely setting the state with the data that has yet to be updated in step 2. Is it possible to add an âOnly whenâ condition to step 3, with the condition being âresult of step 2â or similar?
Step 2 is client side action, he needs the value from JavascriptToBubble element, not sure if that fires and Event like plugins do? If not need a âWhen condition is trueâ and trigger it when the state changes somehow