diff --git a/soemi-moen/README.md b/soemi-moen/README.md index f0c2a28..1eaf629 100644 --- a/soemi-moen/README.md +++ b/soemi-moen/README.md @@ -1,2 +1,2 @@ -docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:run-latest +sudo docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:run-latest --net=host -v /home/flurin/soemi-weather/soemi-moen/target:/camunda/internal/webapps diff --git a/soemi-moen/soemi-moen.bpmn b/soemi-moen/soemi-moen.bpmn index 077fe43..f0f16fe 100644 --- a/soemi-moen/soemi-moen.bpmn +++ b/soemi-moen/soemi-moen.bpmn @@ -4,65 +4,140 @@ - - + + - - - - + + + http://api.openweathermap.org/geo/1.0/direct?q=${location}&limit=1&appid=f350db2bd88588efbe929a3adedf926e + GET + ${response} + + http-connector + + Flow_0h1c5x5 + Flow_1qb8pne + + + Flow_1qb8pne + Flow_08b5esk + var webOutputJson = JSON.parse(web_output); + +// Extract the desired property +var lat = webOutputJson[0].lat; +var lon = webOutputJson[0].lon + +execution.setVariable("lat", lat); +execution.setVariable("lon", lon); + + + + + Flow_0h1c5x5 - + + + + + + + https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&appid=f350db2bd88588efbe929a3adedf926e + GET + ${response} + + http-connector + + + Flow_08b5esk + Flow_1m419sa + + + Flow_1m419sa + Flow_03ix5a2 + var webOutputJson = JSON.parse(weatherResponse); + +// Extract the desired property +var temp = webOutputJson.main.temp + +execution.setVariable("temp", temp); + - Flow_1gvdgxc + Flow_03ix5a2 - + - https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&appid=f350db2bd88588efbe929a3adedf926e GET - ${response} + http-connector - Flow_0h1c5x5 - Flow_1gvdgxc - + + + + + + + + + - + - + + + + + + + + + - + - + - - + + - - - - + + + + + + + + + + + + + + + + - - - + + + + +