CA Gen: Exit State generated code value from two different Models.
search cancel

CA Gen: Exit State generated code value from two different Models.

book

Article ID: 69392

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Host Encyclopedia Gen - Run Time Distributed

Issue/Introduction

Exit states in 2 models with same original object ID have different code generation values.

There is a common action block that was uploaded to two different models in the encyclopedia.  The source code generated for the common action block, when generated from Model A, has a different numeric value than the source for the same common action block when generated from Model B.  This causes a conflict at run-time for the application that is built from source generated from both models.  Would like to know why the Exit State values are generated differently from each model, and recommendations on how to resolve.

Have tried migrating the exit state from core to the satellite model but it does not update the code generation value in the satellite model exit state.

Resolution

The value for the Exit State is a unique value within the model. It starts out with an object id value, but the logic will add 100 to it until it has a unique value within all exit states within the model (not the encyclopedia). The approach of using code generated from one model in building an application in another model appears to violate the principles of consistency because what may be consistent (a CAB in your case) in one model may not be consistent in the other model. 

Normally, the approach of using code generated from one model in building an application in another model is not doable, the answer would be to generate the code from a model and keep that code separate from code generated in a different model. This will keep applications within models consistent.

But, if absolutely necessary, mixing code generated from more than one model requires manual verification that context is the same.

So it appears that you can take source from one model and build an application in another model, but it takes manual intervention to verify and change the EXIT STATE value to be correct.

 

The final and easiest answer was to migrate the EXIT STATE from the good model to the bad model, but first deleting the EXIT STATE in the bad model and then the generated code for the EXIT STATE values matched.