cpee 2.1.35 → 2.1.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/track.css +1 -1
  3. data/cockpit/js/details.js +2 -2
  4. data/cockpit/templates/Subprocess.xml +401 -18
  5. data/cockpit/templates/Wait.xml +398 -11
  6. data/cockpit/templates/Wait.xml.attrs +3 -0
  7. data/cockpit/themes/compact/rngs/call.rng +107 -86
  8. data/cockpit/themes/compact/rngs/callmanipulate.rng +11 -7
  9. data/cockpit/themes/compact/rngs/start.rng +94 -73
  10. data/cockpit/themes/compact/symbols/call_sensor.svg +9 -0
  11. data/cockpit/themes/compact/symbols/callmanipulate.svg +3 -3
  12. data/cockpit/themes/compact/symbols/callmanipulate_sensor.svg +11 -0
  13. data/cockpit/themes/compact/theme.js +25 -5
  14. data/cockpit/themes/control/rngs/call.rng +107 -86
  15. data/cockpit/themes/control/rngs/callmanipulate.rng +11 -7
  16. data/cockpit/themes/control/rngs/start.rng +94 -73
  17. data/cockpit/themes/control/symbols/call_sensor.svg +9 -0
  18. data/cockpit/themes/control/symbols/callmanipulate.svg +3 -3
  19. data/cockpit/themes/control/symbols/callmanipulate_sensor.svg +11 -0
  20. data/cockpit/themes/default/rngs/call.rng +107 -86
  21. data/cockpit/themes/default/rngs/callmanipulate.rng +11 -7
  22. data/cockpit/themes/default/rngs/start.rng +94 -73
  23. data/cockpit/themes/default/symbols/call_sensor.svg +9 -0
  24. data/cockpit/themes/default/symbols/callmanipulate.svg +3 -3
  25. data/cockpit/themes/default/symbols/callmanipulate_sensor.svg +11 -0
  26. data/cockpit/themes/default/theme.js +25 -5
  27. data/cockpit/themes/extended/rngs/call.rng +107 -86
  28. data/cockpit/themes/extended/rngs/callmanipulate.rng +11 -7
  29. data/cockpit/themes/extended/rngs/start.rng +94 -73
  30. data/cockpit/themes/extended/symbols/call_sensor.svg +9 -0
  31. data/cockpit/themes/extended/symbols/callmanipulate.svg +3 -3
  32. data/cockpit/themes/extended/symbols/callmanipulate_sensor.svg +11 -0
  33. data/cockpit/themes/extended/theme.js +25 -5
  34. data/cockpit/themes/model/symbols/call_sensor.svg +9 -0
  35. data/cockpit/themes/model/symbols/callmanipulate.svg +3 -3
  36. data/cockpit/themes/model/symbols/callmanipulate_sensor.svg +11 -0
  37. data/cockpit/themes/packed/rngs/call.rng +107 -86
  38. data/cockpit/themes/packed/rngs/callmanipulate.rng +11 -7
  39. data/cockpit/themes/packed/rngs/start.rng +94 -73
  40. data/cockpit/themes/packed/symbols/call_sensor.svg +9 -0
  41. data/cockpit/themes/packed/symbols/callmanipulate.svg +3 -3
  42. data/cockpit/themes/packed/symbols/callmanipulate_sensor.svg +11 -0
  43. data/cockpit/themes/packed/theme.js +25 -5
  44. data/cockpit/themes/preset/rngs/call.rng +107 -86
  45. data/cockpit/themes/preset/rngs/callmanipulate.rng +11 -7
  46. data/cockpit/themes/preset/rngs/start.rng +94 -73
  47. data/cockpit/themes/preset/symbols/call_sensor.svg +9 -0
  48. data/cockpit/themes/preset/symbols/callmanipulate.svg +3 -3
  49. data/cockpit/themes/preset/symbols/callmanipulate_sensor.svg +11 -0
  50. data/cockpit/themes/preset/theme.js +25 -5
  51. data/cpee.gemspec +1 -1
  52. data/lib/cpee/implementation.rb +25 -14
  53. data/lib/cpee/message.rb +0 -1
  54. data/lib/cpee/persistence.rb +1 -1
  55. data/server/executionhandlers/ruby/connection.rb +32 -20
  56. data/server/resources/states.xml +3 -0
  57. data/server/routing/end.pid +1 -0
  58. data/server/routing/forward-events.pid +1 -0
  59. data/server/routing/forward-votes.pid +1 -0
  60. data/server/routing/persist.pid +1 -0
  61. data/tools/cpee +6 -4
  62. metadata +20 -2
