Hi guys,
How can we remove a business host from a running production?
I've read and tested how to add it to a production, while when I try to remove it from the production with the following codes:
Set tSC = $$$OK
Set prodName = "CDRDemo.DemoProduction"
Set confName = "TEST1"
Set className = "Demo.LISClient.Operation.PatientOperation"
#Dim prodConf As Ens.Config.Production = ##class(Ens.Config.Production).%OpenId(prodName)
Set itemId = ""
&SQL(Select ID into :itemId from Ens_Config.Item
where Production=:prodName
and ClassName=:className
and Name=:confName)
Set confItem = ##Class(Ens.Config.Item).%OpenId(itemId)
Do prodConf.RemoveItem(confItem)
Set tSC = ##class(Ens.Director).UpdateProduction()
Quit:$$$ISERR(tSC) tSC
Quit tSC

.png)


