Simple way of calling EnableConfigItem from within an Operations/Service
Was wondering if anyone had a simple way of calling ##class(Ens.Director).EnableConfigItem() within a Business Process or adding code to a Custom Service to start or stop the object?
The use case is that I have a Process that uploads a file into a external SQL table. When it is finished I want it to kick off another Service that does the processing of the data that it just uploaded. Once it is finished the response is sent back to the service and when the service receives the response from the process, I want to stop that service from running.
- Service A sends file to Process A to upload into SQL.
- Once Process A is complete, send command to start another Service B.
- Service B sends command to Process B, and when Process B completes it sends the response to Service B which will tell Service B to stop.
I could just add code within the Process and Service to call ##class(Ens.Director).EnableConfigItem() but is that the best practice?