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.
REST API for ProM
Hello everyone! I'm trying to implement a set of REST APIs to encapsulate ProM for automation.
I worked out a docker image(zhicwu/prom on Docker Hub) as starting point. Moving forward, I plan to add embedded web server along with a few Groovy/Java code to expose some functions. I know ProM can run in either UI or CLI mode, and the latter one seems ideal for implementing backend services. However, it's not well supported in all plugins, and the script engine is BeanShell(better to use BSF/JSR-223 or Groovy IMHO).
I'm sure I'm not alone, so appreciate if you can share some thoughts or concerns regarding this.
Comments
-
Hello zhicwu,
I have a docker container (self made, also) which has a backend in Python (using Flask) that I use to convert CSVs into BPMNs and does it successfully. I use the subprocess package to run the commands to start the scripts. What concerns do you have in particular?
-
Thanks for your reply @NiceNick. I'm trying to turn ProM into a server, so I'm asking around to see if someone already did that. Just built a new image for demonstration - any feedback is welcome
$ docker run --rm -d -p5678:5678 zhicwu/prom:6-server
... wait until the server is up ...
$ cat test.groovy
import org.deckfour.xes.classification.XEventNameClassifier
import org.processmining.alphaminer.parameters.AlphaMinerParameters
import org.processmining.alphaminer.parameters.AlphaVersion
def log = prom('open_xes_log_file', 'example-logs/repairExample.xes')
println("Mining model")
def net_and_marking = prom('alpha_miner', log,
new XEventNameClassifier(), new AlphaMinerParameters(AlphaVersion.CLASSIC))
def net = net_and_marking[0]
def marking = net_and_marking[1]
println("Saving net")
File net_file = new File("/tmp/mined_net.pnml")
prom('pnml_export_petri_net_', net, net_file)
return 'Done'
$ curl -X POST --data-binary '@test.groovy' http://localhost:5678/script -
What I have is a webservice with a flask backend that receives 2 files from the user (one CSV and other with parameters) and I mine (using the HeuristicsMiner) that CSV. Then, I send the mined BPMN to the user.
I don't understand if you have any question in particular that I can try to help or just looking for more ideas.
-
Thanks again. Just looking for more ideas and concernsAnyway, I'm almost done with building the core REST APIs around ProM. Will start a new thread when I run into issue.
-
Hello ,
I'm asking if someone already building the REST APIs around Prom .
Those APIs will be integrated in my website (developed with React Js and node Js) in order to be able to visualize the different process provided by Prom .
Any support can be a good advance for my master thesis
Best Regards
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
- 394 - Usage
- 288 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame