To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.
Graph a Petri Net
I need to graph a petri net in a plugin for a CASE tool that I'm doing. I am using the prom libraries for work with the petri net.In other words, I need to show an image of the resulting net petri on a panel. What library do you advise me to use to graph a petri net?
Comments
-
Dear Ronal,
In ProM 6, there is a default visualizer for Petri nets, which is the "Visualize Petri net" plug-in. You can find the sources for this plug-in in https://svn.win.tue.nl/repos/prom/Packages/PetriNets/Trunk/src/org/processmining/plugins/petrinet/PetriNetVisualization.java. Basically, this plug-in takes a PluginContext, a PetrinetGraph, and a marking, and produces a JComponent showing the given Petri net with the gtiven marking. Note that you need a proper PluginContext to call this visualizer. This visualizer uses JGraph.
If you prefer to use Dot (or GraphViz), you can use the alternative "Visualize Petri Net (Dot)" plug-in, which takes a PluginContext and a Petrinet (see https://svn.win.tue.nl/repos/prom/Packages/GraphVisualizers/Trunk/src/org/processmining/graphvisualizers/plugins/GraphVisualizerPlugin.java). This also results in a JComponent showing the Petri net (with its initial marking, if it exists), but now using Dot instead of using JGraph. For this visualizer, you also need to provide a proper PluginContext.
Kind regards,
Eric.
-
Thanks for your help hverbeek boss, can that PluginContext create it or
do I get it from some class? because PluginContext is an abstract class
and I can not create an object to pass it as a parameter to the
visualize () method
-
Dear Ronal,
I guess you then need to implement your own proper subclass of this abstract class. For this, you could have a look at https://svn.win.tue.nl/repos/prom/Packages/ProM-Contexts/Trunk/src/org/processmining/contexts/uitopia/UIPluginContext.java, which is the GUI-aware implementing class we typically use in ProM.
Note that your implementation necessarily depends on the CASE tool your embedding ProM in, as showing (for example) a wizard on the screen needs to be done by the CASE tool. As a result, we cannot help you that much. We know ProM, but if you decide to embed ProM in another tool, you have to do that yourself.
Kind regards,
Eric.
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 393 - Usage
- 287 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame