Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding data in petrinets? #87

Open
fkleedorfer opened this issue Oct 14, 2018 · 2 comments
Open

Embedding data in petrinets? #87

fkleedorfer opened this issue Oct 14, 2018 · 2 comments

Comments

@fkleedorfer
Copy link

For my use case, I'd like to add data to the petrinets so as to make integration with a client application easier. Ideally, it would be possible to make annotations in the GUI and use them programatically after loading the petri net using the java api. Thus the client application can query the petri net about enabled transitions and marked places and use the annotations on those items to interpret them and decide which transitions to fire.

Is there any way to embed data that can be accessed via the java api? So far, the only solution I see is to use the id field (the 'name' is not shown/accessible in the GUI), which is ok as long as there are no duplicates in the data I want to annotate, and as long as a simple ID is all I need (but I am thinking about a solution that would require more data to be embedded).

@sjdayday
Copy link
Collaborator

sjdayday commented Oct 15, 2018 via email

@fkleedorfer
Copy link
Author

fkleedorfer commented Oct 16, 2018

Hi Steve,

In general, the decision about which of multiple enabled transitions to fire next, is random.

In our case, control is reversed: the client decides which transition fires, the net provides the information which transitions are available and which places are marked.

My question was more about embedding third-party data in the net. The solution to use the id field isn't bad at all. Using the id, we assign URIs to all the places/transitions that we are interested in for firing or querying. Everything else is handled on the client side.

The only downside for me with this solution is that we have to use the URIs in the GUI, too, which just looks cumbersome. It would be better for readability if we could give places and transitions human readable names in addition to id field. The xml structure suggests that that's possible, but name and id are always the same (at least in uk.ac.imperial:pipe-core:1.0.3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants