cpee 1.3.202 → 1.3.203

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39abc9d97536d864171e4924da4921935aa43e2c
4
- data.tar.gz: 8a762337462e552b74335bdd0713a2062557a246
3
+ metadata.gz: 500b2d2e109041e785e87a01cea7c28fdf85e607
4
+ data.tar.gz: 37f97759c610a660b46cd77951b8ff1bb344d289
5
5
  SHA512:
6
- metadata.gz: c91404e6234785fd1504da9436983e7b82b448309369202b8de410299f59dc321d9f73b480a4d1581cd87bcbd592b62400d54eefc893d787cb0726741478b65d
7
- data.tar.gz: 621927fc29868c2fc2f1984f1073b8a56fa09235bddc723ea6b1a6065c59298ceb5b792d25e3a87474fd22de0acea43cce00089a94c9844ce8f5fa84b27ccd42
6
+ metadata.gz: 6d092a2b0eafa28d5517f4a1859583208f1cada803749cf3e7f216b79f9cdc06233a1d9cdce22aa9cdc8dcd992a8921e622c1912f00231d92bdd8370a07d5065
7
+ data.tar.gz: b6165c7de0d9f2019b985c78514b18c20d513e8cd81f774bdede20358b0013da593daf65c878ec837fb57e6567eb1f3fdc6677665aafc6848356b5bf43a97f07
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.202"
3
+ s.version = "1.3.203"
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"
@@ -19,6 +19,9 @@ require 'riddl/utils/notifications_producer'
19
19
  require 'riddl/utils/properties'
20
20
  require ::File.dirname(__FILE__) + '/controller'
21
21
 
22
+ require 'ostruct'
23
+ def →(a); OpenStruct.new(a); end
24
+
22
25
  module CPEE
23
26
 
24
27
  SERVER = File.expand_path(File.dirname(__FILE__) + '/../cpee.xml')
@@ -0,0 +1,152 @@
1
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
2
+ <attributes>
3
+ <uuid>119866ce-6da7-44f8-b493-05b851a3289e</uuid>
4
+ <info>Enter info here</info>
5
+ <modeltype>CPEE</modeltype>
6
+ <theme>default</theme>
7
+ </attributes>
8
+ <state>running</state>
9
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
10
+ <positions>
11
+ <a4>after</a4>
12
+ </positions>
13
+ <dataelements>
14
+ <persons>0</persons>
15
+ <card>Visa_12345</card>
16
+ <airline>Lufthansa</airline>
17
+ <hotels>["Rathaus","Ibis","Rathaus"]</hotels>
18
+ <from>Vienna</from>
19
+ <to>Prague</to>
20
+ <costs>823.0</costs>
21
+ </dataelements>
22
+ <endpoints>
23
+ <bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
24
+ <bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
25
+ <approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
26
+ </endpoints>
27
+ <dsl>call :a1, :bookAir, parameters: { :method =&gt; :post, :arguments =&gt; [→(:name =&gt; :from, :value =&gt; data.from), →(:name =&gt; :to, :value =&gt; data.to), →(:name =&gt; :persons, :value =&gt; data.persons)] }, finalize: &lt;&lt;-END
28
+ data.airline = result.value('id')
29
+ data.costs += result.value('costs').to_f
30
+ status.update 1, 'Hotel'
31
+ END
32
+ parallel do
33
+ loop pre_test{data.persons &gt; 0} do
34
+ parallel_branch data.persons do |p|
35
+ call :a2, :bookHotel, parameters: { :method =&gt; :post, :arguments =&gt; [→(:name =&gt; :to, :value =&gt; data.to)] }, finalize: &lt;&lt;-END
36
+ data.hotels &lt;&lt; result.value('id')
37
+ data.costs += result.value('costs').to_f
38
+ END
39
+ end
40
+ manipulate :a3, &lt;&lt;-END
41
+ data.persons -= 1
42
+ END
43
+ end
44
+ end
45
+ choose :inclusive do
46
+ alternative "data.costs &gt; 700" do
47
+ call :a4, :approve, parameters: { :method =&gt; :post, :arguments =&gt; [→(:name =&gt; :costs, :value =&gt; data.costs)] }
48
+ end
49
+ end
50
+ </dsl>
51
+ <dslx>
52
+ <description xmlns="http://cpee.org/ns/description/1.0">
53
+ <call id="a1" endpoint="bookAir">
54
+ <parameters>
55
+ <method>:post</method>
56
+ <arguments>
57
+ <from>data.from</from>
58
+ <to>data.to</to>
59
+ <persons>data.persons</persons>
60
+ </arguments>
61
+ </parameters>
62
+ <finalize output="result">data.airline = result.value('id')
63
+ data.costs += result.value('costs').to_f
64
+ status.update 1, 'Hotel'</finalize>
65
+ </call>
66
+ <parallel>
67
+ <loop mode="pre_test" condition="data.persons &gt; 0">
68
+ <parallel_branch pass="data.persons" local="p">
69
+ <call id="a2" endpoint="bookHotel">
70
+ <parameters>
71
+ <method>:post</method>
72
+ <arguments>
73
+ <to>data.to</to>
74
+ </arguments>
75
+ </parameters>
76
+ <finalize output="result">data.hotels &lt;&lt; result.value('id')
77
+ data.costs += result.value('costs').to_f</finalize>
78
+ </call>
79
+ </parallel_branch>
80
+ <manipulate id="a3">data.persons -= 1</manipulate>
81
+ </loop>
82
+ </parallel>
83
+ <choose>
84
+ <alternative condition="data.costs &gt; 700">
85
+ <call id="a4" endpoint="approve">
86
+ <parameters>
87
+ <method>:post</method>
88
+ <arguments>
89
+ <costs>data.costs</costs>
90
+ </arguments>
91
+ </parameters>
92
+ </call>
93
+ </alternative>
94
+ </choose>
95
+ </description>
96
+ </dslx>
97
+ <status>
98
+ <id>0</id>
99
+ <message>undefined</message>
100
+ </status>
101
+ <description>
102
+ <description xmlns="http://cpee.org/ns/description/1.0">
103
+ <call id="a1" endpoint="bookAir">
104
+ <parameters>
105
+ <method>:post</method>
106
+ <arguments>
107
+ <from>data.from</from>
108
+ <to>data.to</to>
109
+ <persons>data.persons</persons>
110
+ </arguments>
111
+ </parameters>
112
+ <finalize output="result">data.airline = result.value('id')
113
+ data.costs += result.value('costs').to_f
114
+ status.update 1, 'Hotel'</finalize>
115
+ </call>
116
+ <parallel>
117
+ <loop mode="pre_test" condition="data.persons &gt; 0">
118
+ <parallel_branch pass="data.persons" local="p">
119
+ <call id="a2" endpoint="bookHotel">
120
+ <parameters>
121
+ <method>:post</method>
122
+ <arguments>
123
+ <to>data.to</to>
124
+ </arguments>
125
+ </parameters>
126
+ <finalize output="result">data.hotels &lt;&lt; result.value('id')
127
+ data.costs += result.value('costs').to_f</finalize>
128
+ </call>
129
+ </parallel_branch>
130
+ <manipulate id="a3">data.persons -= 1</manipulate>
131
+ </loop>
132
+ </parallel>
133
+ <choose>
134
+ <alternative condition="data.costs &gt; 700">
135
+ <call id="a4" endpoint="approve">
136
+ <parameters>
137
+ <method>:post</method>
138
+ <arguments>
139
+ <costs>data.costs</costs>
140
+ </arguments>
141
+ </parameters>
142
+ </call>
143
+ </alternative>
144
+ </choose>
145
+ </description>
146
+ </description>
147
+ <transformation>
148
+ <description type="copy"/>
149
+ <dataelements type="rest"/>
150
+ <endpoints type="rest"/>
151
+ </transformation>
152
+ </properties>
@@ -0,0 +1,9 @@
1
+ require 'ostruct'
2
+
3
+ def →(a)
4
+ p a
5
+ OpenStruct.new(a)
6
+ end
7
+
8
+ x = [→(:a => 'b')]
9
+ p x[0].a
@@ -354,20 +354,11 @@
354
354
  </xsl:template>
