https://discord.gg/botpress logo
Autonomous Node does not Save State of Workflow va...
# 🤝help
f
Hello, my autonomous node (AN) is supposed to store a value in a workflow variable and then call a subflow afterward. However, if I define the workflow variable as input to the subflow, it does not use the updated variable but its previous state. The AN only stores the workflow variable after its turn is completed. If I let the AI decide to define the inputs, it usually works fine. However, in my actual use-case, I'd like to manuall define the inputs. Does anyone know a way around this? Can I maybe access the main workflow's variables within the sub workflow (like "{{Main.workflow.test_variable}}"? Thanks for any help! https://cdn.discordapp.com/attachments/1375830593388150905/1375830593849266236/image.png?ex=68331d97&is=6831cc17&hm=b0056946a7a42fdd32769d72190590551957eb1aa2406d3203ee999b5a7168ad& https://cdn.discordapp.com/attachments/1375830593388150905/1375830594172354561/image.png?ex=68331d97&is=6831cc17&hm=ef9848750a1edd1f5684ac16ed9e3fdfbcc76bcb2760427b0434d54be2366c1c& https://cdn.discordapp.com/attachments/1375830593388150905/1375830594545520693/image.png?ex=68331d97&is=6831cc17&hm=29b9c7b7c86b0651b6ee8ffe51f4f9d9386a0d58c8a6fe06fbe024bbd2d79ad2& https://cdn.discordapp.com/attachments/1375830593388150905/1375830595065745539/image.png?ex=68331d97&is=6831cc17&hm=7b07324c0ccf06ec6831f7de700affea018e17a9cbb7fa894bc1de1a6c95590e&
p
Could you add an execute code card before the autonomous node takes over to manually define the input and assign it to a variable? Then in our sub workflow assign that variable instead of the one AI assigned. You can't access a different workflow's variable but if you use a large scoped variable than it will be accessible in all workflows.