In this post, we are going to resolve the issue “Cannot delete device as it is part of active bot deployment” that you might be facing frequently when your BOT is stuck in In Progress Stage and you are unable to move it to history.
This solution will also solve the issues below if you are using a Community or On-Prem Control Room.
- BOT stuck in In Progress Stage and not able to move it to history
- BOT stuck in Pending execution Stage and not able to move it to history
- Cannot delete device as it is part of an active bot deployment
Post Contents
Error: Cannot delete device as it is part of active bot deployment
While running your bot it might happen that the previous bot run was stuck and now you are unable to run the bot anymore.
Sometimes the error doesn’t go away even after you uninstall the bot agent and re-install it.
When you try to delete, you are unable to delete your device as well since it’s a part of active bot deployment.
[Solution]: Cannot delete device as it is part of active bot deployment
To resolve the issue, follow the below instructions and reset the device.
Note:
- You need to have postman with access to the cloud
- This API can be accessed only by the admin. In the case of the community edition, the “CE_bot” user can access it.
Step1: Go to the Postman and Authenticate
Method: POST
URI: https://<Control Room>/v1/authentication
Body
{ “username”: “<Admin user>”, “password”: “<Admin Pass>” }
OR
{ “username”: “<CE user>”, “password”: “<CE Pass>” }
Step2: Copy the token generated between quotes “” as shown
Note: For SSO-based user login, use the API Key instead of the password to generate the Authentication token.
Step3: Reset the device
Method: POST
URI: https://<Control Room>/v2/devices/reset
Headers:
KEY: X-Authorization
VALUE: <Token copied from step 1>
Note: Remember to set the key as “X-Authorization” instead of “x-authorization” if the lowercase doesn’t work.
Body
{ "deviceIds": { "ids": [deviceID] } }
For example, if my device id is 156079 then the API body will look like the below:
{ "deviceIds": { "ids": [156079] } }
Finding Device ID in A360 Control Room
You can get the device ID by going to Control Room> Devices > Click on the device name or view device > in the URL, you’ll see the device id.
https://<Control Room>/#/devices/mydevices/<DeviceID>/view
If the device has been removed from the Control Room, and you don’t know what the device ID is, or it requires to be done for multiple devices, you can use the below text in the body of the API call mentioned above.
{ "allDevices": { } }
Additional Information
Reset API can do the following actions for all devices in the tenant or for a specific list of devices
- Terminate all running executions
- Release all usages
- Reprocess the queue for the device
As per the JSON format, the ‘\’ is considered an escape character. Therefore, use one more “\” (‘\\’ in place of single \) so that it is not considered an escape character.
[Youtube Video] Cannot delete device as it is part of active bot deployment
You can watch the video on resolving this error step by step.
Final Thoughts
I hope this post has been helpful, and that you can resolve the “Cannot delete device as it is part of active bot deployment” error. If you have any questions or comments, feel free to leave them below.
To read posts on Automation Anywhere A360, check this link here 👉 Automation Anywhere A360 topics
Happy Automation!