How to invoke a XAML without using Invoke workflow file and I want to pass the arguments dynamically into the Invoked XAML from a file

How to invoke a XAML without using Invoke workflow file activity and I want to pass the arguments dynamically into the Invoked XAML from a File.

Thankyou in advance

Hi @Ganesh3,
Welcome to the Community!
There is no other way for invoking workflow without this activity.
For passing arguments from file there is a REFramework template which covers this topic nicely. Please check out our Academy for LVL3 - Advanced training :wink:

@Pablito

Thankyou for the answer,

Is there a possible way to call through any scripts like .net or any platform, or even by creating a custom activity that will accept n number of arguments dynamically from many csv files and then invoke the XAML.

Thanks in Advance

As we used to say: “Sky is the limit”. There are activities like invoke code or invoke powershell but invoking xaml file from the let’s say “outside” of project probably will fail as robot will don’t know anything about dependencies related to that file. That’s why UiPath uses .json file and .nupkg package (in case of Orchestrator), to have everything consistent.

Is it possible to Invoke XAML files using Invoke code activity? We have 1000 plus XAML files and currently we are using a case statement to invoke specific XAML file based on the value in the case statement.

For example if the value is “1” in case statement we invoke workflow “1.xaml”, it works fine but the problem is that I would need to build 1000 case statments in order to execute a specific xaml file depending on the value. If I can make use of concepts like reflection in .Net where we create an activator and pass the class name to create an instance of the class so that the class can be invoked. If UI path allows something like this, then it is very helpful and saves a lot of time designing the case statements.

Please assist.

Hey! You can use variables to create a dynamic file name of the invoked XAML file with the Invoke Workflow File activity today. What you can’t do at the moment is to provide a dynamic list of arguments to that file, if they require arguments.

We are planning to update the Invoke Workflow File activity to accept a dynamic list of arguments (possibly in 21.4), but as a workaround until then, you can design all of your invoked XAMLs (“1.xaml”…“1000.xaml”) to accept a single argument containing a Collection, List or something like that.

Other than that, there is no way of invoking .XAML files.