From d7335d7a5a96f10c65e1bdb77b2e05ad4ba39d6a Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Sat, 3 Nov 2018 04:38:10 +0100 Subject: [PATCH] add camunda bpmn deploy script --- camunda-deploy.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 camunda-deploy.sh diff --git a/camunda-deploy.sh b/camunda-deploy.sh new file mode 100755 index 0000000..fb31d7e --- /dev/null +++ b/camunda-deploy.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +camunda="http://localhost:8080" +camunda="http://127.0.0.1:8080" +camunda_deployment="${camunda}/engine-rest/deployment" + +old_ids=`curl -s ${camunda_deployment}/ | python3 -c "import sys, json; doc = json.load(sys.stdin); items = [x['id'] for x in doc if x['name'] == 'Sentiment Analysis']; print (*items, sep = '\n')"` +for old_id in ${old_ids}; do + curl -s -X DELETE "${camunda_deployment}/${old_id}?cascade=true" +done +curl -iv "${camunda_deployment}/create" -H "Expect:" -F "deployment-name=Sentiment Analysis" -F "sentiment_analysis.bpmn=@sentiment_analysis.bpmn" -- 2.43.0