From 1060a1fb96d843436f2cebadd5ddc393cec4ec12 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Sat, 24 Nov 2018 06:39:57 +0100 Subject: [PATCH] twitter semi-working --- camunda-overlay/sentiment-analysis.bpmn | 104 +++++++++++------------- 1 file changed, 48 insertions(+), 56 deletions(-) diff --git a/camunda-overlay/sentiment-analysis.bpmn b/camunda-overlay/sentiment-analysis.bpmn index 1bdd8d7..c9392d4 100644 --- a/camunda-overlay/sentiment-analysis.bpmn +++ b/camunda-overlay/sentiment-analysis.bpmn @@ -5,8 +5,8 @@ - - + + @@ -25,10 +25,7 @@ SequenceFlow_14nqu0e SequenceFlow_0jebdb9 - - SequenceFlow_11xavl5 - - + SequenceFlow_0jumhlh SequenceFlow_14nqu0e @@ -46,20 +43,20 @@ SequenceFlow_0f6v4j4 - + - http://twitter:8084/search/tweets.json + + var term = execution.getVariable("term"); +'http://twitter:8084/search/tweets.json?q='+term.term; + GET application/json - - "q=${term}" - var response = connector.getVariable("response"); S(response); @@ -68,36 +65,45 @@ S(response); http-connector - SequenceFlow_08cvkud + SequenceFlow_0f6v4j4 SequenceFlow_0g6bfz6 - - + + SequenceFlow_1bz7zx2 - - - SequenceFlow_0dcynq6 + + + + + + http://analysis:8081/ + POST + + + application/json + + + + var tweets = execution.getVariable("tweets"); +'{"q": "'+tweets+'"}'; + + + var response = connector.getVariable("response"); +S(response); + + + http-connector + + + SequenceFlow_0g6bfz6 SequenceFlow_1bz7zx2 - - SequenceFlow_0g6bfz6 - SequenceFlow_0dcynq6 - - PT5S - - - - - SequenceFlow_0f6v4j4 - SequenceFlow_08cvkud - - PT5S - - - + + SequenceFlow_11xavl5 + @@ -108,7 +114,7 @@ S(response); - + @@ -128,9 +134,9 @@ S(response); - - - + + + @@ -139,16 +145,16 @@ S(response); - + - + - + @@ -167,30 +173,16 @@ S(response); - + - + - - - - - - - - - - - - - - -- 2.43.0