Hello people, I have a question about using AS400 terminal connection

I have made a workflow A , for putting in some standard data into AS400 and I INVOKE this WORKFLOW from another workflow, workflow B. It runs but instead of running workflow A and then B, it runs A and then runs A again, but now with the input of workflow B.
Do you have any idea why is this confusion happening and how to fix it ?
Thank you!

Is your workflow something like this?image
Check if its getting into some error try catch block , may be the workflow A is getting into some error and due to retry or error handling (REFramework) the same workflow A is being run again and before that variables got changed.
You can try to debug from uipath, put some breakpoints at the point where Workflow A is first initialised(invoked) and check.Since during debugging execution time will be longer you can even add a message box at particular points and run the workflow to check if that particular point is reached or not.
It will be great if you can add some more details so that we can solve your issue.
Thank you