cpee 1.3.173 → 1.3.174

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +31 -17
  3. data/cockpit/index.html +27 -21
  4. data/cockpit/js/instance.js +74 -46
  5. data/cockpit/js/wfadaptor.cpee.js +1 -1
  6. data/cockpit/lib/{contextmenu.css → custommenu.css} +14 -8
  7. data/cockpit/lib/custommenu.js +101 -0
  8. data/cpee.gemspec +1 -1
  9. data/lib/cpee/controller.rb +1 -1
  10. data/lib/cpee/handler_properties.rb +2 -0
  11. data/lib/cpee/implementation.rb +5 -3
  12. data/server/handlerwrappers/default.rb +5 -0
  13. data/server/instances/12/notifications/7ace1a6f6974fe3574107a19b5e9d036/consumer-secret +1 -0
  14. data/server/instances/12/notifications/7ace1a6f6974fe3574107a19b5e9d036/producer-secret +1 -0
  15. data/server/instances/12/notifications/7ace1a6f6974fe3574107a19b5e9d036/subscription.xml +33 -0
  16. data/server/instances/15/properties.xml +44 -0
  17. data/server/instances/16/properties.xml +44 -0
  18. data/server/instances/17/properties.xml +44 -0
  19. data/server/instances/18/properties.xml +45 -0
  20. data/server/instances/19/properties.xml +45 -0
  21. data/server/instances/20/properties.xml +46 -0
  22. data/server/instances/21/properties.xml +46 -0
  23. data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/consumer-secret +1 -0
  24. data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/producer-secret +1 -0
  25. data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/subscription.xml +23 -0
  26. data/server/instances/22/properties.xml +112 -0
  27. data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/consumer-secret +1 -0
  28. data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/producer-secret +1 -0
  29. data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/subscription.xml +23 -0
  30. data/server/instances/23/properties.xml +148 -0
  31. data/server/resources/properties.init +4 -2
  32. data/server/resources/properties.schema.active +2 -5
  33. data/server/resources/properties.schema.finished +2 -5
  34. data/server/resources/properties.schema.inactive +2 -5
  35. data/server/resources/topics.xml +3 -0
  36. data/server/server.pid +1 -0
  37. metadata +23 -4
  38. data/cockpit/lib/contextmenu.js +0 -63
@@ -0,0 +1,101 @@
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
+ function CustomMenu(e) {
18
+ var target = $(e.target);
19
+ var x = e.pageX;
20
+ var y = e.pageY;
21
+ var remove = function(event) {};
22
+ this.remove = remove;
23
+ e.stopPropagation();
24
+
25
+ this.contextmenu = function(items) {
26
+ remove = function(event) {
27
+ if (!event) {
28
+ $('.contextmenu:first').remove();
29
+ $('body', document).unbind('mousedown',remove);
30
+ return;
31
+ }
32
+
33
+ if($(event.target).parent('tr.contextmenuitem') && (event.button == 0)) { $(event.target).click(); }
34
+ $('.contextmenu:first').remove();
35
+ $('body', document).unbind('mousedown',remove);
36
+ }
37
+ $('body', document).bind('mousedown',remove);
38
+
39
+ if($('div.contextmenu').length > 0) remove();
40
+ var div = $('<div class="contextmenu"><table class="contextmenu"/></div>');
41
+ for(head in items) {
42
+ div.children(':first').append('<tr class="contextmenuheader"><td colspan="2">' + head + '</td></tr>');
43
+ for(item in items[head]) {
44
+ var icon = null;
45
+ if(items[head][item].menu_icon) {
46
+ icon = $X('<svg xmlns="http://www.w3.org/2000/svg" version="1.1">' +
47
+ '<g transform="translate(1,1) scale(0.5, 0.5)"/>' +
48
+ '</svg>');
49
+ icon.children('g').append(items[head][item].menu_icon().children());
50
+ icon = icon.serializeXML();
51
+ }
52
+ var row = $('<tr class="contextmenuitem"><td class="contextmenuicon"><div>' + (icon == null ? '' : icon) + '</div></td><td>' + items[head][item].label + '</td></tr>');
53
+ div.children(':first').append(row);
54
+ row.bind('click', items[head][item], function(event){
55
+ event.data.function_call.apply(null, event.data.params);
56
+ });
57
+ }
58
+ }
59
+ div.css({'left':x+5,'top':y+5, 'display':'block'});
60
+ $('body', document).append(div);
61
+ if(($(window).height() < (y + div.height()))) { // contextmenu is position
62
+ div.css({'top':$(window).height()-div.height()-5});
63
+ }
64
+ if((document.body.clientWidth < (x + div.width())) && (x-div.width()-5 >= 0)) { // contextmenu is position
65
+ div.css({'left':x-div.width()-5});
66
+ }
67
+ }
68
+
69
+ this.menu = function(menu,call) {
70
+ remove = function(event) {
71
+ if ($(event.target).parent('div.menu') && (event.button == 0)) { $(event.target).click(); }
72
+ menu.hide();
73
+ $('body', document).unbind('mousedown',remove);
74
+ $("div.menuitem",$(menu)).each(function(ind,ele){
75
+ $(ele).unbind('click',mitemclick);
76
+ });
77
+ }
78
+
79
+ menu.show();
80
+ var mitemclick = function(ele){
81
+ $("div.menuitem[data-selected=selected]",$(menu)).each(function(ind,rem){ $(rem).removeAttr('data-selected'); });
82
+ $(ele.target).attr('data-selected','selected');
83
+ call(ele.target);
84
+ };
85
+ $('body', document).bind('mousedown',remove);
86
+
87
+ $("div.menuitem",$(menu)).each(function(ind,ele){
88
+ $(ele).bind('click',mitemclick);
89
+ });
90
+
91
+ var off = target.offset();
92
+
93
+ menu.css({'left':off.left,'top':off.top+target.outerHeight() + 1,'min-width': target.width()});
94
+ if(($(window).height() < (y + menu.height()))) {
95
+ menu.css({'top':$(window).height()-menu.height()-5});
96
+ }
97
+ if((document.body.clientWidth < (x + menu.width())) && (x-menu.width()-5 >= 0)) {
98
+ menu.css({'left':x-menu.width()-5});
99
+ }
100
+ }
101
+ }
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.173"
3
+ s.version = "1.3.174"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
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"
@@ -154,7 +154,7 @@ module CPEE
154
154
  end # }}}
