cpee 1.5.12 → 1.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5da5a8f5d14d2c6a86c06638cc11171fb039666a0e26b79c2c8babefa4af3479
4
- data.tar.gz: 5d6cb5f0f3baf773f01b5fc85ab1187b8d3618a23484dfd8079b3b7cd7472dc0
3
+ metadata.gz: 01b8b9a828ac632cc2f725719661182a9f775f46438f543c65d00081494dae90
4
+ data.tar.gz: 14f6926c8a7b1faee502a18adf708ce2f0da55b15496f93d54370c9fa57c246c
5
5
  SHA512:
6
- metadata.gz: 72d67315a0f37b86944c677578a4d0993c862821c7490207cf8d15db3914a694870d15a44e39809c76e37f534fc51bd8109c343ec4bc65245db979b984ecfa64
7
- data.tar.gz: 8daf3094ec186d69af270b17cf4c1288eae9a2935e557c1c6b2219e3d8330c07c765dabc0a0b87161d63da48d0881d91f4596b00ee3394ba212ad2aa6e3476b8
6
+ metadata.gz: aefcc1e8ba225decbfe6cb3e20496ac31595436c1971f5c7650d1fd6e5b066458850852b41593f3c9fbb52870a102807d07814e5184eaf03f10fa9e9b621feb6
7
+ data.tar.gz: a2def60686fbbefb7810b490d88f2e58faf13b3e3da08beee999c46dac5ac2df91457c80099e014cfe0f8ebe334bf4e89c466fdee7ad56e2c7d9956e05d31504
@@ -67,9 +67,9 @@
67
67
  </element>
68
68
  </zeroOrMore>
69
69
  </element>
70
- <element name="_cost" rngui:header="Costs" rngui:fold="closed">
70
+ <element name="costs" rngui:header="Costs" rngui:fold="closed">
71
71
  <zeroOrMore rngui:label="Create Cost Factor">
72
- <element name='_cost_factor'>
72
+ <element name='cost_factor'>
73
73
  <element name="name" rngui:label="Label">
74
74
  <data type="string" rngui:label="Label"/>
75
75
  </element>
@@ -67,9 +67,9 @@
67
67
  </element>
68
68
  </zeroOrMore>
69
69
  </element>
70
- <element name="_cost" rngui:header="Costs" rngui:fold="closed">
70
+ <element name="costs" rngui:header="Costs" rngui:fold="closed">
71
71
  <zeroOrMore rngui:label="Create Cost Factor">
72
- <element name='_cost_factor'>
72
+ <element name='cost_factor'>
73
73
  <element name="name" rngui:label="Label">
74
74
  <data type="string" rngui:label="Label"/>
75
75
  </element>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.5.12"
3
+ s.version = "1.5.13"
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
@@ -130,9 +130,9 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
130
130
  def activity_handle(passthrough, parameters) # {{{
131
131
  raise "Wrong endpoint" if @handler_endpoint.nil? || @handler_endpoint.empty?
132
132
  @label = parameters[:label]
