Skip to content

bptlab/openbpt-typed-pn-variants-modeler

 
 

Repository files navigation

openbpt-typed-pn-variants-modeler

A modeler for various typed Petri net variants presented in literature. Currently supported types are:

  • t-PNID (typed Petri nets with Identifiers)
  • OCPN (Object-centric Petri nets)
  • OPID (Object-centric Petri nets with Identifiers)

The modeler is based on the openbpt-modeler-petri-net modeler, which makes use of the wonderful diagram-js library and took inspiration from bpmn-js, object-diagram-js and fcm-js.

Development Setup

  1. Clone this repository: git clone [email protected]:bptlab/openbpt-typed-pn-variants-modeler.git
  2. Navigate into the created directory
  3. Run npm install
  4. Run npm link
  5. Clone the development repository: git clone [email protected]:bptlab/openbpt-modeler-dev.git
  6. Navigate into the created directory
  7. Checkout the openbpt-typed-pn-variants-modeler branch
  8. Run npm install
  9. Run npm link openbpt-typed-pn-variants-modeler

To start the modeler, run npm run dev in the development repo's directory.

Defining the Metamodel

To define the model structure, we build on moddle, which uses a schema defined as a JSON file to create a metamodel that can be used to instantiate model elements while knowing their attributes and relations and provides a structure for importing and exporting XML files. The followning class diagram shows the currently implemented metamodel used in the modeler. It can be generally divided into two sides:

  • The semantic elements are the classes on the left, everything inheriting from Schema. They define the different model elements and their attributes/relations.
  • The syntactic elements are the classes on the right, everything inheriting from DiagramElement as well as Diagram and Plane. These elements are visual representatoions of the model elements, including positional information and associated labels.

OPID_Class_Diagram

In most cases, it should not be necessary to modify the metamodel of the syntactic elements. For the semantic elements, the classes inheriting from Node and BinaryConnection (marked in red) must be defined for the respective modeling language in modelSchema.js. Further information can be found in the documentation. Setting isAttr for a property will include it as an attribute in the XML, otherwise it is stored as a separate child-tag.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.4%
  • CSS 4.6%