LSPS documentation logo
LSPS Documentation
Updating Model Instances

The LSPS model update mechanism allows you to update model instances on runtime so they use a new version of the underlying model for their execution:

A model instance is created based on a model. The instance itself holds only runtime data, such as, which element is currently executed, values of variables, model instance ID, etc. The static data, such as the BPMN flows, remains in the model. Using the model update feature, you adapt the runtime data and "switch" the model for another model. The execution of the model instance then continues according to the new model.

Before you can perform the "switch", you need to define how to adapt the runtime data so the model instance can use the new model; for example, if you change the data type of a variable from String to Integer, you need to define how to convert the String value to the Integer value.

These rules are defined in a model update definition with the Model Update Editor which is based on the Comparison Editor. It is strongly recommended you get familiar with model comparing before using the Model Update Editor.

Important: The model update feature is intended for models that were created in the same version of LSPS, since the muc definition file is specific for the given version and not portable. It is not possible to use model update definition created in one version of LSPS to update a model instance if its model was created in another LSPS version.

Model update is performed in the several phases:

  1. Pre-processing

    The elements that were being executed when the model instance was Suspended are transformed as defined in their pre-process.

  2. Transformation

    The runtime data of the model instance is transformed to follow the new model. Its data types and variables are updated to their target types and values, and instantiated model elements are transformed according to their transformation strategies.

  3. Post-processing

    The post-processes of instantiated elements prepare the respective elements for running.

Note that on update, closures of the model instance are checked for compatibility. If an incompatible closure is detected, the system displays a dialog with details on the closure with incompatibility.

modelUpdateSchema.png
Schema of Model update process
A set of steps required to perform a model update is described in the chapter Performing Model Update.