Hi,
I have a re-usable component that greets the user "Hello " + in_arg.
When I drag and drop it, I want to be able to provide the in_arg from my main. Please suggest how I can do this.
thank you,
Hi,
I have a re-usable component that greets the user "Hello " + in_arg.
When I drag and drop it, I want to be able to provide the in_arg from my main. Please suggest how I can do this.
thank you,
From Main, you can create a global variable for the input in_arg and use this global variable in the reusable component.
Thank you. Please suggest what is the normal way of passing parameterst to a re-usable component? Somewhere I read that we can set he input and output properties of the activity after drag and drop.
Thank you,
Hello @A_Learner ,
Assuming the reusable component have the “in_arg” argument direction as “in”
Follow the below steps:
Step 1: Use the Component in Main Workflow
GreetUser.xaml(your resuable component).Step 2: Pass the Argument
Click on the Import Arguments button in the Invoke Workflow File activity.
UiPath will detect in_arg from the GreetUser.xaml(your resuable component).
Provide a value for in_arg, for example:
“A__Learner”
Click OK.
Step 4: Run and Test
Check these steps and let us know your result.
Happy Automation!
Please try above steps I have mentioned.
also:
UiPath Tutorial | UiPath Tutorial For Beginners - Invoke WorkFlow File in UiPath | ExpoHub
Watch the above tutorial for the reference, how to use Invoke workflow with direction type.
If this solves your query kindly mark it as solution to close this case.
Happy Automation
For this I do not have to publish as a reusable library correct?
These steps look like regular invoke workflow activity.
For invoke workflow activity, I do not need to publish as a library I guess?
Where exactly I need to publish as a library?
Thank you,
Correct, you don’t need to publish. just save your project that you want to reuse, then use the invoke workflow. Just try the steps i have mentioned also watch the videos it has motioned all direction type (In, out, etc).
Yes, you can create a workflow to reuse the activities. For using variable values in multiple places, it’s a good practice to pass them across workflows. You can also declare variables as global if needed.
You can create a Library to reuse components across multiple projects. For example, if you have a login workflow that is used in multiple projects, it’s better to keep it in a Library.
Let say you created library A - with workflow W1.
Now in this W1, you can have in_arg and out_arg which takes in a value does the processing and returns a value(can be status value and anything)
You publish A library to the orchestrator.
Now, you created a project wherein you imported your library A as a dependency.
Now you would be able to see the workflow you created inside your library as an activity available in current new project.
Drag and drop it, you would see properties of this argument, 1 being input and 1 being output both corresponding to the arguments you defined in a library workflow.
Provide those input values and retrieve output like you would normally from any other activity.
Hope this helps.