ExecutingCases - bptlab/chimera GitHub Wiki

This wiki page describes how cases are instantiated and executed by the Chimera case engine.

Execution Service

The ExecutionService class handles the creation and managing of case executioner. For each case a new Case Executioner object is created. A map relates ids of case model to the existing Case Executioner objects.

Case Executioner

The 'CaseExecutioner' class handles the execution of a case

Case

The Case class represent a running case. Cases have FragmentInstances, and those have AbstractControlNodeInstances. The data objects of the case are managed by a DataManager.

Control Nodes and Control Node Instances

Different sub-types of AbstractControlNodeInstances, first AbstractDataControlNodeInstances with sub-types ActivityInstance, and EventInstance and second GatewayInstance.

The behavior of control nodes is determined by its class (enableControlFlow, begin, terminate, skip). Events may have a SpecialEventDefinition and therefore the EventInstance can have special EventBehavior, e.g. MessageSendEventBehavior, MessageReceiveEventBehavior, TimerEventBehavior.

Case Instantiation

Case are instantiated either via the Frontend (by clicking on the "Start Case" button on the Case Model overview page) or by a case start trigger (when an external event is received). When a case is instantiated the following steps happen:

  1. A new case object and its appropriate case executioner is created
  2. Initial data objects are created when the case is started via a case start trigger
  3. Fragment instances for each fragment are created in state init
  4. Instances for activities and events are created in state init
  5. Data pre-conditions of each fragment instance are checked (case start trigger can produce DOs)
  6. If fragment pre-conditions is fulfilled the state of the fragment instance is changed to enabled
  7. The StartEvent is instantiated and its control flow is enabled
  8. check the first control node after start event for fragment instances in state enabled
    1. activity instance
      • check data pre-conditions (input set)
      • if fulfilled: change state of activity instance to enabled
      • enabled activity instances are displayed in frontend, can be started by user. Automatic tasks do not begin automatically, if they are the first control node!
    2. event instance
      • message receive event: register event query (is there a state for event instances?)
    3. gateway instance: enable following control nodes according to type of gateway

DataManager

The DataManager class is responsible for maintaining the DataObjects, their creation and locking/unlocking. DataObjects hold instances of DataAttributes with an editable value.