Disabling an Ensemble Production
I'm not saying that this is in anyway "best practices," but I'm in a peculiar situation where I need to restrict users from starting a "retired" Ensemble Production in a namespace that's been renamed. It's still an "Ensemble-activated" namespace; we need to keep it available for Ensemble Message Viewer access ... fortunately, only for a little while.
It's a bit of a hack ...
Open the Production class in Studio and add the following classmethod:
ClassMethod OnStart() As %Status
{
Return $system.Status.Error(5001,"THIS PRODUCTION IS DISABLED.")
}
A Production won't start if its OnStart() callback returns an error. And that's exactly what this OnStart() method does
Of course, if there are better ways to accomplish the same thing, I'm all ears!