cpee 1.3.184 → 1.3.185
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 +4 -4
- data/cockpit/testsets/Log.xml +116 -0
- data/cpee.gemspec +2 -2
- data/log/log.xml +13 -0
- data/log/logs/1/test +1 -0
- data/log/server.rb +83 -0
- data/log/template.xes +6 -0
- data/log/topics.xml +22 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 643fe6d4ecaecf140b12011dff2a411aa84816af
|
|
4
|
+
data.tar.gz: b4accb49ec73bf5d8952a640ee61d2107cb59a2b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e5080fe480156c17a1e22df10d0c3dc03ee25f18c515891f335617642e53342ab014b8aedfa49bf8c337a749083cefd1219f5894e2e24b1ac062f5c56809f48
|
|
7
|
+
data.tar.gz: 82df739a32027bde851027de8d972be80113f0fd1f46b2fb41b53801c52257b22a94a07db67f89cfa5f0d69aa4611fe2f8bed80a7228990856d9cd91ae36ec6d
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<testset>
|
|
3
|
+
<handlers>
|
|
4
|
+
<handler url="http://solo.wst.univie.ac.at:9299/log">
|
|
5
|
+
<events topic="activity">calling,done</events>
|
|
6
|
+
</handler>
|
|
7
|
+
</handlers>
|
|
8
|
+
<dataelements/>
|
|
9
|
+
<handlerwrapper>LogHandlerWrapper</handlerwrapper>
|
|
10
|
+
<endpoints>
|
|
11
|
+
<timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
|
12
|
+
<start xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://solo.wst.univie.ac.at/log.php</start>
|
|
13
|
+
</endpoints>
|
|
14
|
+
<positions/>
|
|
15
|
+
<description>
|
|
16
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
17
|
+
<call id="a0" endpoint="start">
|
|
18
|
+
<parameters>
|
|
19
|
+
<label>"Task 1"</label>
|
|
20
|
+
<method/>
|
|
21
|
+
<type>:task</type>
|
|
22
|
+
<mid>'sid-7F616193-69F1-4097-A107-FC87404AE047'</mid>
|
|
23
|
+
<arguments/>
|
|
24
|
+
</parameters>
|
|
25
|
+
<finalize output="result"> data.x = result["n"]</finalize>
|
|
26
|
+
</call>
|
|
27
|
+
<choose mode="exclusive">
|
|
28
|
+
<alternative condition="data.x >= 100" language="text/javascript">
|
|
29
|
+
<call id="a11" endpoint="timeout">
|
|
30
|
+
<parameters>
|
|
31
|
+
<label>"Decision 2"</label>
|
|
32
|
+
<method/>
|
|
33
|
+
<type>:task</type>
|
|
34
|
+
<mid>'sid-F9FF9265-DAD9-4525-86DE-116C3F1FA44E'</mid>
|
|
35
|
+
<arguments>
|
|
36
|
+
<timeout>2</timeout>
|
|
37
|
+
</arguments>
|
|
38
|
+
</parameters>
|
|
39
|
+
</call>
|
|
40
|
+
</alternative>
|
|
41
|
+
<alternative condition="100 > data.x" language="text/javascript">
|
|
42
|
+
<call id="a10" endpoint="timeout">
|
|
43
|
+
<parameters>
|
|
44
|
+
<label>"Decision 1"</label>
|
|
45
|
+
<method/>
|
|
46
|
+
<type>:task</type>
|
|
47
|
+
<mid>'sid-603319C1-A371-4D9F-94DA-D9800C2E205F'</mid>
|
|
48
|
+
<arguments>
|
|
49
|
+
<timeout>2</timeout>
|
|
50
|
+
</arguments>
|
|
51
|
+
</parameters>
|
|
52
|
+
</call>
|
|
53
|
+
</alternative>
|
|
54
|
+
</choose>
|
|
55
|
+
<call id="a1" endpoint="timeout">
|
|
56
|
+
<parameters>
|
|
57
|
+
<label>"Task 2"</label>
|
|
58
|
+
<method/>
|
|
59
|
+
<type>:task</type>
|
|
60
|
+
<mid>'sid-B93496AA-15AA-4239-B301-8899F47204EE'</mid>
|
|
61
|
+
<arguments>
|
|
62
|
+
<timeout>2</timeout>
|
|
63
|
+
</arguments>
|
|
64
|
+
</parameters>
|
|
65
|
+
</call>
|
|
66
|
+
<parallel wait="-1">
|
|
67
|
+
<parallel_branch>
|
|
68
|
+
<call id="a4" endpoint="timeout">
|
|
69
|
+
<parameters>
|
|
70
|
+
<label>"P1"</label>
|
|
71
|
+
<method/>
|
|
72
|
+
<type>:task</type>
|
|
73
|
+
<mid>'sid-B410A048-6485-47AF-AA9A-3F570EC9799A'</mid>
|
|
74
|
+
<arguments>
|
|
75
|
+
<timeout>2</timeout>
|
|
76
|
+
</arguments>
|
|
77
|
+
</parameters>
|
|
78
|
+
</call>
|
|
79
|
+
</parallel_branch>
|
|
80
|
+
<parallel_branch>
|
|
81
|
+
<call id="a5" endpoint="timeout">
|
|
82
|
+
<parameters>
|
|
83
|
+
<label>"P2"</label>
|
|
84
|
+
<method/>
|
|
85
|
+
<type>:task</type>
|
|
86
|
+
<mid>'sid-E0C9C538-5D05-4578-8156-3947A40146A6'</mid>
|
|
87
|
+
<arguments>
|
|
88
|
+
<timeout>2</timeout>
|
|
89
|
+
</arguments>
|
|
90
|
+
</parameters>
|
|
91
|
+
</call>
|
|
92
|
+
</parallel_branch>
|
|
93
|
+
</parallel>
|
|
94
|
+
<call id="a7" endpoint="timeout">
|
|
95
|
+
<parameters>
|
|
96
|
+
<label>"Task 3"</label>
|
|
97
|
+
<method/>
|
|
98
|
+
<type>:task</type>
|
|
99
|
+
<mid>'sid-4692423B-174F-4460-B034-19E0624C585E'</mid>
|
|
100
|
+
<arguments>
|
|
101
|
+
<timeout>2</timeout>
|
|
102
|
+
</arguments>
|
|
103
|
+
</parameters>
|
|
104
|
+
</call>
|
|
105
|
+
</description>
|
|
106
|
+
</description>
|
|
107
|
+
<transformation>
|
|
108
|
+
<description type="copy"/>
|
|
109
|
+
<dataelements type="none"/>
|
|
110
|
+
<endpoints type="none"/>
|
|
111
|
+
</transformation>
|
|
112
|
+
<attributes>
|
|
113
|
+
<info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">s</info>
|
|
114
|
+
<modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">Signavio</modeltype>
|
|
115
|
+
</attributes>
|
|
116
|
+
</testset>
|
data/cpee.gemspec
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "cpee"
|
|
3
|
-
s.version = "1.3.
|
|
3
|
+
s.version = "1.3.185"
|
|
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"
|
|
7
7
|
|
|
8
8
|
s.description = "see http://cpee.org"
|
|
9
9
|
|
|
10
|
-
s.files = Dir['{example/**/*,server/**/*,lib/**/*,cockpit/**/*,contrib/logo*,contrib/Screen
|
|
10
|
+
s.files = Dir['{example/**/*,server/**/*,lib/**/*,cockpit/**/*,contrib/logo*,contrib/Screen*,log/**/*}'] + %w(COPYING FEATURES INSTALL Rakefile cpee.gemspec README AUTHORS)
|
|
11
11
|
s.require_path = 'lib'
|
|
12
12
|
s.extra_rdoc_files = ['README']
|
|
13
13
|
s.test_files = Dir['{test/*,test/*/tc_*.rb}']
|
data/log/log.xml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<declaration xmlns="http://riddl.org/ns/declaration/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
2
|
+
<interface name="events">
|
|
3
|
+
<xi:include href="http://www.riddl.org/ns/common-patterns/notifications-consumer/1.0/consumer.xml"/>
|
|
4
|
+
</interface>
|
|
5
|
+
|
|
6
|
+
<facade>
|
|
7
|
+
<tile>
|
|
8
|
+
<layer name="events">
|
|
9
|
+
<apply-to>/log</apply-to>
|
|
10
|
+
</layer>
|
|
11
|
+
</tile>
|
|
12
|
+
</facade>
|
|
13
|
+
</declaration>
|
data/log/logs/1/test
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test
|
data/log/server.rb
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/ruby
|
|
2
|
+
require 'pp'
|
|
3
|
+
require 'json'
|
|
4
|
+
require 'rubygems'
|
|
5
|
+
require 'riddl/server'
|
|
6
|
+
require 'riddl/client'
|
|
7
|
+
require 'riddl/utils/notifications_producer'
|
|
8
|
+
require 'riddl/utils/properties'
|
|
9
|
+
require 'riddl/utils/fileserve'
|
|
10
|
+
require 'riddl/utils/downloadify'
|
|
11
|
+
require 'riddl/utils/turtle'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Logging < Riddl::Implementation #{{{
|
|
15
|
+
def response
|
|
16
|
+
topic = @p[1].value
|
|
17
|
+
event = @p[2].value
|
|
18
|
+
if(topic == 'activity' && (event=='done' || event == 'calling'))
|
|
19
|
+
log_dir = ::File.dirname(__FILE__) + "/logs"
|
|
20
|
+
instancenr = @h['CPEE_INSTANCE'].split('/').last
|
|
21
|
+
notification = JSON.parse(@p[3].value)
|
|
22
|
+
log_hash = notification['log_hash']
|
|
23
|
+
Dir.mkdir(log_dir+'/'+instancenr) unless Dir.exist?(log_dir+'/'+instancenr)
|
|
24
|
+
unless File.exist?(log_dir+'/'+instancenr+'/log.xes')
|
|
25
|
+
FileUtils.cp(::File.dirname(__FILE__)+'/template.xes', log_dir+'/'+instancenr+'/log.xes')
|
|
26
|
+
XML::Smart.modify(log_dir+'/'+instancenr+'/log.xes') do |xml|
|
|
27
|
+
trace = xml.find("/xmlns:log/xmlns:trace").first
|
|
28
|
+
trace.add 'string', :key => "concept:name", :value => "Instance #{instancenr}"
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
time_added=false
|
|
33
|
+
XML::Smart.modify(log_dir+'/'+instancenr+'/log.xes') do |xml|
|
|
34
|
+
trace = xml.find("/xmlns:log/xmlns:trace").first
|
|
35
|
+
event = trace.add "event"
|
|
36
|
+
event.add 'string', :key => "concept:name", :value => log_hash["label"]
|
|
37
|
+
event.add 'string', :key => "lifecycle:transition", :value => event=='done'?"complete":"start"
|
|
38
|
+
pp log_hash
|
|
39
|
+
if log_hash.has_key?("data_send")
|
|
40
|
+
list = event.add 'list', :key => "data_send"
|
|
41
|
+
log_hash["data_send"].each do |k,v|
|
|
42
|
+
list.add 'string', :key => k , :value => v
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
if log_hash.has_key?("data_received")
|
|
46
|
+
log_hash["data_received"].delete_if do |e|
|
|
47
|
+
if e.keys[0]=="timestamp"
|
|
48
|
+
event.add 'date', :key => "time:timestamp", :value => e.values[0]
|
|
49
|
+
time_added=true
|
|
50
|
+
true
|
|
51
|
+
else
|
|
52
|
+
false
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
if log_hash["data_received"].length > 0
|
|
56
|
+
list = event.add 'list', :key => "data_received"
|
|
57
|
+
log_hash["data_received"].each{|e| list.add 'string', :key => e.keys[0] , :value => e.values[0]}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
event.add 'date', :key => "time:timestamp", :value => Time.now unless time_added
|
|
61
|
+
end
|
|
62
|
+
else
|
|
63
|
+
pp "Something wrong"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
end
|
|
70
|
+
end #}}}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
Riddl::Server.new(::File.dirname(__FILE__) + '/log.xml', :host => "solo.wst.univie.ac.at", :port => 9299) do #{{{
|
|
74
|
+
accessible_description true
|
|
75
|
+
cross_site_xhr true
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
interface 'events' do
|
|
79
|
+
run Logging if post 'event'
|
|
80
|
+
#run CB if post 'vote'
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
end.loop! #}}}
|
data/log/template.xes
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<log xmlns="http://www.xes-standard.org/" xes.version="1.0" xes.features="nested-attributes" openxes.version="1.0RC7">
|
|
2
|
+
<extension name="Time" prefix="time" uri="http://www.xes-standard.org/time.xesext"/>
|
|
3
|
+
<extension name="Concept" prefix="concept" uri="http://www.xes-standard.org/concept.xesext"/>
|
|
4
|
+
<extension name="Organizational" prefix="org" uri="http://www.xes-standard.org/org.xesext"/>
|
|
5
|
+
<trace/>
|
|
6
|
+
</log>
|
data/log/topics.xml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
This file is part of CPEE.
|
|
3
|
+
|
|
4
|
+
CPEE is free software: you can redistribute it and/or modify it under the terms
|
|
5
|
+
of the GNU General Public License as published by the Free Software Foundation,
|
|
6
|
+
either version 3 of the License, or (at your option) any later version.
|
|
7
|
+
|
|
8
|
+
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
9
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
10
|
+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
11
|
+
|
|
12
|
+
You should have received a copy of the GNU General Public License along with
|
|
13
|
+
CPEE (file COPYING in the main directory). If not, see
|
|
14
|
+
<http://www.gnu.org/licenses/>.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<topics xmlns='http://riddl.org/ns/common-patterns/notifications-producer/1.0'>
|
|
18
|
+
<topic id='activity'>
|
|
19
|
+
<event>calling</event>
|
|
20
|
+
<event>done</event>
|
|
21
|
+
</topic>
|
|
22
|
+
</topics>
|
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.
|
|
4
|
+
version: 1.3.185
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juergen eTM Mangler
|
|
@@ -108,6 +108,7 @@ files:
|
|
|
108
108
|
- cockpit/testsets/ICSOC Testset.xml
|
|
109
109
|
- cockpit/testsets/Infinity.xml
|
|
110
110
|
- cockpit/testsets/Linear.xml
|
|
111
|
+
- cockpit/testsets/Log.xml
|
|
111
112
|
- cockpit/testsets/Mangler 1.xml
|
|
112
113
|
- cockpit/testsets/Mangler 2.xml
|
|
113
114
|
- cockpit/testsets/Promise.xml
|
|
@@ -267,6 +268,11 @@ files:
|
|
|
267
268
|
- lib/engine/callbacks.rng
|
|
268
269
|
- lib/engine/instance-info.rng
|
|
269
270
|
- lib/engine/instances.rng
|
|
271
|
+
- log/log.xml
|
|
272
|
+
- log/logs/1/test
|
|
273
|
+
- log/server.rb
|
|
274
|
+
- log/template.xes
|
|
275
|
+
- log/topics.xml
|
|
270
276
|
- server/handlerwrappers/default.rb
|
|
271
277
|
- server/handlerwrappers/log.rb
|
|
272
278
|
- server/handlerwrappers/soap.rb
|