Invoke workflows and arguments from one invoke to other


I have problem with all of the arguments passing trough. I have made my project with workflow witch inludes Main (creates variables) then it invokes web automation where it uses those variables as arguments. But it seems that all of the arguments wont go to the invoked sub workflow. Is there some amount of how many arguments you can pass to invoked workflow. Now i am passing 8 arguments. Then on this web automation i call different sequences belonging to that, but somehow the arguments wont pass.

But most interesting is that it is only one argument which wont get passed. I check that the arguments came at first in the beginning of this web automation workflow. (all fine) and then i will try pass them to sub workflow and one of them is empty. I tested also to put them just before i pass them to this sub workflow in this web automation workflow.

All arguments came with direction In and they are string. And the worklow goes Main - Web Automation (gets 8 arguments) - Sub workflow (gets 6 from previously passed arguments but only 5 have values)

Did anyone else had this problem.

Check if you have the naming correct on both ends.
Also check if you have a Variable with the same name - what will be passed is the most inner scope “thing” that matches the name. So if you have an Argument “URL” and a variable “url”, even if you pass “URL” as argument value, what will actually happen is “url” will be passed, since Variables are always considered more local than Arguments.

Yeah my argument are named as same as the variable. Somehow I got it working by removing try catch around it but still it is mystery why there was only one argument that didn’t came through. So I continue investigating this. But it works but I would like it to work also inside my try catch.

Hi !

I have the same kind of issue here.
UiPath 2016.2

We want to send WorkbookApplication variable from main workflow to a sub-workflow.
This operation woks well from main program to first sub-workflow level. But this operation didn’t work from 1st sub-workflow to 2nd sub-workflow.

I test my WorkbookApplication variable with a test Message Box : IsNothing(WbExcel).ToString.
Before calling sub-workflow this test is False, and inside subworkflow, the same test is True.

Variable name is always WbExcel.

Is it a known issue ?

Best regards,

From the top of my head it sounds like a scope problem.

Try using local variables in your workflow include file. I use to prefix these with _.
In the Arguments dialog you can arrange _localVar with the VAR from the main routine.
Make sure you don’t have (or mix) variables and arguments with the same name. variables are local to your workflow file (the callee), and argument com from the parent rutine (the caller).
Make also sure that the _vars are scoped to the workfile, not the main process.

This should allow you to re-use included workfiles within eachother.