Question Duncan Samarasinghe · Nov 21, 2019

Is it possible to control multiple components in Healthconnect using a Cache class?

I would like to control multiple 'services' in Ensemble.

I would like the ability to switch them off and on.

My plan is to achieve this in a Cache class using ObjectScript.

Is this possible?

Any tips, starting points would be gratefully received.

Many thanks.,

Comments

Eduard Lebedyuk · Nov 21, 2019

UseEnableConfigItem method of Ens.Director class to enable/disable business hosts programmatically.

If you want to enable/disable/modify several ensemble hosts, it's better to update them without updating production first and after that
update production. Also add longer timeout on production update.

setsc = ##class(Ens.Director).EnableConfigItem("Item1", 1, 0)
write:'sc$System.Status.GetErrorText(sc)
setsc = ##class(Ens.Director).EnableConfigItem("Item2", 1, 0)
write:'sc$System.Status.GetErrorText(sc)
setsc = ##class(Ens.Director).UpdateProduction(600)
write:'sc$System.Status.GetErrorText(sc)

 

0