Possible bug with Launch workflow interactive

activities
issue

#1

Hi,

Note : This issue happens only with launch workflow interactive and does not happen with launch workflow file activity

Im using UIPath Studio version 2017.1.6522. I have main workflow with try catch calling workflow1(using launch workflow interactive). workflow1 itself does not have its own try catch loop. I throw an error inside worflow1 and catch it in the try catch loop of the main workflow. When i do that i see an error log written in the output pane with the throw exception from workflow1.Why is the error being logged in output pane even though there is a catch block in main to catch the error ?. It should be written only when the user prints the error and not automatically. This bugs me as the log is written to elastic with error log level

Regards
Kiran


#2

(partial guess)
LaunchWorkflowInteractive starts a separate process. When exception is bubbled up through it, it reaches top level of that process and since it is not handled that robot process logs it. Then result of the invoke is passed back to calling process and exception is rethrown higher.
Since calling process has a Try-Catch and handles it, no automatic logging happens.

This is just a theory, but it could be checked by chaining a couple LaunchWorkflowInteractive or InvokeWorkflowFile with isolated flag. I wouldnt be surprised if it will get logged on each process border.


#3

Same is happening when Isolated property of Invoke workflow file is checked. It looks like .net multi-threading expected behavior.
Note : It is not recommended to use Launch workflow Interactive activity instead you can use Invoke workflow file with Isolated property.


#4

Not recommended why? It’s standard activity since forever, why do you say it shouldn’t be used?
Especially if the behaviour is the same with both in this situation, as you said yourself.


#5

The interactive session is already opened when the robot executes. Launch workflow Interactive activity was added when you had the ability to execute a process in a batch mode, in session 0, which is not interactive and you needed to switch to interactive mode for UI automation. From 2016.2, all processes are by default executed in interactive sessions.