@@ -1,83 +1,104 @@
1
1
  <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="description" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
- <element name="_context_data_analysis" rngui:header="Context Data Analysis" rngui:hint="All changes to data elements in the process as well as arbitray external data streams can be consumed and transformed in data probes. All probes can be the basis for impact factors. Please go to individual tasks to define more restricted data probes.">
2
+ <element name="_context_data_analysis" rngui:header="Context Data Analysis" rngui:hint="All data returned from the endpoint implementing this task as well as arbitray external data streams can be consumed and transformed in data probes. All probes can be the basis for impact factors. Please go to start to define instance data probes.">
3
3
 
4
- <element name="probes" rngui:header="Data Probes - Context Data Extraction" rngui:fold="closed">
5
- <zeroOrMore rngui:label="Add Probe">
6
- <element name="probe">
7
- <element name="name" rngui:label="Label">
8
- <data type="string" rngui:label="Label"/>
9
- </element>
10
- <element name="extractor_type" rngui:label="Extractor Type">
11
- <choice>
12
- <value id='code'>Code</value>
13
- <value id='service'>Service</value>
14
- </choice>
15
- </element>
16
- <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic data'>
17
- <text rngui:label="Code"/>
18
- </element>
19
- <element name="extractor_url" rngui:label="Extractor Service" rngui:hint='For intrinsic &amp; discrete data'>
20
- <data type="string" rngui:label="Service Url"/>
21
- </element>
22
- <element name="extractor_params" rngui:label="Extractor Service Arguments:">
23
- <zeroOrMore rngui:label="Create Argument Pairs">
24
- <element rngui:label="Name">
25
- <anyName/>
26
- <data type="string" rngui:label="Value / Json"/>
27
- </element>
28
- </zeroOrMore>
29
- </element>
30
- <element name="visualizer_url" rngui:label="Visualizer Url">
31
- <data type="string" rngui:label="Service Url"/>
32
- </element>
33
- <element name="visualizer_params" rngui:label="Visualizer Arguments">
34
- <zeroOrMore rngui:label="Create Argument Pairs">
35
- <element rngui:label="Name">
36
- <anyName/>
37
- <data type="string" rngui:label="Value / Json"/>
38
- </element>
39
- </zeroOrMore>
4
+ <element name="probes" rngui:header="Data Probes - Context Data Extraction" rngui:fold="closed_conditional">
5
+ <zeroOrMore rngui:label="Add Probe">
6
+ <element name="probe">
7
+ <element name="id" rngui:label="ID">
8
+ <data type="string" rngui:label="ID"/>
9
+ </element>
10
+ <element name="source" rngui:label="Source">
11
+ <data type="string" rngui:label="Where does the sensor value come from?"/>
12
+ </element>
13
+ <element name="extractor_type" rngui:label="Extractor Type">
14
+ <choice>
15
+ <value id='intrinsic'>Intrinsic</value>
16
+ <value id='extrinsic'>Extrinsic</value>
17
+ <value id='separate'>Separate</value>
18
+ </choice>
19
+ </element>
20
+ <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
21
+ <text rngui:label="Code"/>
22
+ </element>
23
+ <element name="extractor_url" rngui:label="Extractor Service" rngui:hint='For separate data'>
24
+ <data type="string" rngui:label="Service Url"/>
25
+ </element>
26
+ <element name="extractor_params" rngui:label="Extractor Service Arguments:">
27
+ <zeroOrMore rngui:label="Create Argument Pairs">
28
+ <element rngui:label="Name">
29
+ <anyName/>
30
+ <data type="string" rngui:label="Value / Json"/>
31
+ </element>
32
+ </zeroOrMore>
33
+ </element>
34
+ <element name="visualizer_url" rngui:label="Visualizer Url">
35
+ <data type="string" rngui:label="Service Url"/>
36
+ </element>
37
+ <element name="visualizer_params" rngui:label="Visualizer Arguments">
38
+ <zeroOrMore rngui:label="Create Argument Pairs">
39
+ <element rngui:label="Name">
40
+ <anyName/>
41
+ <data type="string" rngui:label="Value / Json"/>
42
+ </element>
43
+ </zeroOrMore>
44
+ </element>
40
45
  </element>
