Projects



Changes between Version 5 and Version 6 of PetriNetSagas


Ignore:
Timestamp:
Feb 7, 2021, 8:18:12 PM (4 years ago)
Author:
roewekamp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PetriNetSagas

    v5 v6  
    3535If you do not use the Docker-based setup please refer to the respective projects websites on information on how to set these up.
    3636
    37 Download the Example package (BookStoreExample.zip) (see above)
     37Download the Example package (BookStoreExample.zip) (see above) and unzip it.
    3838To set up all the dependencies it is sufficient to navigate to the folder "docker" and issue the command {{{docker-compose up -d}}} from within that directory.
    3939If you have installed docker on another machine, make sure direkt connection between your machine and the docker machine is possible, and ports `2181`, `9092`, `3306`, `8099` and `9411` are not firewalled.
     
    4141The service infrastructure can be tore down again with the command {{{docker-compose down}}} from within the same directory.
    4242
    43 To start the sample application navigate to the main directory and run {{{./gradlew build}}} followed by (TODO).
     43If you are running docker on another machine you need to tell the sample application the IP docker and the services are running on.
     44Do so by setting the environment variable `DOCKER_HOST_IP`. E.g. by executing: `set DOCKER_HOST_IP=www.xxx.yyy.zzz`.
     45If you run docker on the same machine, you do not need to do this.
     46
     47To build the sample application navigate to the main directory and run {{{./gradlew build}}}.
     48The build process will attempt to reach the running services, so a `BUILD FAILED` most likely indicates, that the services could not be reached under the IP specified.
     49
     50After successful compilation, the application can be run by executing {{{./gradlew bootrun}}}.
     51Once the application hast started successfully the log shows the line {{{Started BookStoreExampleApplication in xxxx seconds (JVM running for xxxx)}}}
     52
     53Open up a second terminal and run the command {{{curl -X POST localhost:8080/order?creditCardLimit=500}}}
     54This will issue the order to run a Saga in the system.
     55The system generates a random book price and tries to order it from the (cent) limit supplied by the call (500 cents).