133
- @sensors = parameters[:sensors]
134
- @aggregators = parameters[:aggregators]
135
- @costs = parameters[:costs]
133
+ @sensors = parameters.dig(:stream,:sensors)
134
+ @aggregators = parameters.dig(:stream,:aggregators)
135
+ @costs = parameters.dig(:stream,:costs)
136
136
  @controller.notify("activity/calling", :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
137
137
  if passthrough.to_s.empty?
138
138
  proto_curl parameters
@@ -0,0 +1,217 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ This file is part of CPEE.
4
+
5
+ CPEE is free software: you can redistribute it and/or modify it under the terms
6
+ of the GNU General Public License as published by the Free Software Foundation,
7
+ either version 3 of the License, or (at your option) any later version.
8
+
9
+ CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
+
13
+ You should have received a copy of the GNU General Public License along with
14
+ CPEE (file COPYING in the main directory). If not, see
15
+ <http://www.gnu.org/licenses/>.
16
+ -->
17
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
18
+ <attributes>
19
+ <uuid>ea33c1e0-b5b6-44d3-b1a8-24b34ebf92cc</uuid>
20
+ <info>Matthias</info>
21
+ <modeltype>CPEE</modeltype>
22
+ <theme>preset</theme>
23
+ <customer>pilotfabrik</customer>
24
+ <status>development</status>
25
+ </attributes>
26
+ <state changed="2019-11-22T11:19:10+01:00">stopped</state>
27
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
28
+ <positions>
29
+ <a2 passthrough="">after</a2>
30
+ </positions>
31
+ <dataelements>
32
+ <a>1</a>
33
+ <intermediate>{"value":20}</intermediate>
34
+ <last>{"value":6,"anotherValue":3}</last>
35
+ </dataelements>
36
+ <endpoints>
37
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php?test=12</timeout>
38
+ <start_url>https://centurio.work/flow/start/url/</start_url>
39
+ <ipc_send>https://centurio.work/ing/correlators/message/send/</ipc_send>
40
+ <ipc_receive>https-get://centurio.work/ing/correlators/message/receive/</ipc_receive>
41
+ <ipc_delete>https-delete://centurio.work/ing/correlators/message/receive/</ipc_delete>
42
+ <data_creator>https://centurio.work/customers/bsm/workaroundlink/functionality/data_creator.php</data_creator>
43
+ <answer_later>https://centurio.work/customers/bsm/workaroundlink/functionality/answer_later.php</answer_later>
44
+ </endpoints>
45
+ <dsl>loop pre_test("true") do
46
+ call :a1, :data_creator, parameters: { :label =&gt; "Test", :method =&gt; :post, :arguments =&gt; [&#x2B50;(:name =&gt; :timeout, :value =&gt; -&gt;{ data.a }), &#x2B50;(:name =&gt; :test__, :value =&gt; -&gt;{ "12" })], :stream =&gt; {:sensors =&gt; "[ { \"name\": \"something\", \"extractor_url\": \"extractor.php\", \"extractor_arg\": \"{\\\"nav\\\":\\\"$.value\\\"}\", \"visualizer_url\": \"someurl.php\", \"visualizer_params\": { \"a\": \"b\", \"d\": \"c\" } }, { \"name\": \"value2\", \"extractor_url\": \"\", \"extractor_arg\": \"{\\\"nav\\\":\\\"$.anotherValue\\\"}\", \"visualizer_url\": \"\", \"visualizer_params\": \"\" } ]", :aggregators =&gt; {:aggregator =&gt; {:name =&gt; agglabel, :aggregator_url =&gt; "aggurl", :aggregator_arg =&gt; "aggarg"}}, :_cost =&gt; {:_cost_factor =&gt; {:name =&gt; "tarlabel", :target =&gt; "tarval", :vfunc_url =&gt; "viourl", :vfunc_arg =&gt; "vioarg", :vcost =&gt; "viocost"}}} }, finalize: &lt;&lt;-END, update: &lt;&lt;-END
47
+ data.last=result
48
+ END
49
+ data.intermediate=result
50
+ END
51
+ stop :a2
52
+ end
53
+ </dsl>
54
+ <dslx>
55
+ <description xmlns="http://cpee.org/ns/description/1.0">
56
+ <loop mode="pre_test" condition="true">
57
+ <_probability>
58
+ <_probability_min/>
59
+ <_probability_max/>
60
+ <_probability_avg/>
61
+ </_probability>
62
+ <call id="a1" endpoint="data_creator">
63
+ <parameters>
64
+ <label>Test</label>
65
+ <method>:post</method>
66
+ <arguments>
67
+ <timeout>!data.a</timeout>
68
+ <test__>12</test__>
69
+ </arguments>
70
+ <stream>
71
+ <sensors>
72
+ <sensor>
73
+ <name>something</name>
74
+ <extractor_url>extractor.php</extractor_url>
75
+ <extractor_arg>{"nav":"$.value"}</extractor_arg>
76
+ <visualizer_url>someurl.php</visualizer_url>
77
+ <visualizer_params>
78
+ <d>b</d>
79
+ <d>c</d>
80
+ </visualizer_params>
81
+ </sensor>
82
+ <sensor>
83
+ <name>value2</name>
84
+ <extractor_url/>
85
+ <extractor_arg>{"nav":"$.anotherValue"}</extractor_arg>
86
+ <visualizer_url/>
87
+ <visualizer_params/>
88
+ </sensor>
89
+ </sensors>
90
+ <aggregators>
91
+ <aggregator>
92
+ <name>agglabel</name>
93
+ <aggregator_url>"aggurl"</aggregator_url>
94
+ <aggregator_arg>"aggarg"</aggregator_arg>
95
+ </aggregator>
96
+ </aggregators>
97
+ <_cost>
98
+ <_cost_factor>
99
+ <name>"tarlabel"</name>
100
+ <target>"tarval"</target>
101
+ <vfunc_url>"viourl"</vfunc_url>
102
+ <vfunc_arg>"vioarg"</vfunc_arg>
103
+ <vcost>"viocost"</vcost>
104
+ </_cost_factor>
105
+ </_cost>
106
+ </stream>
107
+ </parameters>
108
+ <code>
109
+ <prepare/>
110
+ <finalize output="result">data.last=result</finalize>
111
+ <update output="result">data.intermediate=result</update>
112
+ <rescue output="result"/>
113
+ </code>
114
+ <annotations>
115
+ <_timing>
116
+ <_timing_min/>
117
+ <_timing_max/>
118
+ <_timing_avg/>
119
+ </_timing>
120
+ <_notes>
121
+ <_notes_general/>
122
+ <_notes_output/>
123
+ <_attachments/>
124
+ </_notes>
125
+ </annotations>
126
+ </call>
127
+ <stop id="a2"/>
128
+ </loop>
129
+ </description>
130
+ </dslx>
131
+ <status>
132
+ <id>0</id>
133
+ <message>undefined</message>
134
+ </status>
135
+ <description>
136
+ <description xmlns="http://cpee.org/ns/description/1.0">
137
+ <loop mode="pre_test" condition="true">
138
+ <_probability>
139
+ <_probability_min/>
140
+ <_probability_max/>
141
+ <_probability_avg/>
142
+ </_probability>
143
+ <call id="a1" endpoint="data_creator">
144
+ <parameters>
145
+ <label>Test</label>
146
+ <method>:post</method>
147
+ <arguments>
148
+ <timeout>!data.a</timeout>
149
+ <test__>12</test__>
150
+ </arguments>
151
+ <stream>
152
+ <sensors>
153
+ <sensor>
154
+ <name>something</name>
155
+ <extractor_url>extractor.php</extractor_url>
156
+ <extractor_arg>{"nav":"$.value"}</extractor_arg>
157
+ <visualizer_url>someurl.php</visualizer_url>
158
+ <visualizer_params>
159
+ <a>b</a>
160
+ <d>c</d>
161
+ </visualizer_params>
162
+ </sensor>
163
+ <sensor>
164
+ <name>value2</name>
165
+ <extractor_url/>
166
+ <extractor_arg>{"nav":"$.anotherValue"}</extractor_arg>
167
+ <visualizer_url/>
168
+ <visualizer_params/>
169
+ </sensor>
170
+ </sensors>
171
+ <aggregators>
172
+ <aggregator>
173
+ <name>agglabel</name>
174
+ <aggregator_url>"aggurl"</aggregator_url>
175
+ <aggregator_arg>"aggarg"</aggregator_arg>
176
+ </aggregator>
177
+ </aggregators>
178
+ <_cost>
179
+ <_cost_factor>
180
+ <name>"tarlabel"</name>
181
+ <target>"tarval"</target>
182
+ <vfunc_url>"viourl"</vfunc_url>
183
+ <vfunc_arg>"vioarg"</vfunc_arg>
184
+ <vcost>"viocost"</vcost>
185
+ </_cost_factor>
186
+ </_cost>
187
+ </stream>
188
+ </parameters>
189
+ <code>
190
+ <prepare/>
191
+ <finalize output="result">data.last=result</finalize>
192
+ <update output="result">data.intermediate=result</update>
193
+ <rescue output="result"/>
194
+ </code>
195
+ <annotations>
196
+ <_timing>
197
+ <_timing_min/>
198
+ <_timing_max/>
199
+ <_timing_avg/>
200
+ </_timing>
201
+ <_notes>
202
+ <_notes_general/>
203
+ <_notes_output/>
204
+ <_attachments/>
205
+ </_notes>
206
+ </annotations>
207
+ </call>
208
+ <stop id="a2"/>
209
+ </loop>
210
+ </description>
211
+ </description>
212
+ <transformation>
213
+ <description type="copy"/>
214
+ <dataelements type="none"/>
215
+ <endpoints type="none"/>
216
+ </transformation>
217
+ </properties>
@@ -375,9 +375,19 @@
375
375
  <xsl:text>]</xsl:text>
376
376
  </xsl:when>
377
377
  <xsl:when test="count(*) &gt; 0 and name()='sensors'">
378
- <xsl:text>"[ </xsl:text>
379
- <xsl:apply-templates select="*" mode="JSON"/>
380
- <xsl:text>]"</xsl:text>
378
+ <xsl:text>[</xsl:text>
379
+ <xsl:apply-templates select="d:*" mode="plainmulti"/>
380
+ <xsl:text>]</xsl:text>
381
+ </xsl:when>
382
+ <xsl:when test="count(*) &gt; 0 and name()='aggregators'">
383
+ <xsl:text>[</xsl:text>
384
+ <xsl:apply-templates select="d:*" mode="plainmulti"/>
385
+ <xsl:text>]</xsl:text>
386
+ </xsl:when>
387
+ <xsl:when test="count(*) &gt; 0 and name()='cost'">
388
+ <xsl:text>[</xsl:text>
389
+ <xsl:apply-templates select="d:*" mode="plainmulti"/>
390
+ <xsl:text>]</xsl:text>
381
391
  </xsl:when>
382
392
  <xsl:when test="count(*) &gt; 0 and not(name()='arguments')">
383
393
  <xsl:text>{</xsl:text>
@@ -392,6 +402,69 @@
392
402
  </xsl:otherwise>
393
403
  </xsl:choose>
394
404
  </xsl:template>
405
+ <xsl:template match="d:*" mode="plain">
406
+ <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
407
+ <xsl:text>:</xsl:text>
408
+ <xsl:value-of select="name()"/>
409
+ <xsl:text> =&gt; </xsl:text>
410
+ <xsl:choose>
411
+ <xsl:when test="count(*) &gt; 0 and count(*) = count(*[name()=name(../*[1])])">
412
+ <xsl:text>[</xsl:text>
413
+ <xsl:apply-templates select="d:*" mode="plainmulti"/>
414
+ <xsl:text>]</xsl:text>
415
+ </xsl:when>
416
+ <xsl:when test="count(*) &gt; 0">
417
+ <xsl:text>{</xsl:text>
418
+ <xsl:apply-templates select="d:*" mode="plain"/>
419
+ <xsl:text>}</xsl:text>
420
+ </xsl:when>
421
+ <xsl:when test="not(node())">
422
+ <xsl:text>nil</xsl:text>
423
+ </xsl:when>
424
+ <xsl:otherwise>
425
+ <xsl:choose>
426
+ <xsl:when test="substring(text(),1,1) = '!'">
427
+ <xsl:value-of select="substring(text(),2)"/>
428
+ </xsl:when>
429
+ <xsl:otherwise>
430
+ <xsl:text>"</xsl:text>
431
+ <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
432
+ <xsl:text>"</xsl:text>
433
+ </xsl:otherwise>
434
+ </xsl:choose>
435
+ </xsl:otherwise>
436
+ </xsl:choose>
437
+ </xsl:template>
438
+ <xsl:template match="d:*" mode="plainmulti">
439
+ <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
440
+ <xsl:text>{ </xsl:text>
441
+ <xsl:text>:</xsl:text>
442
+ <xsl:value-of select="name()"/>
443
+ <xsl:text> =&gt; </xsl:text>
444
+ <xsl:choose>
445
+ <xsl:when test="count(*) &gt; 0">
446
+ <xsl:text>{</xsl:text>
447
+ <xsl:apply-templates select="d:*" mode="plain"/>
448
+ <xsl:text>}</xsl:text>
449
+ </xsl:when>
450
+ <xsl:when test="not(node())">
451
+ <xsl:text>nil</xsl:text>
452
+ </xsl:when>
453
+ <xsl:otherwise>
454
+ <xsl:choose>
455
+ <xsl:when test="substring(text(),1,1) = '!'">
456
+ <xsl:value-of select="substring(text(),2)"/>
457
+ </xsl:when>
458
+ <xsl:otherwise>
459
+ <xsl:text>"</xsl:text>
460
+ <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
461
+ <xsl:text>"</xsl:text>
462
+ </xsl:otherwise>
463
+ </xsl:choose>
464
+ </xsl:otherwise>
465
+ </xsl:choose>
466
+ <xsl:text> }</xsl:text>
467
+ </xsl:template>
395
468
  <xsl:template match="d:*" mode="sub">
396
469
  <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
397
470
  <xsl:text>⭐(</xsl:text>
data/tools/cpee CHANGED
@@ -113,7 +113,7 @@ elsif command == 'archive'
113
113
  if File.basename(p2) =~ /(\d+)-(\d+)/
114
114
  names = ($1.to_i..$2.to_i).to_a
115
115
  elsif File.basename(p2) == '*'
116
- res = Typhoeus.get(File.join(base))
116
+ res = Typhoeus.get(File.join(base,'/'))
117
117
  if res.success?
118
118
  XML::Smart.string(res.response_body) do |doc|
119
119
  doc.find('//instance/@id').each do |ele|
@@ -166,7 +166,7 @@ elsif command == 'abandon'
166
166
  if File.basename(p1) =~ /(\d+)-(\d+)/
167
167
  names = ($1.to_i..$2.to_i).to_a
168
168
  elsif File.basename(p1) == '*'
169
- res = Typhoeus.get(File.join(base))
169
+ res = Typhoeus.get(File.join(base,'/'))
170
170
  if res.success?
171
171
  XML::Smart.string(res.response_body) do |doc|
172
172
  doc.find('//instance/@id').each do |ele|
@@ -196,7 +196,7 @@ elsif command == 'start'
196
196
  if File.basename(p1) =~ /(\d+)-(\d+)/
197
197
  names = ($1.to_i..$2.to_i).to_a
198
198
  elsif File.basename(p1) == '*'
199
- res = Typhoeus.get(File.join(base))
199
+ res = Typhoeus.get(File.join(base,'/'))
200
200
  if res.success?
201
201
  XML::Smart.string(res.response_body) do |doc|
202
202
  doc.find('//instance/@id').each do |ele|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.12
4
+ version: 1.5.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: tools
13
13
  cert_chain: []
14
- date: 2019-11-07 00:00:00.000000000 Z
14
+ date: 2019-11-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: riddl
@@ -287,7 +287,6 @@ files:
287
287
  - log/trace_sic.yaml
288
288
  - log/xes_xml.rb
289
289
  - log/xes_yaml.rb
290
- - server/dev.pid
291
290
  - server/dev.rb
292
291
  - server/handlerwrappers/default.rb
293
292
  - server/handlerwrappers/soap.rb
@@ -301,6 +300,7 @@ files:
301
300
  - server/resources/properties.schema.inactive
302
301
  - server/resources/test1.xml
303
302
  - server/resources/test2.xml
303
+ - server/resources/test3.xml
304
304
  - server/resources/topics.xml
305
305
  - server/resources/transformation.xml
306
306
  - server/resources/transformation_dslx.xsl
@@ -1 +0,0 @@
1
- 7174