41
- </element>
42
- </zeroOrMore>
43
- </element>
46
+ </zeroOrMore>
47
+ </element>
44
48
 
45
- <element name="ips" rngui:header="Impact Profiles" rngui:fold="closed">
46
- <zeroOrMore rngui:label="Add Impact Profile">
47
- <element name="ip">
48
- <element name="name" rngui:label="Label">
49
- <data type="string" rngui:label="Label"/>
50
- </element>
51
- <element name="target" rngui:label="Target Value">
52
- <data type="string" rngui:label="Value"/>
53
- </element>
54
- <element name="ifs" rngui:header="Impact Factors">
55
- <zeroOrMore rngui:label="Add Impact Factor">
56
- <element name="if">
57
- <element name="ivs" rngui:header="Impact Values">
58
- <zeroOrMore rngui:label="Add Impact Value ">
59
- <element name="iv">
60
- <element name="extractor_url" rngui:label="Extractor Url">
61
- <data type="string" rngui:label="Service Url + Parameters"/>
62
- </element>
63
- <element name="aggregator_url" rngui:label="Aggregator Url">
64
- <data type="string" rngui:label="Service Url + Parameters"/>
49
+ <element name="ips" rngui:header="Impact Profiles" rngui:fold="closed">
50
+ <zeroOrMore rngui:label="Add Impact Profile">
51
+ <element name="ip">
52
+ <element name="name" rngui:label="Label">
53
+ <data type="string" rngui:label="Label"/>
54
+ </element>
55
+ <element name="target" rngui:label="Target Value">
56
+ <data type="string" rngui:label="Value"/>
57
+ </element>
58
+ <element name="ifs" rngui:header="Impact Factors">
59
+ <zeroOrMore rngui:label="Add Impact Factor">
60
+ <element name="if">
61
+ <element name="ivs" rngui:header="Impact Values">
62
+ <zeroOrMore rngui:label="Add Impact Value ">
63
+ <element name="iv">
64
+ <element name="extractor_url" rngui:label="Extractor Url">
65
+ <data type="string" rngui:label="Service Url + Parameters"/>
66
+ </element>
67
+ <element name="extractor_params" rngui:header="Extractor Arguments">
68
+ <zeroOrMore rngui:label="Create Extractor Argument Pairs">
69
+ <element rngui:label="Name">
70
+ <anyName/>
71
+ <data type="string" rngui:label="Value / Json"/>
72
+ </element>
73
+ </zeroOrMore>
74
+ </element>
75
+ <element name="aggregator_url" rngui:label="Aggregator Url">
76
+ <data type="string" rngui:label="Service Url + Parameters"/>
77
+ </element>
78
+ <element name="aggregator_params" rngui:header="Extractor Arguments">
79
+ <zeroOrMore rngui:label="Create Aggregator Argument Pairs">
80
+ <element rngui:label="Name">
81
+ <anyName/>
82
+ <data type="string" rngui:label="Value / Json"/>
83
+ </element>
84
+ </zeroOrMore>
85
+ </element>
65
86
  </element>
