Deleting/renaming productions
I have a few productions that my developers named "TEST" and would ideally would like them to have more relevant names. Is there a way to rename a production? I tried exporting and deploying the production under a new name and it worked, but my new production is empty. Also I'd like to delete a production that is in a suspended state. When I attempt to delete the suspended production, I get errors that the production isn't stopped, so can't be deleted. I can't start it to clear the suspended status, either. I get the following error:
14:26:18.126:Ens.Director: Production 'CHSLI.TEST' starting...
14:26:18.126:Ens.Director: ERROR <Ens>ErrException: <CLASS DOES NOT EXIST>zStartProduction+40^Ens.Director.1 *CHSLI.TEST -- logged as '-' number - @' Set tSC=$classmethod(pProductionName,"OnStart",tStartTime) Quit:('tSC)'
14:26:18.126:Ens.Director: ERROR <Ens>ErrException: <CLASS DOES NOT EXIST>zStartProduction+40^Ens.Director.1 *CHSLI.TEST -- logged as '-' number - @' Set tSC=$classmethod(pProductionName,"OnStart",tStartTime) Quit:('tSC)' Production 'CHSLI.TEST' not started: ERROR <Ens>ErrException: <CLASS DOES NOT EXIST>zStartProduction+40^Ens.Director.1 *CHSLI.TEST -- logged as '-' number - @' Set tSC=$classmethod(pProductionName,"OnStart",tStartTime) Quit:('tSC)'Thanks, Lewis
Comments
Let's say you have this production definition:
Class Passthrough.Production Extends Ens.Production
{
XData ProductionDefinition
{
<Production Name="TEST" LogGeneralTraceEvents="false">
<Description></Description>
<ActorPoolSize>2</ActorPoolSize>
<Item Name="PassthroughOperation" Category="" ClassName="EnsLib.SOAP.GenericOperation" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
<Setting Target="Adapter" Name="HTTPServer">www.webservicex.net</Setting>
<Setting Target="Adapter" Name="URL">|</Setting>
</Item>
<Item Name="PassthroughService" Category="" ClassName="Passthrough.PassthroughService" PoolSize="0" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
<Setting Target="Host" Name="TargetConfigName">PassthroughProcess</Setting>
<Setting Target="Adapter" Name="EnableStandardRequests">1</Setting>
<Setting Target="Adapter" Name="Port"></Setting>
<Setting Target="Host" Name="OneWay">1</Setting>
</Item>
<Item Name="PassthroughProcess" Category="" ClassName="Passthrough.PassthroughProcess" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
<Setting Target="Host" Name="TargetConfigName">PassthroughOperation</Setting>
</Item>
</Production>
}You can change
<Production Name="TEST"
To any other name.
After recompile, new name should be displayed in SMP.
I think the class name and the production name need to match so in Studio you use Tools->CopyClass to get a class with the meaningful name. And then edit the Production Name in the XData.
Class MyPackage.MyMeaningfulName Extends Ens.Production
{
XData ProductionDefinition
{
<Production Name="MyPackage.MyMeaningfulName" LogGeneralTraceEvents="false">
<Description></Description>For the second question - if you are on a test/development system and you are happy to remove all information about the status and queued messages you can use:
do ##class(Ens.Director).CleanProduction()
but it will destroy information so it must never be used on a real system.
That worked great. Thanks guys
I did as mentioned by David and Eduard above. I have one small problem. When I go to edit a rule or constraint, I get the following error. It is still looking for my old production name: