I have a workflow which basically opens notepad and logs if it runs into error. I’m using the example from UiPath. In the Main.xaml I have invoked the NotePad.xaml file. Now this NotePad.xaml file will fail. What i want is to log the name of the workflow file which failed. This will help in pointing out the workflow file which failed. Unfortunately i could not achieve this. Have uploaded the zipped solution here as well. exception.source just gets the name of the activity which was “Use Application: 1.txt - Notepad”.
Hi @Moshin_Ali_Khan - Am I correct in assuming that you simply want one log message at the ‘error’ level with the name of the invoked workflow file?
I think logging at entry and exit points could give you the information you need. However, you would still need to check the entire logs and derive insights from them. For example, if you get entry logs but not exit logs, you’ll know something went wrong. Additionally, you would need to set the log level to ‘error’ in the properties panel. Frankly, this might look odd since everything would always be logged as an error.
Hi to both of you - I know this isn’t the solution, but maybe it will lead to one. In the ‘catch’ block, if you use this, you can at least see the workflow file name in the Immediate panel.
@Julian_Muhlbauer i could not replicate the exception.Data.Item(“FaultedDetails”) when i try in the Immediate window. The “exception” variable does not pick when i type.
Hi @ashokkarale, yes, that’s the information @Moshin_Ali_Khan is looking for. However, @Moshin_Ali_Khan wants it to be captured with a log message of level “error.” I think that’s the difference.
@ashokkarale
That info just states when workflow starts successfully and ends successfully which is fine.
But when a workflow file fails I want the name/path of workflow file to be reported together with the error on the workflow file. Something like below which i already placed on the initial post. I’m not able to replicate the same with the example workflow attached in the initial post. And the logType if you see is “Default” which means not user defined but generated by UiPath.
@Julian_Muhlbauer
exactly tried that but could not locate the variable which holds the workflow file name and path details. Error message is captured though.