66
- </element>
67
- </zeroOrMore>
87
+ </zeroOrMore>
88
+ </element>
89
+ <element name="aggregator_url" rngui:label="Impact Function Url">
90
+ <data type="string" rngui:label="Service Url + Parameters"/>
91
+ </element>
68
92
  </element>
69
- <element name="aggregator_url" rngui:label="Impact Function Url">
70
- <data type="string" rngui:label="Service Url + Parameters"/>
71
- </element>
72
- </element>
73
- </zeroOrMore>
74
- </element>
75
- <element name="vfunc_url" rngui:label="Violation Function Url">
76
- <data type="string" rngui:label="Service Url + Parameters"/>
93
+ </zeroOrMore>
94
+ </element>
95
+ <element name="vfunc_url" rngui:label="Violation Function Url">
96
+ <data type="string" rngui:label="Service Url + Parameters"/>
97
+ </element>
77
98
  </element>
78
- </element>
79
- </zeroOrMore>
99
+ </zeroOrMore>
100
+ </element>
101
+
80
102
  </element>
81
103
 
82
- </element>
83
104
  </element>
@@ -0,0 +1,9 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="cline stand" d="M 34.003906,5 V 4.1269531 c 0,-4.45934904 -3.585332,-8.0488281 -8.039062,-8.0488281 H 25"/>
3
+ <path class="cline stand" d="M 31.5,5 V 4.9667969 C 31.5,1.3836953 28.618741,-1.5 25.039062,-1.5 H 25"/>
4
+ <circle cx="27" cy="3" r="2" class="cfill cline rfill normal"/>
5
+ <g class="replace">
6
+ <rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
7
+ <path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
8
+ </g>
9
+ </svg>
@@ -1,8 +1,8 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <g class="replace">
3
3
  <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
4
- <path class="normal" transform="translate(-2,-2)" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
4
+ <path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
5
5
  </g>
6
- <circle cx="28" cy="27" r="9" class="cline rfill stand"/>
7
- <text transform="translate(28,31)" class="small">s</text>
6
+ <rect x="23" y="21" width="12" height="12" rx="2" class="cline rfill stand"/>
7
+ <text transform="translate(29,30.75)" class="small">s</text>
8
8
  </svg>
@@ -0,0 +1,11 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="cline stand" d="M 34.003906,5 V 4.1269531 c 0,-4.45934904 -3.585332,-8.0488281 -8.039062,-8.0488281 H 25"/>
3
+ <path class="cline stand" d="M 31.5,5 V 4.9667969 C 31.5,1.3836953 28.618741,-1.5 25.039062,-1.5 H 25"/>
4
+ <circle cx="27" cy="3" r="2" class="cfill cline rfill normal"/>
5
+ <g class="replace">
6
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
7
+ <path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
8
+ </g>
9
+ <rect x="23" y="21" width="12" height="12" rx="2" class="cline rfill stand"/>
10
+ <text transform="translate(29,30.75)" class="small">s</text>
11
+ </svg>
@@ -311,10 +311,18 @@ function WFAdaptorManifestation(adaptor) {
311
311
  },
312
312
  'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