155
155
 
156
156
  def info
157
- @properties.data.find("string(/p:properties/p:info)")
157
+ @properties.data.find("string(/p:properties/p:attributes/p:info)")
158
158
  end
159
159
 
160
160
  def serialize_dataelements! #{{{
@@ -32,6 +32,8 @@ class PropertiesHandler < Riddl::Utils::Properties::HandlerBase
32
32
  when 'positions'
33
33
  @data.unserialize_positions!
34
34
  @data.notify('properties/position/change', :instance => @data.instance)
35
+ when 'transformation'
36
+ @data.notify('properties/transformation/change', :instance => @data.instance)
35
37
  when 'state'
36
38
  @data.unserialize_state!
37
39
  else
@@ -45,7 +45,8 @@ module CPEE
45
45
  end unless opts[:handlerwrappers].strip == ''
46
46
 
47
47
  controller = {}
48
- Dir[opts[:instances] + '/*/properties.xml'].map{|e|::File::basename(::File::dirname(e))}.each do |id|
48
+ Dir[opts[:instances] + '/*/properties.xml'].each do |e|
49
+ id = ::File::basename(::File::dirname(e))
49
50
  controller[id.to_i] = Controller.new(id,opts)
50
51
  end
51
52
 
@@ -116,7 +117,7 @@ module CPEE
116
117
  Riddl::Parameter::Complex.new("wis","text/xml") do
117
118
  ins = XML::Smart::string('<instances/>')
118
119
  controller.each do |k,v|
119
- name = v.properties.data.find("string(/p:properties/p:info)")
120
+ name = v.properties.data.find("string(/p:properties/p:attributes/p:info)")
120
121
  state = v.properties.data.find("string(/p:properties/p:state)")
121
122
  ins.root.add('instance',name, 'id' => k, 'state' => state)
122
123
  end
@@ -138,7 +139,8 @@ module CPEE
138
139
  break
139
140
  end
140
141
  controller[id] = Controller.new(id,opts)
141
- controller[id].properties.data.find("/p:properties/p:info").first.text = name
142
+ info = controller[id].properties.data.find("/p:properties/p:attributes/p:info")
143
+ info.first.text = name if info.length == 1
142
144
 
143
145
  Riddl::Parameter::Simple.new("id", id)
144
146
  end
@@ -42,6 +42,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
42
42
  params << Riddl::Header.new("CPEE_BASE",@controller.base_url)
43
43
  params << Riddl::Header.new("CPEE_INSTANCE",@controller.instance_url)
44
44
  params << Riddl::Header.new("CPEE_CALLBACK",@controller.instance_url + '/callbacks/' + callback)
45
+ params << Riddl::Header.new("CPEE_ACTIVITY",@handler_position)
46
+ params << Riddl::Header.new("CPEE_LABEL",parameters[:label])
47
+ @controller.attributes.each do |key,value|
48
+ params << Riddl::Header.new("CPEE_ATTR_#{key}",value)
49
+ end
45
50
 
46
51
  type = parameters[:method] || 'post'
47
52
  client = Riddl::Client.new(@handler_endpoint)
