Is there a way to terminate the workflow, with a hotkey, without finishing the transaction in the other branch?

Is there a way to terminate the workflow, with a hotkey, but WITHOUT finishing the transaction in the other branch?

you can use terminate workflow activity

Thanks, but how can I invoke the terminate activity using a hotkey?

Is there any specific reason why hotkey is needed?

Yes. a Hotkey solution is needed because while the workflow is running in attended production mode, I may decide, mid-workflow, that I want to abort further processing.

While this can be done with a shortcut key defined in the UiAssistant Robot preferences, this method requires confirmation before the workflow stop (and that does not work for me).

Basically, I need a way to monitor for a hotkey, and when detected, pause and/or abort any and all subsequent activities. This should be accomplished on a per workflow basis (not globally).

Hi.
You can use Parallel activity with Condition property set to True,
in one side of parallel your workflow and other side an Trigger Scope activity
use an HotKey Activity into trigger, when the hotkey is pressed an Break activity could be throw to exit.

PD
Please. You can post after a bug about break in triggerScope?. Not work.

Workaround: use Throw activity whith dummy exception and check Trigger Scope activity property ContinueOnException to true.

Hello @grosner

You can use a hOTKEY trigger to acheive this. Please check the below doc. If you press any keys as defined it can directly call the Terminate Workflow activity and close the execution.

https://docs.uipath.com/activities/docs/hotkey-trigger-v-2

Thank you @Rahul_Unnikrishnan and @lepumin. Your solution works! As @lepumin indicated, the Parallel Misc. Condition must be set True.

Here is the workflow I use:

Additional Info:
Before setting this up, I was under the assumption that each Parallel branch had to finish before the next Parallel branch would execute. However, this is not the case.

It would be helpful for someone to add the relevant UiPath documentation link for the Workflow->Control->Parallel (pressing F1 on this activity takes me to the MS Parallel Class documentation).

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