313
313
  'resolve_symbol': function(node) {
314
- if($('> code', node).length > 0) {
315
- return 'callmanipulate';
314
+ if ($('> annotations > _context_data_analysis > probes > probe', node).length > 0) {
315
+ if ($('> code', node).length > 0) {
316
+ return 'callmanipulate_sensor';
317
+ } else {
318
+ return 'call_sensor';
319
+ }
316
320
  } else {
317
- return 'call';
321
+ if ($('> code', node).length > 0) {
322
+ return 'callmanipulate';
323
+ } else {
324
+ return 'call';
325
+ }
318
326
  }
319
327
  },
320
328
  'svg': self.adaptor.theme_dir + 'symbols/call.svg'
@@ -1242,13 +1250,25 @@ function WFAdaptorManifestation(adaptor) {
1242
1250
  // Abstract Elements
1243
1251
  // * they may only have an illustrator (or other parts)
1244
1252
  // * they HAVE TO have a parent
1253
+ this.elements.call_sensor = { /*{{{*/
1254
+ 'parent': 'call',
1255
+ 'illustrator': {//{{{
1256
+ 'svg': self.adaptor.theme_dir + 'symbols/call_sensor.svg'
1257
+ }//}}}
1258
+ }; /*}}}*/
1245
1259
  this.elements.callmanipulate = { /*{{{*/
1246
1260
  'parent': 'call',
1247
1261
  'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1248
1262
  'illustrator': {//{{{
1249
- 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
1250
1263
  'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
1251
- },//}}}
1264
+ }//}}}
1265
+ }; /*}}}*/
1266
+ this.elements.callmanipulate_sensor = { /*{{{*/
1267
+ 'parent': 'call',
1268
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1269
+ 'illustrator': {//{{{
1270
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate_sensor.svg'
1271
+ }//}}}
1252
1272
  }; /*}}}*/
1253
1273
  this.elements.loop_head = { /*{{{*/
1254
1274
  'parent': 'loop',
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.35"
3
+ s.version = "2.1.37"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -54,6 +54,8 @@ module CPEE
54
54
  /p:properties/p:attributes/p:*
55
55
  }
56
56
  def self::implementation(opts)
57
+ opts[:see_instances] ||= opts[:see_instances].nil? ? true : opts[:see_instances]
58
+
57
59
  opts[:instances] ||= File.expand_path(File.join(__dir__,'..','..','server','instances'))
58
60
  opts[:global_executionhandlers] ||= File.expand_path(File.join(__dir__,'..','..','server','executionhandlers'))
59
61
  opts[:executionhandlers] ||= ''
@@ -230,16 +232,21 @@ module CPEE
230
232
  class Instances < Riddl::Implementation #{{{
231
233
  def response
232
234
  opts = @a[0]
233
- Riddl::Parameter::Complex.new("wis","text/xml") do
234
- ins = XML::Smart::string('<instances/>')
235
- CPEE::Persistence::each_object(opts) do |instance|
236
- info = CPEE::Persistence::extract_item(instance,opts,'attributes/info')
237
- uuid = CPEE::Persistence::extract_item(instance,opts,'attributes/uuid')
238
- state = CPEE::Persistence::extract_item(instance,opts,'state')
239
- state_changed = CPEE::Persistence::extract_item(instance,opts,'state/@changed')
240
- ins.root.add('instance', info, 'uuid' => uuid, 'id' => instance, 'state' => state, 'state_changed' => state_changed )
235
+ pp @request[:env]['REMOTE_ADDR']
236
+ if opts[:see_instances] || @h['SEE_INSTANCES'] == 'true'
237
+ Riddl::Parameter::Complex.new("wis","text/xml") do
238
+ ins = XML::Smart::string('<instances/>')
239
+ CPEE::Persistence::each_object(opts) do |instance|
240
+ info = CPEE::Persistence::extract_item(instance,opts,'attributes/info')
241
+ uuid = CPEE::Persistence::extract_item(instance,opts,'attributes/uuid')
242
+ state = CPEE::Persistence::extract_item(instance,opts,'state')
243
+ state_changed = CPEE::Persistence::extract_item(instance,opts,'state/@changed')
244
+ ins.root.add('instance', info, 'uuid' => uuid, 'id' => instance, 'state' => state, 'state_changed' => state_changed )
245
+ end
246
+ ins.to_s
241
247
  end
242
- ins.to_s
248
+ else
249
+ Riddl::Parameter::Complex.new("wis","text/xml",'<instances><!-- instances list disabled. --></instances>')
243
250
  end
244
251
  end
245
252
  end #}}}
@@ -356,11 +363,15 @@ module CPEE
356
363
  CPEE::Message::send(:event,'state/change',File.join(opts[:url],'/'),id,content[:attributes]['uuid'],content[:attributes]['info'],content,redis)
357
364
  end
358
365
 
359
- empt = CPEE::Persistence::keys(id,opts).to_a
360
- empt.delete_if{|e| e =~ /\/handlers/ }
361
- redis.multi do |multi|
362
- multi.del empt
363
- multi.zrem 'instances', id
366
+ EM::add_timer(30) do
367
+ empt = CPEE::Persistence::keys(id,opts).to_a
368
+ ### is there to avoid that returning calls get intro problems
369
+ ### as we have add_timer now, it should work without this
370
+ # empt.delete_if{|e| e =~ /\/handlers/ }
371
+ redis.multi do |multi|
372
+ multi.del empt
373
+ multi.zrem 'instances', id
374
+ end
364
375
  end
365
376
  end
366
377
  end #}}}
data/lib/cpee/message.rb CHANGED
@@ -42,7 +42,6 @@ module CPEE
42
42
  def self::send_url(type, event, cpee, content={}, backend)
43
43
  topic = ::File::dirname(event)
44
44
  name = ::File::basename(event)
45
- client = Riddl::Client.new(backend)
46
45
  payload = {
47
46
  WHO => cpee,
48
47
  'topic' => topic,
@@ -32,7 +32,7 @@ module CPEE
32
32
  {
33
33
  :changed => values.keys,
34
34
  :deleted => deleted,
35
- :values => values,
35
+ :values => values.transform_values{|val| JSON::parse(val) rescue val },
36
36
  :attributes => ah.translate(attributes,dataelements,endpoints),
37
37
  },
38
38
  opts[:redis]
@@ -33,13 +33,13 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
33
33
  end # }}}
34
34
  def self::inform_syntax_error(arguments,err,code)# {{{
35
35
  controller = arguments[0]
36
- controller.notify("description/error", :message => err.message)
36
+ controller.notify("description/error", :message => err.backtrace[0].gsub(/([\w -_]+):(\d+):in.*/,'\\1, Line \2: ') + err.message)
37
37
  end# }}}
38
38
  def self::inform_connectionwrapper_error(arguments,err) # {{{
39
39
  controller = arguments[0]
40
40
  p err.message
41
41
  p err.backtrace
42
- controller.notify("executionhandler/error", :message => err.message)
42
+ controller.notify("executionhandler/error", :message => err.backtrace[0].gsub(/([\w -_]+):(\d+):in.*/,'\\1, Line \2: ') + err.message)
43
43
  end # }}}
44
44
  def self::inform_position_change(arguments,ipc={}) # {{{
45
45
  controller = arguments[0]
@@ -85,6 +85,10 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
85
85
  'instance' => @controller.instance_id,
86
86
  'instance_url' => @controller.instance_url,
87
87
  'instance_uuid' => @controller.uuid
88
+ },
89
+ :task => {
90
+ 'label' => @label,
91
+ 'id' => @handler_position
88
92
  }
89
93
  }
