Passing arguments from initAllAplications.xaml to Process.xaml / REFramework

Hello,
I am begginer to UIPath :slight_smile:

What I want :
How to pass a variable initalizing in InitAllAplications to Process.xaml ?

Advance Thansk,

1 Like

@MasterSinge

Declare a variable and the scope should be General Business Process as below

image

Now inside the Process create an Argument with the same Variable type and pass the variable from the outside of the Process

Hope this will help you

Thanks

@MasterSinge To pass the values between workflow you have to use arguments. Variables are used to pass the values only within the workflow . Coming to arguments, these are three types

In : If you want to pass any value as an input to any workflow then you have to define the argument type as In. So that the workflow accepts that value as an Input

Out : If you want to send any value out of the workflow then you have to define the type as Out in the workflow from where you want to send the value

In/ Out : If you want to perform both the operation meaning, passing the input value (In type) and also sending some value as an output (Out type). In this case you can use both this type

Passing variable to Process.xaml

  • Create an out argument in InitAllApplications workflow since you want to send the value out of this workflow
  • Create a variable in Main so that it holds the value that got from the above argument
  • Create another argument of type In, in Process.xaml sibnce it accepts some input from other workflow

Please find the sample workflow

Example.zip (4.6 KB)

Use the below video for more info

https://www.youtube.com/watch?v=zrbxNg8QSPg

Hey. @MasterSinge

You should follow the path like from child to parent workflow and then again to child.

InitAllApps(out arg) → Main(Variable) → Process(in arg)

Hope that helps

Thanks
#nK

1 Like

Usually if you want to pass a variable created in one workflow To another workflow then use Arguments

Here you will get to know how to use arguments

And to answer your question in specific
In InitAllApplication workflow you would have created a variable
As you want to pass it other workflow like Process xaml you need to pass it as arguments as already mentioned above

In InitAllApplication workflow if your variable named strvalu then your argument name should be out_strvalue

The name of argument should be same as varivale but we need to include the direction as a prefix to it
Like

If we are sending to other workflow out_varname
If we are receding from other workflow in_varname
If we want to send and receive from a workflow then inout_varname

In your case as you want to send out from a workflow first mention as out_varname

And in Process xaml as you want to receive that inside create a argument in process xaml as in_strvalue
And in invoke workflow file activity click on import arguments and there you can find the nee argument created as in_strvalue where pass the value as out_strvalue

Hope this would help you resolve this

Cheers @MasterSinge

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.