Can I determine inside Ensemble Job that Ensemble tries to shut down the job

Primary tabs


ENSEMBLE may have some signal mechanic.

BUT at Caché level you still have Special Variable $HALT as the last chance handler.
all details

Most important: 

If you have $HALT set and also have code defined for ^%ZSTOP when a HALT is issued, the $HALT is executed first. $HALT can prevent the termination of the process, if its halt trap routine does not contain a HALT command.   !!!!

Hi Eduard,

I don't think you can do this in onProcessInput but when the corresponding job dies, it will definitely call onTearDown. 

So you can try overriding this method to execute something when Business Service is shut down.

I never tried this, but I think this should work.