90
94
  end #}}}
@@ -138,16 +142,16 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
138
142
  c = c.read if c.respond_to? :read
139
143
  callback([ Riddl::Parameter::Complex.new('error','application/json',StringIO.new(JSON::generate({ 'status' => status, 'error' => c }))) ], headers)
140
144
  else
141
- if headers['CPEE_INSTANTIATION']
142
- @controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
143
- end
144
- if headers['CPEE_EVENT']
145
- @controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
146
- end
147
145
  if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
148
146
  headers['CPEE_UPDATE'] = true
149
147
  callback result, headers
150
148
  elsif headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.empty?
149
+ if headers['CPEE_INSTANTIATION']
150
+ @controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
151
+ end
152
+ if headers['CPEE_EVENT']
153
+ @controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
154
+ end
151
155
  # do nothing, later on things will happend
152
156
  else
153
157
  callback result, headers
@@ -159,6 +163,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
159
163
  raise "Wrong endpoint" if @handler_endpoint.nil? || @handler_endpoint.empty?
160
164
  @label = parameters[:label]
161
165
  @anno = parameters.delete(:annotations) rescue nil
166
+ @controller.notify("status/resource_utilization", :mib => GetProcessMem.new.mb, **Process.times.to_h)
162
167
  @controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :annotations => @anno)
