3 camunda="http://localhost:8080"
4 camunda="http://127.0.0.1:8080"
5 camunda_deployment="${camunda}/engine-rest/deployment"
7 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')"`
8 for old_id in ${old_ids}; do
9 curl -s -X DELETE "${camunda_deployment}/${old_id}?cascade=true"
11 curl -i "${camunda_deployment}/create" -H "Expect:" -F "deployment-name=Sentiment Analysis" -F "sentiment_analysis.bpmn=@sentiment_analysis.bpmn"