https://discord.gg/botpress logo
prompt updates value after calling action
# 🤝help
l
in my prompt, I am asking customer to enter the address, asking prompt to store the value in the variable, confirm the variable value back to the user and then call action to update customer details in an external system the sequence is not followed, it wont update the value in the variable until the Action execution is complete, thus defeating the purpose of the code in the Action as you see from the logs, Address to update: is empty, which is log from the Action function, while the variable has value, and the node has already moved on to the next part of the execution asking when to deliver I added a pause in the Action function and confirmed that the sequence is not followed, the variable is not updated till the function is not executed https://cdn.discordapp.com/attachments/1383397495572529295/1383397495786307644/image.png?ex=685bd3d1&is=685a8251&hm=380988bab337a51221c498bffef21b916dd6ad70e03f2ef218069bd8249a8b13&
p
I'm not sure I understand what exactly is the problem, is the action being run but later than you would want it to be or is it being skipped entirely, thus not executing the code it is meant to?
l
In the sequence of things delivery address is asked from the user and stored in user variable. then action is call to send the address to the customer profile in stripe however, it does the opposite, autonomous node will ask the customer for address, call the action and then update the user variable with the value. Hence, when the action is executing, the user variable does not have the value for it to update
p
Could you use a sub-workflow instead? That way it wouldn't be up to the autonomous node in what order the actions are executed.
l
ok, will check
This problem does not seem to be fixed, variables passed to action by the autonomous node are sent blank and not updated till the action execution is completed, thereby action receiving empty variables @prehistoric-airplane-85682 @bumpy-butcher-41910 @cold-motherboard-82208