163
168
  if passthrough.to_s.empty?
164
169
  proto_curl parameters
@@ -230,6 +235,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
230
235
  elsif result[0].is_a? Riddl::Parameter::Complex
231
236
  if result[0].mimetype == 'application/json'
232
237
  result = JSON::parse(result[0].value.read) rescue nil
238
+ elsif result[0].mimetype == 'text/csv'
239
+ result = result[0].value.read
233
240
  elsif result[0].mimetype == 'text/yaml'
234
241
  result = YAML::load(result[0].value.read) rescue nil
235
242
  elsif result[0].mimetype == 'application/xml' || result[0].mimetype == 'text/xml'
@@ -251,7 +258,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
251
258
  end
252
259
  end
253
260
  end
254
- result
261
+ if result.is_a? String
262
+ enc = detect_encoding(result)
263
+ enc == 'OTHER' ? result : (result.encode('UTF-8',enc) rescue convert_to_base64(result))
264
+ else
265
+ result
266
+ end
255
267
  end
256
268
 
257
269
  def detect_encoding(text)
@@ -283,13 +295,13 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
283
295
  { 'name' => r.name, 'data' => r.value }
284
296
  elsif r.is_a? Riddl::Parameter::Complex
285
297
  res = if r.mimetype == 'application/json'
286
- ttt = JSON::parse(r.value.read) rescue nil
287
- if ttt.nil?
288
- ''
289
- else
290
- enc = detect_encoding(ttt)
291
- enc == 'OTHER' ? ttt : (ttt.encode('UTF-8',enc) rescue convert_to_base64(ttt))
292
- end
298
+ ttt = r.value.read
299
+ enc = detect_encoding(ttt)
300
+ enc == 'OTHER' ? ttt.inspect : (ttt.encode('UTF-8',enc) rescue convert_to_base64(ttt))
301
+ elsif r.mimetype == 'text/csv'
302
+ ttt = r.value.read
303
+ enc = detect_encoding(ttt)
304
+ enc == 'OTHER' ? ttt.inspect : (ttt.encode('UTF-8',enc) rescue convert_to_base64(ttt))
293
305
  elsif r.mimetype == 'text/plain' || r.mimetype == 'text/html'
294
306
  ttt = r.value.read
295
307
  ttt = ttt.to_f if ttt == ttt.to_f.to_s
@@ -298,7 +310,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
298
310
  enc == 'OTHER' ? ttt.inspect : (ttt.encode('UTF-8',enc) rescue convert_to_base64(ttt))
299
311
  else
300
312
  convert_to_base64(r.value.read)
301
- r.value.rewind
302
313
  end
303
314
 
304
315
  tmp = {
@@ -318,6 +329,9 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
318
329
  @guard_files += result
319
330
  @handler_returnValue = simplify_result(result)
320
331
  @handler_returnOptions = options
332
+ if options['CPEE_INSTANTIATION']
333
+ @controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(options['CPEE_INSTANTIATION']))
334
+ end
321
335
  if options['CPEE_EVENT']
