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.
- Clone this repository:
git clone [email protected]:bptlab/openbpt-typed-pn-variants-modeler.git - Navigate into the created directory
- Run
npm install - Run
npm link - Clone the development repository:
git clone [email protected]:bptlab/openbpt-modeler-dev.git - Navigate into the created directory
- Checkout the
openbpt-typed-pn-variants-modelerbranch - Run
npm install - Run
npm link openbpt-typed-pn-variants-modeler
To start the modeler, run npm run dev in the development repo's directory.
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
DiagramElementas well asDiagramandPlane. These elements are visual representatoions of the model elements, including positional information and associated labels.
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.