Question
· Dec 16, 2022

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.

so...

  1. Service  A sends file to Process A to upload into SQL.
  2. Once Process A is complete, send command to start another Service B.
  3. 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?

Product version: Caché 2018.1
Discussion (8)2
Log in or sign up to continue

We had the case that the ACK of an operation always changed in case of an error and the following messages always threw an error although everything was ok. A restart has then always helped until the next error.
Solution was to catch the ACK in the router and check it. If the error was found a TRACE was executed in which ##class(Ens.Director).EnableConfigItem() was called.

Return Value is the status ;)