LSPS documentation logo
LSPS Documentation
Model

A model is an inclusion of an executable Module and its Module Imports. It is not explicitly represented by any component: any executable module with all its resources and module imports represents a model.

While you can upload any Module to the server, you create Models only over Modules that are executable. An executable module serves as a static basis for creation of an arbitrary number of model instances: An model instance uses the model with its static data as a blueprint, while the instance holds its runtime data, such as, what element is currently being executed, what are statuses of the elements, values of variables, etc.

If a module imports other modules, whether the imported module is executable or not has no impact on execution.

During its lifetime a Model instance goes through a set of execution statuses:

  • Created: Model context is created and contexts of individual module instances are created.
  • Running: Context data are initialized, initial values are assigned, and all BPMN-based and Goal-based Processes in all executable modules are instantiated.

    Note that this happens in a bottom-up manner: First the modules that are "lowest" in the hierarchy are initialized: If module A imports module B and module B imports module C, then C is initialized first, then B and only then A: this allows you to use data from C and B in A, but not vice versa.

    A Running Model instance can be suspended: all its Process instances and their elements are suspended and no execution is taking place.

    Note: If a Model instance attempts to perform an invalid action immediately when it becomes Running and an error occurs, the initialization is rolled back and the Model instance goes back to the Created status.

  • Finished: Model instance becomes Finished, when all its Process instances are Finished.

    You can finish a model manually if required.

Suspend

A Running model instance can be suspended: on suspend, its execution is paused immediately so that no changes on runtime data can take place. Execution of all running elements is interrupted and all elements become Suspended. A suspended model instance is read-only.

A Suspended Model instance may be resumed. When resumed the execution of the Model instance continues from the point when it was suspended. It becomes Running and all asynchronous inputs received by the Model instance while suspended (Signals, elapsing of time periods of Timer Events) are received and processed.

Note: If a Timer Event, either a Timer Start Event or a Timer Intermediate Event with a duration is suspended while Running, the duration is checked with regards to the time, when the Model instance was suspended. For example, a Timer Event with a duration of 60 minutes was triggered at 1 p.m.: if the Model instance is resumed at 1.30 p.m., the Timer Event continues running until 2 p.m.; if the Model instance is resumed at 3.00 p.m., the Timer Event is finished and the outgoing Flow is taken immediately. For cyclic events, only the last occurrence of the event is processed: For example, if a BPMN-based Process is to be instantiated every day at 12 p.m. and the model instance is resumed after three days at 1 p.m., only one process instance is triggered.

Finish

When a model instance receives a request to finish, the following happens:

  • Active activities (Tasks and Sub-Processes) fail and become terminated immediately.
  • Processes become finished:
    • In Goal Processes, all Achieve Goals become deactivated immediately while Maintain Goals finish their current cycle and then become deactivated.
    • In BPMN Processes, all active Activities its BPMN-based Process instances are terminated (fail).
  • All alive to-dos become interrupted so they cannot be submitted.
  • As a result, the model becomes finished since all process instances are finished.