This webservice is used to translate a petrinet into plain text.
Requirements for development
- IDE of your choice
- Java 11
It is recommended to use IntelliJ IDE.
- Git clone this project onto your machine.
- Start IntelliJ and open the project.
- Wait until all files have been loaded.
- Run Application with the Start-Button or with
mvn spring-boot:run
- Start the application.
- Navigate to
http://localhost:8080/p2t/swagger-ui.
- Paste your petrinet (the content of the xml file) in the body of the
POST /p2t/generateText
endpoint.
Testing via the embedded GUI
- Start the application.
- Navigate to
http://localhost:8080/p2t/
.
- Paste your petrinet (the content of the xml file) in the first text area and submit the form.
- Add a new collection in Postman.
- Add a new request in your created collection.
- For your request change
Get
to Post
.
- Enter URL
http://localhost:8080/p2t/generateText
- Open the body configuration and choose
raw
.
- Copy the content of a
.pnml
file (must be a sound petrinet) in the body of the request.
- Click send button
Testing via the WoPeD-Client
- Start the application.
- Follow the installation instructions of the WoPeD-Client (
https://github.com/tfreytag/WoPeD
).
- Start WoPeD-Client and.
- Open the configuration and navigate to
NLP Tools
. Adapt the Process2Text
configuration:
Server host
: localhost
Port
: 8080
URI
: /p2t
- Test your configuration.
- Close the configuration and import or create a new petrinet.
- Navigate to
Analyse
-> Translate to text
and execute. The petrinet will now be transformed by your locally started P2T webservice.
Hosting the webservice yourself
Option 1: Use our pre-build docker image
- Pull our pre-build docker image from docker hub (see above).
- Run this image on your server.
Option 2: Build the docker image yourself
- Build your own docker image with the Dockerfile.
- Run this image on your server.