How to terminate attended bot execution once we close the uiform by clicking on ‘X’

How to terminate an Attended bot execution once user click on ‘X’ on the UIform and closes the form. M using uiform(v25.4.3). So far when we click o ‘X’, it closes the form however, it continue to run/stuck as local trigger are still enabled.

2 Likes

I have the same query

1 Like

Hello @gurumayum.sharma,

follow these steps:-

  1. The Create Form activity has an output flag like FormClosedByUser.
  2. After the form closes, check this flag in an If activity.
  3. If True
    . Disable Local Triggers (if any).
    .Use Terminate Workflow to stop the bot.
  4. Else → continue normal process.

@gurumayum.sharma

Ideally you would give a button to close and have a trigger so that on close what all to be done can be done there

Cheers

1 Like

@Anil_G ,
@sagar.singh1
@Ramanathan_Balaji

Thanks for the response and the solutions.
However, m using new form versions where we don’t have create form activities. So cannot get flag value.
Also close form activity will close the form not stop the trigger nor stop the bot execution.

By the have found a way to stop the bot processing when we close the form by clicking on the X button.

We can use parallel activity on one side put local trigger and on the other side put a while loop. And keep checking if the form exist. If the form does not exist or closed, stop the trigger and break the loop.
So far this logics works well without any issue and also without compromising the processing time.

Thanks and Regards,
Jennish

2 Likes

Thanks @gurumayum.sharma . This Logic works great.

Perfect solution ..

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