@@ -0,0 +1,33 @@
1
+ <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
2
+ <topic id="running">
3
+ <event>activity_calling</event>
4
+ <event>activity_manipulating</event>
5
+ <event>activity_failed</event>
6
+ <event>activity_done</event>
7
+ </topic>
8
+ <topic id="properties/position">
9
+ <event>change</event>
10
+ </topic>
11
+ <topic id="properties/description">
12
+ <event>change</event>
13
+ <event>error</event>
14
+ </topic>
15
+ <topic id="properties/state">
16
+ <event>change</event>
17
+ </topic>
18
+ <topic id="properties/dataelements">
19
+ <event>change</event>
20
+ </topic>
21
+ <topic id="properties/endpoints">
22
+ <event>change</event>
23
+ </topic>
24
+ <topic id="properties/transformation">
25
+ <event>change</event>
26
+ </topic>
27
+ <topic id="properties/handlerwrapper">
28
+ <event>result</event>
29
+ </topic>
30
+ <topic id="properties/handlers">
31
+ <event>change</event>
32
+ </topic>
33
+ </subscription>
@@ -0,0 +1,44 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <info/>
20
+ <properties/>
21
+ <state>ready</state>
22
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
23
+ <positions/>
24
+ <dataelements/>
25
+ <endpoints>
26
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
27
+ </endpoints>
28
+ <dsl/>
29
+ <dslx>
30
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
31
+ </dslx>
32
+ <status>
33
+ <id>0</id>
34
+ <message>undefined</message>
35
+ </status>
36
+ <description>
37
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
38
+ </description>
39
+ <transformation>
40
+ <description type='copy'/>
41
+ <dataelements type='none'/>
42
+ <endpoints type='none'/>
43
+ </transformation>
44
+ </properties>
@@ -0,0 +1,44 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <info/>
20
+ <properties/>
21
+ <state>ready</state>
22
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
23
+ <positions/>
24
+ <dataelements/>
25
+ <endpoints>
26
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
27
+ </endpoints>
28
+ <dsl/>
29
+ <dslx>
30
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
31
+ </dslx>
32
+ <status>
33
+ <id>0</id>
34
+ <message>undefined</message>
35
+ </status>
36
+ <description>
37
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
38
+ </description>
39
+ <transformation>
40
+ <description type='copy'/>
41
+ <dataelements type='none'/>
42
+ <endpoints type='none'/>
43
+ </transformation>
44
+ </properties>
@@ -0,0 +1,44 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <info/>
20
+ <properties/>
21
+ <state>ready</state>
22
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
23
+ <positions/>
24
+ <dataelements/>
25
+ <endpoints>
26
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
27
+ </endpoints>
28
+ <dsl/>
29
+ <dslx>
30
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
31
+ </dslx>
32
+ <status>
33
+ <id>0</id>
34
+ <message>undefined</message>
35
+ </status>
36
+ <description>
37
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
38
+ </description>
39
+ <transformation>
40
+ <description type='copy'/>
41
+ <dataelements type='none'/>
42
+ <endpoints type='none'/>
43
+ </transformation>
44
+ </properties>
@@ -0,0 +1,45 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <attributes>
20
+ <info/>
21
+ </attributes>
22
+ <state>ready</state>
23
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
24
+ <positions/>
25
+ <dataelements/>
26
+ <endpoints>
27
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
28
+ </endpoints>
29
+ <dsl/>
30
+ <dslx>
31
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
32
+ </dslx>
33
+ <status>
34
+ <id>0</id>
35
+ <message>undefined</message>
36
+ </status>
37
+ <description>
38
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
39
+ </description>
40
+ <transformation>
41
+ <description type='copy'/>
42
+ <dataelements type='none'/>
43
+ <endpoints type='none'/>
44
+ </transformation>
45
+ </properties>
@@ -0,0 +1,45 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <attributes>
20
+ <info/>
21
+ </attributes>
22
+ <state>ready</state>
23
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
24
+ <positions/>
25
+ <dataelements/>
26
+ <endpoints>
27
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
28
+ </endpoints>
29
+ <dsl/>
30
+ <dslx>
31
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
32
+ </dslx>
33
+ <status>
34
+ <id>0</id>
35
+ <message>undefined</message>
36
+ </status>
37
+ <description>
38
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
39
+ </description>
40
+ <transformation>
41
+ <description type='copy'/>
42
+ <dataelements type='none'/>
43
+ <endpoints type='none'/>
44
+ </transformation>
45
+ </properties>
@@ -0,0 +1,46 @@
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
+
18
+ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
19
+ <attributes>
20
+ <info/>
21
+ <modeltype>CPEE</modeltype>
22
+ </attributes>
23
+ <state>ready</state>
24
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
25
+ <positions/>
26
+ <dataelements/>
27
+ <endpoints>
28
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
29
+ </endpoints>
30
+ <dsl/>
31
+ <dslx>
32
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
33
+ </dslx>
34
+ <status>
35
+ <id>0</id>
36
+ <message>undefined</message>
37
+ </status>
38
+ <description>
39
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
40
+ </description>
41
+ <transformation>
42
+ <description type='copy'/>
43
+ <dataelements type='none'/>
44
+ <endpoints type='none'/>
45
+ </transformation>
46
+ </properties>