Author: Yuri Gee
2 minute read time
In this article, I'll show you how to cancel in-progress SugarBPM workflows in bulk. Each of the following methods can be employed to achieve the desired outcome, whether using CURL or JavaScript. These techniques are handy since the standard Process Management List only lets you cancel processes one by one. Normally, you'd have to navigate to each individual process record to access the cancel command. Let's try to simplify this process and make it more efficient!
Example of CURL Command
Modern browsers like Chrome let you save network requests as CURL commands, which can then be replicated via the command line to repeat that network request. Cancelling a workflow is easily identifiable on the Network tab as a PUT request to https://<Your_SugarCRM_URL>/rest/v11_25/pmse_Inbox/cancelCases, which contains the process number(s) to cancel in its payload.
Example of JavaScript Code
The following code can be executed from the Browser Console (e.g., Chrome Developer Tools Console) while the page is open at https://<Your_SugarCRM_URL>/#pmse_Inbox/layout/casesList. In this example, process numbers 2516 , 2519 and 2521 will be cancelled.
Additional notes
Using JavaScript and CURL commands can be risky, as these operations can make updates to your system. Therefore, it is crucial to exercise caution when executing these commands and ensure that the correct process numbers are provided. Commands may vary from version to version and should be tested thoroughly to ensure they meet your requirements before being used in a production environment.
Enhance your CRM functionality with these features and feel free to share your feedback on your experience!