355
355
  <xsl:template match="d:*" mode="sub">
356
356
  <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
357
- <xsl:text>Struct.new(:name, :value</xsl:text>
358
357
 
359
- <xsl:if test="count(@*) &gt; 0">
360
- <xsl:for-each select="@*">
361
- <xsl:text>, </xsl:text>
362
- <xsl:text>:</xsl:text>
363
- <xsl:value-of select="name(.)"/>
364
- </xsl:for-each>
365
- </xsl:if>
366
-
367
- <xsl:text>).new(</xsl:text>
368
- <xsl:text>:</xsl:text>
358
+ <xsl:text>→(</xsl:text>
359
+ <xsl:text>:name =&gt; :</xsl:text>
369
360
  <xsl:value-of select="name()"/>
370
- <xsl:text>, </xsl:text>
361
+ <xsl:text>, :value =&gt; </xsl:text>
371
362
  <xsl:choose>
372
363
  <xsl:when test="not(node())">
373
364
  <xsl:text>nil</xsl:text>
@@ -377,8 +368,9 @@
377
368
  </xsl:otherwise>
378
369
  </xsl:choose>
379
370
  <xsl:for-each select="@*">
380
- <xsl:text>, </xsl:text>
381
- <xsl:text>"</xsl:text>
371
+ <xsl:text>, :</xsl:text>
372
+ <xsl:value-of select="name()"/>
373
+ <xsl:text> =&gt; "</xsl:text>
382
374
  <xsl:value-of select="string(.)"/>
383
375
  <xsl:text>"</xsl:text>
384
376
  </xsl:for-each>
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.3.202
4
+ version: 1.3.203
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -291,10 +291,11 @@ files:
291
291
  - server/instances/15/properties.xml
292
292
  - server/instances/16/properties.xml
293
293
  - server/instances/17/properties.xml
294
- - server/instances/18/notifications/b4e45a42c61d03b052d768c1693af99f/consumer-secret
295
- - server/instances/18/notifications/b4e45a42c61d03b052d768c1693af99f/producer-secret
296
- - server/instances/18/notifications/b4e45a42c61d03b052d768c1693af99f/subscription.xml
297
294
  - server/instances/18/properties.xml
295
+ - server/instances/19/notifications/3a1729f8cd49263b8623f2d7208993f6/consumer-secret
296
+ - server/instances/19/notifications/3a1729f8cd49263b8623f2d7208993f6/producer-secret
297
+ - server/instances/19/notifications/3a1729f8cd49263b8623f2d7208993f6/subscription.xml
298
+ - server/instances/19/properties.xml
298
299
  - server/instances/2/properties.xml
299
300
  - server/instances/3/properties.xml
300
301
  - server/instances/4/properties.xml
@@ -308,6 +309,7 @@ files:
308
309
  - server/resources/properties.schema.active
309
310
  - server/resources/properties.schema.finished
310
311
  - server/resources/properties.schema.inactive
312
+ - server/resources/test.rb
311
313
  - server/resources/topics.xml
312
314
  - server/resources/transformation.xml
313
315
  - server/resources/transformation_dslx.xsl