Briefly said, PetriNetExec is an open-source Java library which allows you to embed Petri Nets into your Java application.
Using PetriNetExec you can define places and transitions, connect them using arcs and inhibitors, define the initial marking and then fire events and see how tokens flow into the network.
* PetriNetExec does not provide a GUI for editing the network nor will it provide in the near future. That is not really a feature :-) but to those of you able to cope with this news I...