How to Configure Communication Between Invoke Workflow Files and the Main File in UiPath?

Can someone explain in more detail how I can establish the connection between multiple Invoke Workflow File activities that are added in the Main file? I’m particularly interested in properly configuring new activities, especially the Use Application/Browser activity in the Main file, so it can effectively communicate with the other Invoke Workflow files.

Specifically, what should I fill in under the Properties tab of the Use Application/Browser activity in the Main file to ensure it works correctly? Additionally, what configurations should I set up in the individual files it needs to communicate with (e.g., Login.xaml, HomePage.xaml, CompleteForum.xaml, Search.xaml, etc.)?

Context: I have a Main file, and in the Sequence Do section, I’ve added multiple Invoke Workflow File activities: Login.xaml, HomePage.xaml, CompleteForum.xaml, Search.xaml, etc. I would like to understand how to configure the communication between these files and the Main file, including what properties need to be set for each component.

@Alexandru_Duta,

If you want to keep the browser or application open then set Open property of Use Application/Browser to Always and Close Property Never. This way your application/browser will be always open for all the workflows. Whichever workflow requires to take some action on it, just use Use Application/Browser. Just remember to set Open property of Use Application/Browser to Never and Close Property Never

In the Main file, for the Use Application/Browser activity, what should I fill in under the Properties tab, specifically in the Input/Output Element sections (Input element and Output element)? Should I create variables or arguments of type UiElement for these? Additionally, which approach is better and more efficient?

Similarly, in an invoked file, for example, Login.xaml, for the Use Application/Browser activity, what should I fill in under the Properties tab in the Input element and Output element sections? How should I manage these elements to ensure proper communication between the invoked workflows and the Main file?

In the Login.xaml file, for the Use Application/Browser activity, do I need to fill in anything in the Selector and Url fields under the Input section in Properties? I’m thinking these should be taken directly from the Main file. Should I configure them manually here, or is there a way for the values to be automatically passed from Main to this file?

@Alexandru_Duta,

In main Use Application/Browser declare a variable to hold a output variable like this.

Datatype of it would be - UiElement

Now you can pass this UiElement to any workflow.
In child workflow use this UiElement in Input element

Sample code for reference
BlankProcess7.zip (239.5 KB)

For the in_ChromeBrowser argument, should the direction be set to In? I’ve seen on other forums that the direction is sometimes set to In/Out. Which option is correct and why?

@Alexandru_Duta,

Use In/Out. I might have missed that.

Thank you so much!!!

1 Like

I have another question: in your example, in the Main file, shouldn’t the SubWorkflow - Invoke Workflow File activity be placed inside the Sequence Do section of the Use Application/Browser activity?

@Alexandru_Duta,

You can put it inside as well. I just placed it outside to demonstrate it can be outside as well.

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