Is it possible to deactivate a business process through a script. I ran an insert script to insert a record in the table SysProcessDisabled. But that did not deactivate the process. Is there any other way to do this via a script?
Like
Hello Payal Motwani,
Deactivating business processes via a script task is not recommended.
If you really need to do it, send a POST request to the endpoint: [CreatioURL]/0/ServiceModel/ProcessEngineService.svc/DisableProcess?sysSchemaId=00000000-0000-0000-0000-000000000000
The sysSchemaId parameter is the process's SysSchemaId, found in the corresponding table:
SELECT "Id" FROM "SysSchema" WHERE "Name" = 'UsrNameOfYourProcess'Before disabling the process, decide how to handle any currently running instances - you may want to cancel them.
To check the count of running processes, send a POST request to [CreatioURL]/0/ServiceModel/ProcessEngineService.svc/GetRunningProcessesCount with the payload:
{
"countSpecifiedVersion": false,
"managerName": "ProcessSchemaManager",
"schemaId": "00000000-0000-0000-0000-000000000000"
}To cancel all running instances of the process, send a POST request to [CreatioURL]/0/ServiceModel/ProcessEngineService.svc/CancelExecutionBySchemaId?schemaId=00000000-0000-0000-0000-000000000000