Sub Model

Sub Model is a model which can be included in other models. The use of sub model enables sharing and re-use of models that are built to describe common behaviors.

Embedding Sub Model

Sub Model is embedded into a state. To embed a Sub Model, open State Property and select the sub model from the dropdown list for the field labeled Sub Model.

To remove the sub model, just select blank option from the sub model dropdown list.

The model must be saved and re-open in order to bring in all of the entire sub-model content: states, transitions and mscripts. This should be done automatically when you embed the sub model. If not, you can manually save the model changes, close the model and re-open it.

Create A Sub Model

Sub Model is a model itself. It becomes a Sub Model if its model name contains a prefix _sub (underscore). For example _sub_mySubModel.

To create a sub model, create a model and name the model with the prefix “_sub”.

Sub Model Characteristic

Sub Model must have an initial state and one or more final states. When Sub Model is embedded in another model, it's connected with the states of the main model through the initial state and final states.

Initial state is used as an entry point from the model to step into the Sub Model while the final states are the exits from Sub Model back out to the main model.

Each final states within the submodel will exit the submodel and be routed out of the submodel state via the transitions leaving the submodel state just like the transitions are traversed normally within the main model.

Sub model should not be renamed or deleted unless it is not referenced by any models.

Sub Model Display

Sub Model by default is displayed inside the state in which the sub model is embedded. In some situation you may wish to hide the sub model for brevity or to reduce the model size.

To hide sub model in the model editor, select Hide Sub Model from the state context menu. You can un-hide the sub model by selecting Show Sub Model.

Hiding sub model from the Model Editor automatically hides the sub model in the model graphs.

QR Code
QR Code submodel (generated for current page)