Skip to content

Architecture 1.2.1

Jan Westphal edited this page Jan 26, 2018 · 1 revision

Configuration

Architecture Overview

This section gives an overview over the backend code and its package structure release 1.2.1 prior to the refactoring. It should provide a starting point for exploring the Chimera code.

de.hpi.bpt.chimera.jcomparser

Responsible for de-serializing case models sent from Gryphon case modeler and saving them into the database. Case models are specified using JSON, containing XML strings to represent fragments. For the exact specification of the input format, see the Gryphon developer documentation.

  • The de.hpi.bpt.chimera.jcomparser.jaxb package contains XML wrapper classes for the deserialization of the fragments and their BPMN elements
  • The de.hpi.bpt.chimera.jcomparser.json package contains JSON wrapper classes for the deserialization of the remaining scenario data.
  • The de.hpi.bpt.chimera.jcomparser.saving package contains classes providing database access, to save newly deserialized fragments and scenario data.
  • The de.hpi.bpt.chimera.jcomparser.validation package is used to perform different checks on a scenario. This includes:
    • Checking names to prevent SQL injection
    • Checking, that all data objects used in fragments belong to a data class defined in the case model
    • Checking the structural soundness of fragments
    • Validating that activities only perform such data object transitions that are conformant with the object lifecycle (OLC)

de.hpi.bpt.chimera.jcore

This package handles the execution of cases. More information can be found on a separate page ExecutingCases.

  • package de.hpi.bpt.chimera.jcore.rest defines the REST interface (created with Jersey). The REST interface is documented with swagger. An interactive documentation is available at in the deployed system at https://bpt-lab.org/ChimeraDev/swagger.

  • package de.hpi.bpt.chimera.jcore.controlnodes defines classes for the runtime representation of model elements, e.g. gateway, activity, or intermediate event. It provides the ControlNodeFactory that creates new control nodes. ActivityInstance represents an activity at runtime.

  • package de.hpi.bpt.chimera.jcore.flowbehaviors defines classes for the control flow behavior of model elements at runtime. It defines for example a ParallelGatewaySplitBehavior used by AND gateways that enables all following control nodes.

  • package de.hpi.bpt.chimera.jcore.executionbehaviors analogously defines the execution behavior of model elements.

  • package de.hpi.bpt.chimera.jcore.data contains logic for managing data objects during the case execution. It creates and locks data objects and checks the termination condition.

  • package de.hpi.bpt.chimera.jcore.eventhandling implements the integration with the event handling platform Unicorn. See section Event Integration.

de.hpi.bpt.chimera.database (UNDER REFACTORING)

The persistence layer of the Chimera engine is being refactored at the moment to use JPA, see information about the new persistence layer. The database module contains the access layer to the database. All data access objects inherit from the DbObject, which provides methods for executing SQL queries via and also provides a mapping between relational data and Java data structures/types. The ConnectionWrapper class provides the connection to the MySQL database. It is also responsible for reloading the schema if it changed (schemaversion variable configured in the pom.xml).

de.hpi.bpt.chimera.history

Provides classes and a REST interface for logging and retrieving the steps of the case execution. Chimera logs a) state changes of activity instances, b) state changes of events, c) state changes of data objects, and d) value changes of data attributes. The log can be exported in XES data format.

de.hpi.bpt.chimera.util

Different utility methods for converting data structures to JSON/XML, and for operations needed for computing input and output sets in fragments. Contains also the PropertyLoader to read properties from the configuration file.

de.hpi.bpt.chimera.janalytics

Provides algorithms and methods to analyze the case execution, as well as a REST interface for calling these methods. The AnalyticsService interface provides an extensible architecture for defining custom analysis algorithms.

de.hpi.bpt.chimera.jconfiguration

This package provides a REST interface for configuring E-Mail-Tasks (email address and message body).

Frontend

Cases are executed via the frontend which shows an overview of enabled and running tasks. It is based on AngularJS.

To-be Architecture

Here we describe the target architecture of Chimera after the ongoing refactoring effort.

Package Structure

TODO: describe the package structure and include UML package diagram

Event Integration

External events often influence and drive the execution of cases. Fragment models use BPMN events to express that an (external) event is expected (catching events) or produced by the case (throwing event). BPMN provides start, intermediate, boundary, and end events that can be of different types, e.g. message, signal, or timer events. The Gryphon case modeler uses catching message events to indicate that external events are expected. It allows to specify an event query in the Esper processing language EPL as property of the model element that is registered with the event processing platform Unicorn.

Further information on Event Integration can be found on a separate page Event-Integration.