I am trying to get a value of an argument, but couldn’t. For example, there are 5 flows A,B,C,D,E. E is invoked in D, D is invoked in C, C is invoked in B and B is invoked in A. Getting more than 100+ values as arguments in A from B,C,D and E. i am able to get all those 100+ values from all the workflows but couldnt get one value alone in the A(Mainflow) from E. Couldnt find what the issue is. I have followed the same concept for all the argument values, not sure what is causing the issue for that one argument alone,. Argument directions(In/Out) i have mentioned accordingly based on the argument usages. Any idea folks on how to fix this.
–Kindly check whether that argument is in right argument direction type in E workflow
–Make sure that the argument assigned here to a variable in A workflow while invoking is what used inside the workflow of A, and not the argument from E
Check these and let know for any queries or clarification
you were almost done
Cheers @Raju23c
Thank you for the response palaniyappan.
- To avoid confusion i have directed most of the arguments as IN/Out.
- I have used the same name for both, variable name and argument.
Will this cause any reason for the issue?
Fine
lets go one by one
Though it wont make a great impact, keeping it safer with arguments passage between the invoked workflows, i would suggest like kindly use the direction as per the way it goes like IN means IN, OUT means OUT and dont include IN/OUT for all unless that argument its been used both inside and outside the invoked workflow.
Then
Sometimes this will lead to more confusion, so to avoid this
name the argument with directions first like this In_bool_Fileexists or Out_bool_Fileexists and name the corresponding variable without direction like this bool_Fileexists
which will avoid confusion between them to identify especially while debugging them
hope this would help you
Cheers @Raju23c
Hi @Raju23c
For arguments there are a couple best practices.
- Argument names should start with their direction. e.g. :
in_Argument
,out_Argument
, andio_Argument
. The prefixes make it easy to know what direction the argument is flowing. - I’ve found its better to specify if an argument is
in
orout
flowing rather thanin/out
, since this can lead to confusion.
Sure palaniyappan, thanks. i will use this way from now, but the other 100+ arguments i used in the same way and all works very fine from the main workflow A. Only one boolean argument is causing issue, is there anyway to find out the cause?
Thanks for the response @nlee1131, will use this way from now, but any idea whats causing that issue i mentioned.
Have you already assigned the value of out_ArgumentFromE
when calling it in workflow A?
Yes, i did that, more than 100+ arguments i have passed in OUT direction and all are working except that one argument.
Does it throw a nullReference exception or some other type of error?
No it is not throwing any exception.
The actual issue is with a boolean variable. In mainflow (A) it is initialized as false, in the E workflow it is changed to true, at the end of the process i still get that boolean value as false in workflow A. this is the issue.
So there’s an issue in workflow E where you’re changing the boolean to true?
Sorry for asking so many questions, just trying to understand.
No problem. I dont think there is an issue in workflow E, because more than 30 arguments goes out from E to A, no issues in any of those values, facing only issue in this.
Can you please check if you any variable and argument with same name in same .xaml file.
If above is the case then you will not get value out.
It should not be like below:
Just double check once.
Regards,
Ahtesham
@Ahtesham, yes i am sure, i have this issue for more than a month, i have checked multiple times, no other variables and arguments with same name.
I was just wondering if there was an issue when setting the argument to true in workflow E.
@nlee1131, no issue in that, i have logged it in workflow E, i could see that is changed to true.
Any chance you’d be able to post a screenshot of your workflow?
thats not possible actually, its very big. More than 30 workflows i have used in, just for an example i said A to E, it is actually from 1 to 30+.
What version of UiPath are you using?
I don’t know how to further help you. It’s possible @Pablito or @loginerror may be able to help you.
Best of luck!