About Xaml files

If we have three Xaml files, like Main.xaml, Main1.xaml, Main2.xaml. How we can know that from which xaml we are getting the data or exceptions. When we run the bot we will get the output from Main.xaml, if we use invoke workflow then only we will get remaining also. Other than Invoke do we have any other way to get the output of all

Hi @Teja_L

We have set as main in the project panel which process you re going to run!

Regards

1 Like

HI @Teja_L

Instead of the Run file click on Run in the ribbon
image

Regards
Sudharsan

It will process all the xaml files starting from main and return the output

Think so this is what you are asking

Regards
Sudharsan

This means we can run the one which we set as a main. If we want test results in the main how can we do that without using invoking.
And If you got an exception in the test.xaml, how you can know that the exception from the test.

Hi @Teja_L

Let say we have main.xaml and test.xaml in the same process we have to inkove the Work flow into main.xaml and we have to create arguments in test.xaml and we have to pass the variables in Invoke workflow!

Suppose any Exception occurs in the test.xaml we have to create it as outArgument exception and pass to the Invoke work flow file

That how it works !

Regards

1 Like

Hello,

To get the workflow details from the exception, you can use the follow the below code,

Create ‘FaultedDetails’ variable as object and assign the below value

exception.Data(“FaultedDetails”)

Then, add the below code in the log message activity

If(String.IsNullOrEmpty(Convert.ToString(faultedDetails)), “”, faultedDetails.GetType().GetProperty(“WorkflowFile”).GetValue(faultedDetails, Nothing).ToString)

Note: This will not work if the exception occurs directly in any activities in the try-catch activity, but, if the exception occurs in a workflow invoked in the try-catch, then you will get the workflow details.

Hope it helps :slight_smile:

2 Likes

Hello @Jerry1,

Can you share, if any sample example, please?

Thanks.

SampleException.xaml (9.0 KB)

1 Like