322
336
  @controller.notify("task/#{options['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv)
323
337
  end
@@ -348,14 +362,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
348
362
  end #}}}
349
363
 
350
364
  def test_condition(mr,code)
351
- res = mr.instance_eval(code)
365
+ res = mr.instance_eval(code,'Condition',1)
352
366
  @controller.notify("condition/eval", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
353
367
  res
354
368
  end
355
369
 
356
370
  def simulate(type,nesting,tid,parent,parameters={}) #{{{
357
- pp "#{type} - #{nesting} - #{tid} - #{parent} - #{parameters.inspect}"
358
-
359
371
  @controller.vote("simulating/step",
360
372
  :'activity-uuid' => @handler_activity_uuid,
361
373
  :label => @label,
@@ -14,6 +14,9 @@
14
14
  <running><!-- in this state you can set the following state -->
15
15
  <stopping/>
16
16
  </running>
17
+ <stopping><!-- in this state you can set the following state -->
18
+ <stopping/>
19
+ </stopping>
17
20
  <stopped><!-- in this state you can set the following four states -->
18
21
  <running/>
19
22
  <simulating/>
@@ -0,0 +1 @@
1
+ 931754
@@ -0,0 +1 @@
1
+ 931760
@@ -0,0 +1 @@
1
+ 931764
@@ -0,0 +1 @@
1
+ 931768
data/tools/cpee CHANGED
@@ -162,7 +162,7 @@ elsif command == 'archive'
162
162
  if File.basename(p2) =~ /(\d+)-(\d+)/
163
163
  names = ($1.to_i..$2.to_i).to_a
164
164
  elsif File.basename(p2) == '*'
165
- res = Typhoeus.get(File.join(base,'/'))
165
+ res = Typhoeus.get(File.join(base,'/'), headers: { 'see-instances' => 'true' })
166
166
  if res.success?
167
167
  XML::Smart.string(res.response_body) do |doc|
168
168
  doc.find('//instance/@id').each do |ele|
@@ -217,7 +217,7 @@ elsif command == 'abandon'
217
217
  if File.basename(p1) =~ /(\d+)-(\d+)/
218
218
  names = ($1.to_i..$2.to_i).to_a
219
219
  elsif File.basename(p1) == '*'
220
- res = Typhoeus.get(File.join(base,'/'))
220
+ res = Typhoeus.get(File.join(base,'/'), headers: { 'see-instances' => 'true' })
221
221
  if res.success?
222
222
  XML::Smart.string(res.response_body) do |doc|
223
223
  doc.find('//instance/@id').each do |ele|
@@ -237,6 +237,8 @@ elsif command == 'abandon'
237
237
  if res1.success?
238
238
  if res1.response_body == 'running'
239
239
  Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=stopping")
240
+ elsif res1.response_body == 'stopping'
241
+ Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=stopping")
240
242
  elsif res1.response_body == 'ready' || res1.response_body == 'stopped'
241
243
  Typhoeus.put(File.join(base,name.to_s,'properties','state','/'), headers: {'Content-Type' => 'application/x-www-form-urlencoded'}, body: "value=abandoned")
242
244
  end
@@ -250,7 +252,7 @@ elsif command == 'start'
250
252
  if File.basename(p1) =~ /(\d+)-(\d+)/
251
253
  names = ($1.to_i..$2.to_i).to_a
252
254
  elsif File.basename(p1) == '*'
253
- res = Typhoeus.get(File.join(base,'/'))
255
+ res = Typhoeus.get(File.join(base,'/'), headers: { 'see-instances' => 'true' })
254
256
  if res.success?
255
257
  XML::Smart.string(res.response_body) do |doc|
256
258
  doc.find('//instance/@id').each do |ele|
@@ -283,7 +285,7 @@ elsif command == 'delete!'
283
285
  if File.basename(p1) =~ /(\d+)-(\d+)/
284
286
  names = ($1.to_i..$2.to_i).to_a
285
287
  elsif File.basename(p1) == '*'
286
- res = Typhoeus.get(File.join(base,'/'))
288
+ res = Typhoeus.get(File.join(base,'/'), headers: { 'see-instances' => 'true' })
287
289
  if res.success?
288
290
  XML::Smart.string(res.response_body) do |doc|
289
291
  doc.find('//instance/@id').each do |ele|