JointJS, a powerful diagramming library, helps developers and companies of any size build advanced visual applications and No-Code/Low-Code tools. It provides a wealth of ready-made demos and a wide range of prebuilt features that make creating applications containing diagramming studios such as Petri net a breeze.
We equip developers with all the needed features to save time and focus their energy elsewhere such as transitions and Petri net shapes.
New to this topic? Learn more about Petri net 👇
As stated above, Petri net is a mathematical modeling language describing distributed systems. It has a precise mathematical definition and graphical notation (like the one you see in the example above), which distinguishes it from other concepts like UML class diagrams or BPMN. The most common uses we will explore below include modeling artificial systems such as manufacturing systems and communication protocols.
We have already touched on the basic elements of a Petri net: places (represented by the circle) and transitions (represented by the rectangle). These are connected by arcs that allow data (tokens) to be synchronized based on certain rules. There are two types of places: input and output. Input places are those from which arcs lead to the transition, output places are, as expected, those to which arcs lead from the transition.
Places can contain any number of tokens (represented by dots) that can be fired from input places to output places via transitions, if and only if the transition is enabled – this happens when there are enough tokens in the input places. When the transition fires, it expends the required tokens from the input places and generates them at the output places. This process changes the state of the Petri net.
As Matthew O'Brien from the University of Pittsburgh says in his work, “Petri net can be used to describe and study information processing systems of various types”. There are many use cases where this modeling language can be of value, including:
To learn more about how Petri net can be used, we recommend reading O'Brien's presentation summarizing the most common use cases.
Modern development is not about building everything from scratch. The JointJS team equips you with plenty of ready-to-use demo apps that can serve as a boilerplate and radically reduce your development time. Visit our Github profile to get the source code of the Petri net demo and learn from other diagramming enthusiasts.