cpee 1.4.31 → 1.4.32
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/css/ui.css +25 -6
- data/cockpit/css/wfadaptor.css +20 -10
- data/cockpit/graph.html +7 -2
- data/cockpit/index.html +2 -3
- data/cockpit/js/details.js +3 -0
- data/cockpit/js/instance.js +70 -20
- data/cockpit/js/ui.js +32 -5
- data/cockpit/js/wfadaptor.js +70 -42
- data/cockpit/themes/compact/theme.js +55 -46
- data/cockpit/themes/default/symbols/otherwise.svg +2 -1
- data/cockpit/themes/{promise/symbols/choose.svg → default/symbols/parallel_branch_compact.svg} +2 -2
- data/cockpit/themes/default/theme.js +39 -44
- data/cockpit/themes/extended/theme.js +252 -60
- data/cockpit/themes/{lego → packed}/theme.js +492 -105
- data/cockpit/track.html +39 -32
- data/cpee.gemspec +1 -1
- data/lib/cpee/controller.rb +2 -0
- data/lib/cpee/instantiation.rb +22 -5
- data/lib/cpee/value_helper.rb +1 -1
- data/lib/instantiation.xml +3 -0
- data/log/elasticsearch_logging.rb +189 -50
- data/server/handlerwrappers/default.rb +3 -3
- data/server/server.pid +1 -0
- metadata +5 -53
- data/cockpit/themes/lego/rngs/alternative.rng +0 -5
- data/cockpit/themes/lego/rngs/call.rng +0 -41
- data/cockpit/themes/lego/rngs/choose.rng +0 -8
- data/cockpit/themes/lego/rngs/critical.rng +0 -5
- data/cockpit/themes/lego/rngs/loop.rng +0 -11
- data/cockpit/themes/lego/rngs/manipulate.rng +0 -6
- data/cockpit/themes/lego/rngs/parallel.rng +0 -5
- data/cockpit/themes/lego/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/lego/symbols/alternative.svg +0 -4
- data/cockpit/themes/lego/symbols/call.svg +0 -4
- data/cockpit/themes/lego/symbols/callmanipulate.svg +0 -6
- data/cockpit/themes/lego/symbols/callori.svg +0 -4
- data/cockpit/themes/lego/symbols/choose.svg +0 -4
- data/cockpit/themes/lego/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/lego/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/lego/symbols/critical.svg +0 -4
- data/cockpit/themes/lego/symbols/escape.svg +0 -5
- data/cockpit/themes/lego/symbols/lego.svg +0 -72
- data/cockpit/themes/lego/symbols/loop.svg +0 -5
- data/cockpit/themes/lego/symbols/manipulate.svg +0 -4
- data/cockpit/themes/lego/symbols/otherwise.svg +0 -4
- data/cockpit/themes/lego/symbols/parallel.svg +0 -6
- data/cockpit/themes/lego/symbols/parallel_branch.svg +0 -4
- data/cockpit/themes/lego/symbols/scripts.svg +0 -4
- data/cockpit/themes/lego/symbols/start.svg +0 -3
- data/cockpit/themes/promise/rngs/alternative.rng +0 -5
- data/cockpit/themes/promise/rngs/call.rng +0 -41
- data/cockpit/themes/promise/rngs/choose.rng +0 -8
- data/cockpit/themes/promise/rngs/critical.rng +0 -5
- data/cockpit/themes/promise/rngs/loop.rng +0 -11
- data/cockpit/themes/promise/rngs/manipulate.rng +0 -6
- data/cockpit/themes/promise/rngs/parallel.rng +0 -5
- data/cockpit/themes/promise/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/promise/symbols/alternative.svg +0 -4
- data/cockpit/themes/promise/symbols/call.svg +0 -4
- data/cockpit/themes/promise/symbols/callmanipulate.svg +0 -6
- data/cockpit/themes/promise/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/promise/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/promise/symbols/critical.svg +0 -4
- data/cockpit/themes/promise/symbols/escape.svg +0 -5
- data/cockpit/themes/promise/symbols/loop.svg +0 -5
- data/cockpit/themes/promise/symbols/manipulate.svg +0 -4
- data/cockpit/themes/promise/symbols/otherwise.svg +0 -4
- data/cockpit/themes/promise/symbols/parallel.svg +0 -6
- data/cockpit/themes/promise/symbols/parallel_branch.svg +0 -4
- data/cockpit/themes/promise/symbols/preminder.svg +0 -6
- data/cockpit/themes/promise/symbols/scripts.svg +0 -4
- data/cockpit/themes/promise/symbols/start.svg +0 -3
- data/cockpit/themes/promise/theme.js +0 -801
|
@@ -2,21 +2,38 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
2
2
|
var self = this;
|
|
3
3
|
|
|
4
4
|
this.adaptor = adaptor;
|
|
5
|
+
this.resources = {};
|
|
5
6
|
this.elements = {};
|
|
6
7
|
this.events = {};
|
|
7
|
-
this.compact =
|
|
8
|
+
this.compact = true;
|
|
9
|
+
this.striped = false;
|
|
10
|
+
this.endpoints = {};
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
this.source = function(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
//{{{ transform the details data to description parts based on rng
|
|
13
|
+
this.source = function(base,opts) {
|
|
14
|
+
if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
|
|
15
|
+
$('#relaxngworker').empty();
|
|
16
|
+
var rngw = new RelaxNGui(base,$('#relaxngworker'),self.adaptor.description.context_eval);
|
|
17
|
+
var nnew = $(rngw.save().documentElement);
|
|
18
|
+
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
|
19
|
+
var ntxt = nnew.serializeXML();
|
|
20
|
+
ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
return($X(ntxt));
|
|
23
|
+
} else {
|
|
24
|
+
if (opts && opts == 'clone') {
|
|
25
|
+
base = base.clone();
|
|
26
|
+
if (base.attr('id')) {
|
|
27
|
+
base.attr('id',self.adaptor.description.get_free_id());
|
|
28
|
+
}
|
|
29
|
+
base.find('*[id]').each(function(k,v){
|
|
30
|
+
$(v).attr('id',self.adaptor.description.get_free_id(base));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return base;
|
|
34
|
+
}
|
|
35
|
+
}; //}}}
|
|
36
|
+
//{{{ Return the svgid for the selected task
|
|
20
37
|
this.selected = function(){
|
|
21
38
|
var svgid = 'unknown';
|
|
22
39
|
_.each(self.adaptor.illustrator.get_elements(),function(value,key) {
|
|
@@ -25,62 +42,170 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
25
42
|
}
|
|
26
43
|
});
|
|
27
44
|
return svgid;
|
|
28
|
-
};
|
|
45
|
+
}; //}}}
|
|
46
|
+
//{{{ Return the svgids for all marked tasks
|
|
47
|
+
this.marked = function(){
|
|
48
|
+
var svgid = [];
|
|
49
|
+
_.each(self.adaptor.illustrator.get_elements(),function(value,key) {
|
|
50
|
+
if ($(value).hasClass('marked')) {
|
|
51
|
+
svgid.push($(value).attr('element-id'));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return svgid;
|
|
55
|
+
}; //}}}
|
|
56
|
+
//{{{ Render the details from rng (right hand side of graph tab)
|
|
57
|
+
this.update_details = function(svgid){
|
|
58
|
+
var tab = $('#dat_details');
|
|
59
|
+
var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
|
|
60
|
+
tab.empty();
|
|
61
|
+
if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
|
|
62
|
+
save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
|
|
63
|
+
var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
|
|
64
|
+
if (save['endpoints_cache'][$(node).attr('endpoint')] && save['endpoints_cache'][$(node).attr('endpoint')].schema) {
|
|
65
|
+
var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
|
|
66
|
+
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
|
67
|
+
}
|
|
68
|
+
if (save['endpoints_list'][$(node).attr('endpoint')] && !save['endpoints_list'][$(node).attr('endpoint')].startsWith('http')) {
|
|
69
|
+
$(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
|
|
70
|
+
}
|
|
71
|
+
save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
|
|
72
|
+
save['details'].content(node);
|
|
73
|
+
format_visual_forms();
|
|
74
|
+
}
|
|
75
|
+
}; //}}}
|
|
76
|
+
|
|
77
|
+
function copyOrMove(menu,group,xml_node,mode) { //{{{
|
|
78
|
+
var markymark = self.marked();
|
|
79
|
+
var check1 = [];
|
|
80
|
+
var check2 = [];
|
|
81
|
+
$(markymark).each(function(key,svgid){
|
|
82
|
+
var node = self.adaptor.description.get_node_by_svg_id(svgid);
|
|
83
|
+
check1.push($(node).attr('svg-type'));
|
|
84
|
+
});
|
|
85
|
+
$(group).each(function(key,value){
|
|
86
|
+
check2.push(value.type);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
|
|
90
|
+
var nodes = [];
|
|
91
|
+
$(markymark).each(function(key,svgid){
|
|
92
|
+
var node = self.adaptor.description.get_node_by_svg_id(svgid);
|
|
93
|
+
nodes.unshift(node);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
var iconm = self.resources['arrow'].clone();
|
|
97
|
+
var iconc = self.resources['arrow'].clone();
|
|
98
|
+
iconm.children('.rfill').addClass('menu');
|
|
99
|
+
menu.push(
|
|
100
|
+
{
|
|
101
|
+
'label': '<em>Move Marked Elements</em>',
|
|
102
|
+
'function_call': mode,
|
|
103
|
+
'menu_icon': iconm,
|
|
104
|
+
'type': undefined,
|
|
105
|
+
'params': [nodes, xml_node]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
'label': '<em>Copy Marked Elements</em>',
|
|
109
|
+
'function_call': mode,
|
|
110
|
+
'menu_icon': iconc,
|
|
111
|
+
'type': undefined,
|
|
112
|
+
'params': [nodes, xml_node, 'clone']
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
} //}}}
|
|
29
117
|
|
|
30
118
|
// Events
|
|
31
119
|
this.events.mousedown = function(svgid, e, child, sibling) { // {{{
|
|
32
120
|
if(e.button == 0) { // left-click
|
|
33
121
|
} else if(e.button == 1) { // middle-click
|
|
34
122
|
} else if(e.button == 2) { // right-click
|
|
123
|
+
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
|
124
|
+
|
|
35
125
|
var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
|
|
36
126
|
var group = null;
|
|
37
127
|
var menu = {};
|
|
38
128
|
|
|
39
129
|
if (child) {
|
|
40
130
|
group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
|
|
41
|
-
if(group.length > 0)
|
|
131
|
+
if(group.length > 0) {
|
|
132
|
+
menu['Insert into'] = group;
|
|
133
|
+
copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
|
|
134
|
+
}
|
|
42
135
|
}
|
|
43
136
|
if (sibling) {
|
|
44
137
|
group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
|
|
45
|
-
if(group.length > 0)
|
|
138
|
+
if(group.length > 0) {
|
|
139
|
+
menu['Insert after'] = group;
|
|
140
|
+
copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
|
|
141
|
+
}
|
|
46
142
|
}
|
|
47
143
|
|
|
48
144
|
if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
|
|
49
145
|
var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
|
|
50
|
-
icon.children('.rfill').
|
|
146
|
+
icon.children('.rfill').addClass('menu');
|
|
51
147
|
menu['Delete'] = [{
|
|
52
148
|
'label': 'Remove Element',
|
|
53
149
|
'function_call': self.adaptor.description.remove,
|
|
54
150
|
'menu_icon': icon,
|
|
151
|
+
'type': undefined,
|
|
55
152
|
'params': [null, xml_node]
|
|
56
153
|
}];
|
|
57
154
|
}
|
|
58
155
|
if($('> finalize, > update', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
|
|
59
156
|
var icon = self.elements.callmanipulate.illustrator.svg.clone();
|
|
60
|
-
icon.children('.rfill:last').
|
|
157
|
+
icon.children('.rfill:last').addClass('menu');
|
|
61
158
|
menu['Delete'].push({
|
|
62
159
|
'label': 'Remove Scripts',
|
|
63
160
|
'function_call': self.adaptor.description.remove,
|
|
64
161
|
'menu_icon': icon,
|
|
162
|
+
'type': undefined,
|
|
65
163
|
'params': ['> finalize, > update', xml_node]
|
|
66
164
|
});
|
|
67
165
|
}
|
|
166
|
+
if (xml_node.get(0).tagName == "call" || xml_node.get(0).tagName == "manipulate" || xml_node.get(0).tagName == "stop") {
|
|
167
|
+
var icon = self.elements.call.illustrator.svg.clone();
|
|
168
|
+
icon.children('g.replace').addClass('active');
|
|
169
|
+
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
|
170
|
+
if (vtarget.length > 0) {
|
|
171
|
+
if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
|
|
172
|
+
menu['Position'] = [{
|
|
173
|
+
'label': 'No Execution from here',
|
|
174
|
+
'function_call': del_ui_pos,
|
|
175
|
+
'menu_icon': icon,
|
|
176
|
+
'type': undefined,
|
|
177
|
+
'params': xml_node
|
|
178
|
+
}];
|
|
179
|
+
} else {
|
|
180
|
+
menu['Position'] = [{
|
|
181
|
+
'label': 'Execute from here',
|
|
182
|
+
'function_call': add_ui_pos,
|
|
183
|
+
'menu_icon': icon,
|
|
184
|
+
'type': undefined,
|
|
185
|
+
'params': xml_node
|
|
186
|
+
}];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
68
190
|
new CustomMenu(e).contextmenu(menu);
|
|
69
191
|
}
|
|
70
192
|
return false;
|
|
71
193
|
} // }}}
|
|
194
|
+
this.events.suppress = function(svgid, e, child, sibling) { // {{{
|
|
195
|
+
return false;
|
|
196
|
+
} // }}}
|
|
72
197
|
this.events.click = function(svgid, e) { // {{{
|
|
73
198
|
if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
|
|
74
199
|
return;
|
|
75
200
|
}
|
|
76
201
|
|
|
77
|
-
var visid = 'details';
|
|
78
|
-
var tab = $('#dat_' + visid);
|
|
79
|
-
tab.empty();
|
|
80
|
-
|
|
81
202
|
self.adaptor.illustrator.get_elements().removeClass('selected');
|
|
203
|
+
self.adaptor.illustrator.get_labels().removeClass('selected');
|
|
82
204
|
|
|
83
205
|
if (e && e.ctrlKey) {
|
|
206
|
+
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
|
207
|
+
var tab = $('#dat_details');
|
|
208
|
+
tab.empty();
|
|
84
209
|
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
|
85
210
|
if (vtarget.length > 0) {
|
|
86
211
|
vtarget.parents('g.element[element-id]').toggleClass('marked');
|
|
@@ -92,52 +217,46 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
92
217
|
if (vtarget.length > 0) {
|
|
93
218
|
vtarget.parents('g.element[element-id]').addClass('selected');
|
|
94
219
|
}
|
|
220
|
+
self.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
|
|
95
221
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
|
|
99
|
-
save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
|
|
100
|
-
save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
|
|
101
|
-
save[visid].content(node);
|
|
102
|
-
}
|
|
222
|
+
self.update_details(svgid);
|
|
103
223
|
}
|
|
104
224
|
} // }}}
|
|
105
225
|
this.events.dblclick = function(svgid, e) { // {{{
|
|
106
226
|
} // }}}
|
|
107
227
|
this.events.mouseover = function(svgid, e) { // {{{
|
|
108
|
-
|
|
228
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
|
|
229
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
|
230
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
|
109
231
|
return false;
|
|
110
232
|
} // }}}
|
|
111
233
|
this.events.mouseout = function(svgid, e) { // {{{
|
|
112
|
-
|
|
234
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
|
|
235
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
|
236
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
|
113
237
|
return false;
|
|
114
238
|
} // }}}
|
|
115
239
|
this.events.dragstart = function (svgid, e) { //{{{
|
|
116
240
|
} //}}}
|
|
117
241
|
|
|
242
|
+
// other resources
|
|
243
|
+
this.resources.arrow = self.adaptor.theme_dir + 'symbols/arrow.svg';
|
|
244
|
+
|
|
118
245
|
// Primitive Elements
|
|
119
246
|
this.elements.call = { /*{{{*/
|
|
120
247
|
'type': 'primitive',
|
|
121
248
|
'illustrator': {//{{{
|
|
122
249
|
'endnodes': 'this',
|
|
123
|
-
'label': function(node){
|
|
250
|
+
'label': function(node){
|
|
251
|
+
var ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
|
252
|
+
return ret;
|
|
253
|
+
},
|
|
254
|
+
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
|
124
255
|
'resolve_symbol': function(node) {
|
|
125
|
-
if($(
|
|
126
|
-
return 'callinstantiation';
|
|
127
|
-
} else if($(node).attr('endpoint').match(/^correlation_send/)) {
|
|
128
|
-
return 'callcorrelationsend';
|
|
129
|
-
} else if($(node).attr('endpoint').match(/^correlation_receive/)) {
|
|
130
|
-
return 'callcorrelationreceive';
|
|
131
|
-
} else if($(node).attr('endpoint').match(/^worklist/) && $('finalize,update', node).length > 0) {
|
|
132
|
-
return 'callmanipulateworklist';
|
|
133
|
-
} else if($(node).attr('endpoint').match(/^worklist/)) {
|
|
134
|
-
return 'callworklist';
|
|
135
|
-
} else if($('parameters > service', node).length > 0) {
|
|
136
|
-
return 'callinjection';
|
|
137
|
-
} else if($('finalize,update', node).length > 0) {
|
|
256
|
+
if($('finalize,update', node).length > 0) {
|
|
138
257
|
return 'callmanipulate';
|
|
139
258
|
} else {
|
|
140
|
-
return'call';
|
|
259
|
+
return 'call';
|
|
141
260
|
}
|
|
142
261
|
},
|
|
143
262
|
'svg': self.adaptor.theme_dir + 'symbols/call.svg'
|
|
@@ -149,31 +268,43 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
149
268
|
{'label': 'Scripts',
|
|
150
269
|
'function_call': self.adaptor.description.insert_last_into,
|
|
151
270
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
271
|
+
'type': undefined,
|
|
152
272
|
'params': [self.adaptor.description.elements.scripts, node]}
|
|
153
273
|
];
|
|
154
274
|
return [];
|
|
155
275
|
}, //}}}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
276
|
+
'adaptor': {//{{{
|
|
277
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
|
278
|
+
'click': self.events.click,
|
|
279
|
+
'dragstart': self.events.dragstart,
|
|
280
|
+
'mouseover': self.events.mouseover,
|
|
281
|
+
'mouseout': self.events.mouseout
|
|
282
|
+
}//}}}
|
|
161
283
|
}; /*}}}*/
|
|
162
284
|
this.elements.manipulate = { /*{{{*/
|
|
163
285
|
'type': 'primitive',
|
|
164
286
|
'illustrator': {//{{{
|
|
165
287
|
'endnodes': 'this',
|
|
166
|
-
'label': function(node){
|
|
288
|
+
'label': function(node){
|
|
289
|
+
var lab = $(node).attr('label');
|
|
290
|
+
if (lab) {
|
|
291
|
+
return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
|
292
|
+
} else {
|
|
293
|
+
return [];
|
|
294
|
+
}
|
|
295
|
+
},
|
|
167
296
|
'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
|
|
168
297
|
},//}}}
|
|
169
298
|
'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
|
|
170
299
|
'permissible_children': function(node,mode) { //{{{
|
|
171
300
|
return [];
|
|
172
301
|
}, //}}}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
302
|
+
'adaptor': {//{{{
|
|
303
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
|
304
|
+
'click': self.events.click,
|
|
305
|
+
'mouseover': self.events.mouseover,
|
|
306
|
+
'mouseout': self.events.mouseout
|
|
307
|
+
}//}}}
|
|
177
308
|
}; /*}}}*/
|
|
178
309
|
this.elements.escape = { /*{{{*/
|
|
179
310
|
'type': 'primitive',
|
|
@@ -188,6 +319,116 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
188
319
|
'adaptor': {//{{{
|
|
189
320
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
|
190
321
|
'click': self.events.click,
|
|
322
|
+
'mouseover': self.events.mouseover,
|
|
323
|
+
'mouseout': self.events.mouseout
|
|
324
|
+
}//}}}
|
|
325
|
+
}; /*}}}*/
|
|
326
|
+
this.elements.stop = { /*{{{*/
|
|
327
|
+
'type': 'primitive',
|
|
328
|
+
'illustrator': {//{{{
|
|
329
|
+
'endnodes': 'this',
|
|
330
|
+
'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
|
|
331
|
+
},//}}}
|
|
332
|
+
'description': self.adaptor.theme_dir + 'rngs/stop.rng',
|
|
333
|
+
'permissible_children': function(node,mode) { //{{{
|
|
334
|
+
return [];
|
|
335
|
+
}, //}}}
|
|
336
|
+
'adaptor': {//{{{
|
|
337
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
|
338
|
+
'click': self.events.click,
|
|
339
|
+
'mouseover': self.events.mouseover,
|
|
340
|
+
'mouseout': self.events.mouseout
|
|
341
|
+
}//}}}
|
|
342
|
+
}; /*}}}*/
|
|
343
|
+
this.elements.terminate = { /*{{{*/
|
|
344
|
+
'type': 'primitive',
|
|
345
|
+
'illustrator': {//{{{
|
|
346
|
+
'endnodes': 'this',
|
|
347
|
+
'final': true,
|
|
348
|
+
'svg': self.adaptor.theme_dir + 'symbols/terminate.svg'
|
|
349
|
+
},//}}}
|
|
350
|
+
'description': self.adaptor.theme_dir + 'rngs/terminate.rng',
|
|
351
|
+
'permissible_children': function(node,mode) { //{{{
|
|
352
|
+
return [];
|
|
353
|
+
}, //}}}
|
|
354
|
+
'adaptor': {//{{{
|
|
355
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
|
356
|
+
'mouseover': self.events.mouseover,
|
|
357
|
+
'mouseout': self.events.mouseout
|
|
358
|
+
}//}}}
|
|
359
|
+
}; /*}}}*/
|
|
360
|
+
this.elements.end = { /*{{{*/
|
|
361
|
+
'type': 'primitive',
|
|
362
|
+
'illustrator': {//{{{
|
|
363
|
+
'endnodes': 'this',
|
|
364
|
+
'svg': self.adaptor.theme_dir + 'symbols/end.svg'
|
|
365
|
+
}, //}}}
|
|
366
|
+
'adaptor': {//{{{
|
|
367
|
+
'mousedown': function (node,e) {
|
|
368
|
+
self.events.suppress();
|
|
369
|
+
}
|
|
370
|
+
}//}}}
|
|
371
|
+
}; /*}}}*/
|
|
372
|
+
this.elements.event_end = { /*{{{*/
|
|
373
|
+
'type': 'primitive',
|
|
374
|
+
'illustrator': {//{{{
|
|
375
|
+
'endnodes': 'this',
|
|
376
|
+
'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
|
|
377
|
+
}, //}}}
|
|
378
|
+
'adaptor': {//{{{
|
|
379
|
+
'mousedown': function (node,e) {
|
|
380
|
+
self.events.suppress();
|
|
381
|
+
},
|
|
382
|
+
'click': self.events.click,
|
|
383
|
+
'dblclick': self.events.dblclick,
|
|
384
|
+
'mouseover': self.events.mouseover,
|
|
385
|
+
'mouseout': self.events.mouseout
|
|
386
|
+
}//}}}
|
|
387
|
+
}; /*}}}*/
|
|
388
|
+
this.elements.choose_finish = { /*{{{*/
|
|
389
|
+
'type': 'primitive',
|
|
390
|
+
'illustrator': {//{{{
|
|
391
|
+
'endnodes': 'this',
|
|
392
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
|
|
393
|
+
'resolve_symbol': function(node) {
|
|
394
|
+
if($(node).attr('mode') == 'exclusive') {
|
|
395
|
+
return 'choose_exclusive_finish';
|
|
396
|
+
} else {
|
|
397
|
+
return 'choose_inclusive_finish';
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
}, //}}}
|
|
401
|
+
'adaptor': {//{{{
|
|
402
|
+
'mousedown': function (node,e) {
|
|
403
|
+
self.events.mousedown(node,e,true,true);
|
|
404
|
+
},
|
|
405
|
+
'click': self.events.click,
|
|
406
|
+
'dblclick': self.events.dblclick,
|
|
407
|
+
'mouseover': self.events.mouseover,
|
|
408
|
+
'mouseout': self.events.mouseout
|
|
409
|
+
}//}}}
|
|
410
|
+
}; /*}}}*/
|
|
411
|
+
this.elements.parallel_finish = { /*{{{*/
|
|
412
|
+
'type': 'primitive',
|
|
413
|
+
'illustrator': {//{{{
|
|
414
|
+
'endnodes': 'this',
|
|
415
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
|
|
416
|
+
'resolve_symbol': function(node) {
|
|
417
|
+
if($(node).attr('wait') == '-1') {
|
|
418
|
+
return 'parallel_simple';
|
|
419
|
+
} else {
|
|
420
|
+
return 'parallel_complex';
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
}, //}}}
|
|
424
|
+
'adaptor': {//{{{
|
|
425
|
+
'mousedown': function (node,e) {
|
|
426
|
+
self.events.mousedown(node,e,true,true);
|
|
427
|
+
},
|
|
428
|
+
'click': self.events.click,
|
|
429
|
+
'dblclick': self.events.dblclick,
|
|
430
|
+
'mouseover': self.events.mouseover,
|
|
431
|
+
'mouseout': self.events.mouseout
|
|
191
432
|
}//}}}
|
|
192
433
|
}; /*}}}*/
|
|
193
434
|
|
|
@@ -195,7 +436,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
195
436
|
this.elements.choose = { /*{{{*/
|
|
196
437
|
'type': 'complex',
|
|
197
438
|
'illustrator': {//{{{
|
|
198
|
-
'label': function(node){return $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' },
|
|
439
|
+
'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
|
|
199
440
|
'endnodes': 'aggregate',
|
|
200
441
|
'closeblock': false,
|
|
201
442
|
'expansion': function(node) {
|
|
@@ -222,21 +463,25 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
222
463
|
return [{'label': 'Parallel Branch',
|
|
223
464
|
'function_call': func,
|
|
224
465
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
|
466
|
+
'type': 'parallel_branch',
|
|
225
467
|
'params': [self.adaptor.description.elements.parallel_branch, node]}];
|
|
226
468
|
}
|
|
227
469
|
var childs = [{'label': 'Alternative',
|
|
228
470
|
'function_call': func,
|
|
229
471
|
'menu_icon': self.elements.alternative.illustrator.svg.clone(),
|
|
472
|
+
'type': 'alternative',
|
|
230
473
|
'params': [self.adaptor.description.elements.alternative, node]}];
|
|
231
474
|
if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
|
|
232
475
|
childs.push({'label': 'Otherwise',
|
|
233
476
|
'function_call': self.adaptor.description.insert_last_into,
|
|
234
477
|
'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
|
|
478
|
+
'type': 'otherwise',
|
|
235
479
|
'params': [self.adaptor.description.elements.otherwise, node]});
|
|
236
480
|
if(node.parents('parallel').length > node.parents('parallel_branch').length)
|
|
237
481
|
childs.push({'label': 'Parallel Branch',
|
|
238
482
|
'function_call': func,
|
|
239
483
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
|
484
|
+
'type': 'parallel_branch',
|
|
240
485
|
'params': [self.adaptor.description.elements.parallel_branch, node]});
|
|
241
486
|
return childs;
|
|
242
487
|
}, //}}}
|
|
@@ -247,7 +492,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
247
492
|
'click': self.events.click,
|
|
248
493
|
'dblclick': self.events.dblclick,
|
|
249
494
|
'mouseover': self.events.mouseover,
|
|
250
|
-
'mouseout': self.events.mouseout
|
|
495
|
+
'mouseout': self.events.mouseout
|
|
251
496
|
}//}}}
|
|
252
497
|
}; /*}}}*/
|
|
253
498
|
this.elements.otherwise = { /*{{{*/
|
|
@@ -255,6 +500,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
255
500
|
'illustrator': {//{{{
|
|
256
501
|
'endnodes': 'passthrough',
|
|
257
502
|
'closeblock': false,
|
|
503
|
+
'noarrow': true,
|
|
258
504
|
'expansion': function(node) {
|
|
259
505
|
return 'vertical';
|
|
260
506
|
},
|
|
@@ -274,30 +520,47 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
274
520
|
{'label': 'Service Call with Scripts',
|
|
275
521
|
'function_call': func,
|
|
276
522
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
523
|
+
'type': 'callmanipulate',
|
|
277
524
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
278
525
|
{'label': 'Service Call',
|
|
279
526
|
'function_call': func,
|
|
280
527
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
528
|
+
'type': 'call',
|
|
281
529
|
'params': [self.adaptor.description.elements.call, node]},
|
|
282
530
|
{'label': 'Script',
|
|
283
531
|
'function_call': func,
|
|
284
532
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
533
|
+
'type': 'manipulate',
|
|
285
534
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
286
535
|
{'label': 'Parallel',
|
|
287
536
|
'function_call': func,
|
|
288
537
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
538
|
+
'type': 'parallel',
|
|
289
539
|
'params': [self.adaptor.description.elements.parallel, node]},
|
|
290
540
|
{'label': 'Decision',
|
|
291
541
|
'function_call': func,
|
|
292
542
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
543
|
+
'type': 'choose',
|
|
293
544
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
294
545
|
{'label': 'Loop',
|
|
295
546
|
'function_call': func,
|
|
296
547
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
548
|
+
'type': 'loop',
|
|
297
549
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
550
|
+
{'label': 'Terminate',
|
|
551
|
+
'function_call': func,
|
|
552
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
553
|
+
'type': 'terminate',
|
|
554
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
555
|
+
{'label': 'Stop',
|
|
556
|
+
'function_call': func,
|
|
557
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
558
|
+
'type': 'stop',
|
|
559
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
298
560
|
{'label': 'Critical',
|
|
299
561
|
'function_call': func,
|
|
300
562
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
563
|
+
'type': 'critical',
|
|
301
564
|
'params': [self.adaptor.description.elements.critical, node]}
|
|
302
565
|
];
|
|
303
566
|
}, //}}}
|
|
@@ -314,8 +577,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
314
577
|
this.elements.alternative = { /*{{{*/
|
|
315
578
|
'type': 'complex',
|
|
316
579
|
'illustrator': {//{{{
|
|
317
|
-
'label': function(node){
|
|
580
|
+
'label': function(node){
|
|
581
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
|
|
582
|
+
return ret;
|
|
583
|
+
},
|
|
318
584
|
'endnodes': 'passthrough',
|
|
585
|
+
'noarrow': true,
|
|
319
586
|
'closeblock':false,
|
|
320
587
|
'expansion': function(node) {
|
|
321
588
|
return 'vertical';
|
|
@@ -333,36 +600,54 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
333
600
|
return [{'label': 'Parallel Branch',
|
|
334
601
|
'function_call': func,
|
|
335
602
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
|
603
|
+
'type': 'parallel_branch',
|
|
336
604
|
'params': [self.adaptor.description.elements.parallel_branch, node]}];
|
|
337
605
|
}
|
|
338
606
|
return [
|
|
339
607
|
{'label': 'Service Call with Scripts',
|
|
340
608
|
'function_call': func,
|
|
341
609
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
610
|
+
'type': 'callmanipulate',
|
|
342
611
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
343
612
|
{'label': 'Service Call',
|
|
344
613
|
'function_call': func,
|
|
345
614
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
615
|
+
'type': 'call',
|
|
346
616
|
'params': [self.adaptor.description.elements.call, node]},
|
|
347
617
|
{'label': 'Script',
|
|
348
618
|
'function_call': func,
|
|
349
619
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
620
|
+
'type': 'manipulate',
|
|
350
621
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
351
622
|
{'label': 'Parallel',
|
|
352
623
|
'function_call': func,
|
|
353
624
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
625
|
+
'type': 'parallel',
|
|
354
626
|
'params': [self.adaptor.description.elements.parallel, node]},
|
|
355
627
|
{'label': 'Decision',
|
|
356
628
|
'function_call': func,
|
|
357
629
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
630
|
+
'type': 'choose',
|
|
358
631
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
359
632
|
{'label': 'Loop',
|
|
360
633
|
'function_call': func,
|
|
361
634
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
635
|
+
'type': 'loop',
|
|
362
636
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
637
|
+
{'label': 'Terminate',
|
|
638
|
+
'function_call': func,
|
|
639
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
640
|
+
'type': 'terminate',
|
|
641
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
642
|
+
{'label': 'Stop',
|
|
643
|
+
'function_call': func,
|
|
644
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
645
|
+
'type': 'stop',
|
|
646
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
363
647
|
{'label': 'Critical',
|
|
364
648
|
'function_call': func,
|
|
365
649
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
650
|
+
'type': 'critical',
|
|
366
651
|
'params': [self.adaptor.description.elements.critical, node]}
|
|
367
652
|
];
|
|
368
653
|
}, //}}}
|
|
@@ -379,7 +664,10 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
379
664
|
this.elements.loop = { /*{{{*/
|
|
380
665
|
'type': 'complex',
|
|
381
666
|
'illustrator': {//{{{
|
|
382
|
-
'label': function(node){
|
|
667
|
+
'label': function(node){
|
|
668
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') + ($(node).attr('mode') == 'pre_test' ? ' (⭱)' : ' (⭳)') } ];
|
|
669
|
+
return ret;
|
|
670
|
+
},
|
|
383
671
|
'endnodes': 'this',
|
|
384
672
|
'closeblock': true,
|
|
385
673
|
'expansion': function(node) {
|
|
@@ -399,38 +687,56 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
399
687
|
{'label': 'Service Call with Scripts',
|
|
400
688
|
'function_call': func,
|
|
401
689
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
690
|
+
'type': 'callmanipulate',
|
|
402
691
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
403
692
|
{'label': 'Service Call',
|
|
404
693
|
'function_call': func,
|
|
405
694
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
695
|
+
'type': 'call',
|
|
406
696
|
'params': [self.adaptor.description.elements.call, node]},
|
|
407
697
|
{'label': 'Manipulate',
|
|
408
698
|
'function_call': func,
|
|
409
699
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
700
|
+
'type': 'manipulate',
|
|
410
701
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
411
702
|
{'label': 'Decision',
|
|
412
703
|
'function_call': func,
|
|
413
704
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
705
|
+
'type': 'choose',
|
|
414
706
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
415
707
|
{'label': 'Loop',
|
|
416
708
|
'function_call': func,
|
|
417
709
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
710
|
+
'type': 'loop',
|
|
418
711
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
712
|
+
{'label': 'Terminate',
|
|
713
|
+
'function_call': func,
|
|
714
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
715
|
+
'type': 'terminate',
|
|
716
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
717
|
+
{'label': 'Stop',
|
|
718
|
+
'function_call': func,
|
|
719
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
720
|
+
'type': 'stop',
|
|
721
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
419
722
|
{'label': 'Critical',
|
|
420
723
|
'function_call': func,
|
|
421
724
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
725
|
+
'type': 'critical',
|
|
422
726
|
'params': [self.adaptor.description.elements.critical, node]}
|
|
423
727
|
];
|
|
424
728
|
if(node.parent('parallel').length > node.parent('parallel_branch').length) {
|
|
425
729
|
childs.push({'label': 'Parallel Branch',
|
|
426
730
|
'function_call': func,
|
|
427
731
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
|
732
|
+
'type': 'parallel_branch',
|
|
428
733
|
'params': [self.adaptor.description.elements.parallel_branch, node]}
|
|
429
734
|
);
|
|
430
735
|
} else {
|
|
431
736
|
childs.push({'label': 'Parallel',
|
|
432
737
|
'function_call': func,
|
|
433
738
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
739
|
+
'type': 'parallel',
|
|
434
740
|
'params': [self.adaptor.description.elements.parallel, node]}
|
|
435
741
|
);
|
|
436
742
|
}
|
|
@@ -449,9 +755,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
449
755
|
this.elements.parallel = { /*{{{*/
|
|
450
756
|
'type': 'complex',
|
|
451
757
|
'illustrator': {//{{{
|
|
452
|
-
'endnodes': '
|
|
758
|
+
'endnodes': 'aggregate',
|
|
453
759
|
'closeblock': false,
|
|
454
|
-
'
|
|
760
|
+
'closing_symbol': 'parallel_finish',
|
|
455
761
|
'expansion': function(node) {
|
|
456
762
|
// check if any sibling other than 'parallel_branch' is present
|
|
457
763
|
if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
|
|
@@ -464,40 +770,46 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
464
770
|
},//}}}
|
|
465
771
|
'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
|
|
466
772
|
'permissible_children': function(node,mode) { //{{{
|
|
773
|
+
var func = null;
|
|
774
|
+
if (mode == 'into') { func = self.adaptor.description.insert_first_into }
|
|
775
|
+
else { func = self.adaptor.description.insert_after }
|
|
467
776
|
var childs = [
|
|
468
777
|
{'label': 'Service Call with Scripts',
|
|
469
|
-
'function_call':
|
|
778
|
+
'function_call': func,
|
|
470
779
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
780
|
+
'type': 'callmanipulate',
|
|
471
781
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
472
782
|
{'label': 'Service Call',
|
|
473
|
-
'function_call':
|
|
783
|
+
'function_call': func,
|
|
474
784
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
785
|
+
'type': 'call',
|
|
475
786
|
'params': [self.adaptor.description.elements.call, node]},
|
|
476
787
|
{'label': 'Manipulate',
|
|
477
|
-
'function_call':
|
|
788
|
+
'function_call': func,
|
|
478
789
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
790
|
+
'type': 'manipulate',
|
|
479
791
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
480
792
|
{'label': 'Decision',
|
|
481
|
-
'function_call':
|
|
793
|
+
'function_call': func,
|
|
482
794
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
795
|
+
'type': 'choose',
|
|
483
796
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
484
797
|
{'label': 'Loop',
|
|
485
|
-
'function_call':
|
|
798
|
+
'function_call': func,
|
|
486
799
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
800
|
+
'type': 'loop',
|
|
487
801
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
488
|
-
{'label': 'Critical',
|
|
489
|
-
'function_call': self.adaptor.description.insert_last_into,
|
|
490
|
-
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
491
|
-
'params': [self.adaptor.description.elements.critical, node]},
|
|
492
802
|
{'label': 'Parallel Branch',
|
|
493
|
-
'function_call':
|
|
803
|
+
'function_call': func,
|
|
494
804
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
|
805
|
+
'type': 'parallel_branch',
|
|
495
806
|
'params': [self.adaptor.description.elements.parallel_branch, node]}
|
|
496
807
|
];
|
|
497
808
|
if(node.get(0).tagName != 'parallel')
|
|
498
809
|
childs.push({'label': 'Parallel',
|
|
499
810
|
'function_call': self.adaptor.description.insert_last_into,
|
|
500
811
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
812
|
+
'type': 'parallel',
|
|
501
813
|
'params': [self.adaptor.description.elements.parallel, node]});
|
|
502
814
|
return childs;
|
|
503
815
|
}, //}}}
|
|
@@ -514,11 +826,19 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
514
826
|
this.elements.parallel_branch = { /*{{{*/
|
|
515
827
|
'type': 'complex',
|
|
516
828
|
'illustrator': {//{{{
|
|
517
|
-
'endnodes': '
|
|
829
|
+
'endnodes': 'passthrough',
|
|
518
830
|
'closeblock': false,
|
|
831
|
+
'noarrow': true,
|
|
519
832
|
'expansion': function(node) {
|
|
520
833
|
return 'vertical';
|
|
521
834
|
},
|
|
835
|
+
'resolve_symbol': function(node,shift) {
|
|
836
|
+
if(shift == true) {
|
|
837
|
+
return 'parallel_branch_compact';
|
|
838
|
+
} else {
|
|
839
|
+
return 'parallel_branch_normal';
|
|
840
|
+
}
|
|
841
|
+
},
|
|
522
842
|
'col_shift': function(node) {
|
|
523
843
|
if(node.parentNode.tagName == 'choose') return false;
|
|
524
844
|
if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
|
|
@@ -536,43 +856,66 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
536
856
|
{'label': 'Service Call with Scripts',
|
|
537
857
|
'function_call': func,
|
|
538
858
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
859
|
+
'type': 'callmanipulate',
|
|
539
860
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
540
861
|
{'label': 'Service Call',
|
|
541
862
|
'function_call': func,
|
|
542
863
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
864
|
+
'type': 'call',
|
|
543
865
|
'params': [self.adaptor.description.elements.call, node]},
|
|
544
866
|
{'label': 'Script',
|
|
545
867
|
'function_call': func,
|
|
546
868
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
869
|
+
'type': 'manipulate',
|
|
547
870
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
548
871
|
{'label': 'Parallel',
|
|
549
872
|
'function_call': func,
|
|
550
873
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
874
|
+
'type': 'parallel',
|
|
551
875
|
'params': [self.adaptor.description.elements.parallel, node]},
|
|
552
876
|
{'label': 'Decision',
|
|
553
877
|
'function_call': func,
|
|
554
878
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
879
|
+
'type': 'choose',
|
|
555
880
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
556
881
|
{'label': 'Loop',
|
|
557
882
|
'function_call': func,
|
|
558
883
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
884
|
+
'type': 'loop',
|
|
559
885
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
886
|
+
{'label': 'Terminate',
|
|
887
|
+
'function_call': func,
|
|
888
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
889
|
+
'type': 'terminate',
|
|
890
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
891
|
+
{'label': 'Stop',
|
|
892
|
+
'function_call': func,
|
|
893
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
894
|
+
'type': 'stop',
|
|
895
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
560
896
|
{'label': 'Critical',
|
|
561
897
|
'function_call': func,
|
|
562
898
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
899
|
+
'type': 'critical',
|
|
563
900
|
'params': [self.adaptor.description.elements.critical, node]},
|
|
564
901
|
];
|
|
565
902
|
if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
|
|
566
903
|
return [{'label': 'Alternative',
|
|
567
904
|
'function_call': func,
|
|
568
905
|
'menu_icon': self.elements.alternative.illustrator.svg.clone(),
|
|
906
|
+
'type': 'alternative',
|
|
569
907
|
'params': [self.adaptor.description.elements.alternative, node]}];
|
|
570
908
|
}
|
|
571
909
|
return childs;
|
|
572
910
|
}, //}}}
|
|
573
911
|
'adaptor': {//{{{
|
|
574
912
|
'mousedown': function (node,e) {
|
|
575
|
-
self.
|
|
913
|
+
var xml_node = self.adaptor.description.get_node_by_svg_id(node);
|
|
914
|
+
if(xml_node.get(0).parentNode.tagName == 'parallel') {
|
|
915
|
+
self.events.mousedown(node,e,true,false);
|
|
916
|
+
} else {
|
|
917
|
+
self.events.mousedown(node,e,true,true);
|
|
918
|
+
}
|
|
576
919
|
},
|
|
577
920
|
'click': self.events.click,
|
|
578
921
|
'dblclick': self.events.dblclick,
|
|
@@ -603,30 +946,47 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
603
946
|
{'label': 'Service Call with Scripts',
|
|
604
947
|
'function_call': func,
|
|
605
948
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
949
|
+
'type': 'callmanipulate',
|
|
606
950
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
607
951
|
{'label': 'Service Call',
|
|
608
952
|
'function_call': func,
|
|
609
953
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
954
|
+
'type': 'call',
|
|
610
955
|
'params': [self.adaptor.description.elements.call, node]},
|
|
611
956
|
{'label': 'Script',
|
|
612
957
|
'function_call': func,
|
|
613
958
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
959
|
+
'type': 'manipulate',
|
|
614
960
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
615
961
|
{'label': 'Parallel',
|
|
616
962
|
'function_call': func,
|
|
617
963
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
964
|
+
'type': 'parallel',
|
|
618
965
|
'params': [self.adaptor.description.elements.parallel, node]},
|
|
619
966
|
{'label': 'Decision',
|
|
620
967
|
'function_call': func,
|
|
621
968
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
969
|
+
'type': 'choose',
|
|
622
970
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
623
971
|
{'label': 'Loop',
|
|
624
972
|
'function_call': func,
|
|
625
973
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
974
|
+
'type': 'loop',
|
|
626
975
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
976
|
+
{'label': 'Terminate',
|
|
977
|
+
'function_call': func,
|
|
978
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
979
|
+
'type': 'terminate',
|
|
980
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
981
|
+
{'label': 'Stop',
|
|
982
|
+
'function_call': func,
|
|
983
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
984
|
+
'type': 'stop',
|
|
985
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
627
986
|
{'label': 'Critical',
|
|
628
987
|
'function_call': func,
|
|
629
988
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
989
|
+
'type': 'critical',
|
|
630
990
|
'params': [self.adaptor.description.elements.critical, node]},
|
|
631
991
|
];
|
|
632
992
|
}, //}}}
|
|
@@ -677,9 +1037,11 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
677
1037
|
'illustrator': {//{{{
|
|
678
1038
|
'endnodes': 'passthrough',
|
|
679
1039
|
'closeblock': false,
|
|
1040
|
+
'balance': true,
|
|
680
1041
|
'expansion': function(node) {
|
|
681
1042
|
return 'vertical';
|
|
682
1043
|
},
|
|
1044
|
+
'closing_symbol': 'end',
|
|
683
1045
|
'col_shift': function(node) {
|
|
684
1046
|
return true;
|
|
685
1047
|
},
|
|
@@ -694,30 +1056,47 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
694
1056
|
{'label': 'Service Call with Scripts',
|
|
695
1057
|
'function_call': func,
|
|
696
1058
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
|
1059
|
+
'type': 'callmanipulate',
|
|
697
1060
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
|
698
1061
|
{'label': 'Service Call',
|
|
699
1062
|
'function_call': func,
|
|
700
1063
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
|
1064
|
+
'type': 'call',
|
|
701
1065
|
'params': [self.adaptor.description.elements.call, node]},
|
|
702
1066
|
{'label': 'Script Task',
|
|
703
1067
|
'function_call': func,
|
|
704
1068
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
|
1069
|
+
'type': 'manipulate',
|
|
705
1070
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
|
706
1071
|
{'label': 'Parallel',
|
|
707
1072
|
'function_call': func,
|
|
708
1073
|
'menu_icon': self.elements.parallel.illustrator.svg.clone(),
|
|
1074
|
+
'type': 'parallel',
|
|
709
1075
|
'params': [self.adaptor.description.elements.parallel, node]},
|
|
710
1076
|
{'label': 'Decision',
|
|
711
1077
|
'function_call': func,
|
|
712
1078
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
|
1079
|
+
'type': 'choose',
|
|
713
1080
|
'params': [self.adaptor.description.elements.choose, node]},
|
|
714
1081
|
{'label': 'Loop',
|
|
715
1082
|
'function_call': func,
|
|
716
1083
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
1084
|
+
'type': 'loop',
|
|
717
1085
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
1086
|
+
{'label': 'Terminate',
|
|
1087
|
+
'function_call': func,
|
|
1088
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
1089
|
+
'type': 'terminate',
|
|
1090
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
1091
|
+
{'label': 'Stop',
|
|
1092
|
+
'function_call': func,
|
|
1093
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
1094
|
+
'type': 'stop',
|
|
1095
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
718
1096
|
{'label': 'Critical',
|
|
719
1097
|
'function_call': func,
|
|
720
1098
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
1099
|
+
'type': 'critical',
|
|
721
1100
|
'params': [self.adaptor.description.elements.critical, node]}
|
|
722
1101
|
];
|
|
723
1102
|
}, //}}}
|
|
@@ -736,66 +1115,74 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
736
1115
|
// * they may only have an illustrator (or other parts)
|
|
737
1116
|
// * they HAVE TO have a parent
|
|
738
1117
|
this.elements.callmanipulate = { /*{{{*/
|
|
739
|
-
'type': 'abstract',
|
|
740
1118
|
'parent': 'call',
|
|
741
1119
|
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
|
742
1120
|
'illustrator': {//{{{
|
|
743
|
-
'
|
|
1121
|
+
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
|
744
1122
|
'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
|
|
745
1123
|
},//}}}
|
|
746
1124
|
}; /*}}}*/
|
|
747
1125
|
this.elements.choose_inclusive = { /*{{{*/
|
|
748
|
-
'type': 'abstract',
|
|
749
1126
|
'parent': 'choose',
|
|
750
1127
|
'illustrator': {//{{{
|
|
751
1128
|
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
|
752
|
-
}
|
|
1129
|
+
}//}}}
|
|
753
1130
|
}; /*}}}*/
|
|
754
1131
|
this.elements.choose_exclusive = { /*{{{*/
|
|
755
|
-
'type': 'abstract',
|
|
756
1132
|
'parent': 'choose',
|
|
757
1133
|
'illustrator': {//{{{
|
|
758
1134
|
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
|
759
1135
|
},//}}}
|
|
760
1136
|
}; /*}}}*/
|
|
761
|
-
this.elements.
|
|
762
|
-
'
|
|
763
|
-
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
|
764
|
-
}; /*}}}*/
|
|
765
|
-
this.elements.callinstantiation = { /*{{{*/
|
|
766
|
-
'type': 'abstract',
|
|
767
|
-
'parent': 'call',
|
|
1137
|
+
this.elements.choose_inclusive_finish = { /*{{{*/
|
|
1138
|
+
'parent': 'choose_finish',
|
|
768
1139
|
'illustrator': {//{{{
|
|
769
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
|
770
|
-
}
|
|
1140
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
|
1141
|
+
}//}}}
|
|
771
1142
|
}; /*}}}*/
|
|
772
|
-
this.elements.
|
|
773
|
-
'
|
|
774
|
-
'parent': 'call',
|
|
1143
|
+
this.elements.choose_exclusive_finish = { /*{{{*/
|
|
1144
|
+
'parent': 'choose_finish',
|
|
775
1145
|
'illustrator': {//{{{
|
|
776
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
|
1146
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
|
777
1147
|
},//}}}
|
|
778
1148
|
}; /*}}}*/
|
|
779
|
-
this.elements.
|
|
780
|
-
'
|
|
781
|
-
'parent': 'call',
|
|
1149
|
+
this.elements.parallel_simple = { /*{{{*/
|
|
1150
|
+
'parent': 'parallel_finish',
|
|
782
1151
|
'illustrator': {//{{{
|
|
783
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
|
784
|
-
}
|
|
1152
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
|
|
1153
|
+
}//}}}
|
|
785
1154
|
}; /*}}}*/
|
|
786
|
-
this.elements.
|
|
787
|
-
'
|
|
788
|
-
'parent': 'call',
|
|
1155
|
+
this.elements.parallel_complex = { /*{{{*/
|
|
1156
|
+
'parent': 'parallel_finish',
|
|
789
1157
|
'illustrator': {//{{{
|
|
790
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
|
1158
|
+
'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
|
|
791
1159
|
},//}}}
|
|
792
1160
|
}; /*}}}*/
|
|
793
|
-
this.elements.
|
|
794
|
-
'
|
|
795
|
-
'parent': 'call',
|
|
796
|
-
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
|
1161
|
+
this.elements.parallel_branch_normal = { /*{{{*/
|
|
1162
|
+
'parent': 'parallel_branch',
|
|
797
1163
|
'illustrator': {//{{{
|
|
798
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
|
799
|
-
}
|
|
1164
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
|
|
1165
|
+
}//}}}
|
|
800
1166
|
}; /*}}}*/
|
|
1167
|
+
this.elements.parallel_branch_event = { /*{{{*/
|
|
1168
|
+
'parent': 'parallel_branch',
|
|
1169
|
+
'illustrator': {//{{{
|
|
1170
|
+
'endnodes': 'this',
|
|
1171
|
+
'noarrow': false,
|
|
1172
|
+
'border': true,
|
|
1173
|
+
'wide': true,
|
|
1174
|
+
'closing_symbol': 'event_end',
|
|
1175
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
|
|
1176
|
+
}//}}}
|
|
1177
|
+
}; /*}}}*/
|
|
1178
|
+
this.elements.parallel_branch_compact = { /*{{{*/
|
|
1179
|
+
'parent': 'parallel_branch',
|
|
1180
|
+
'illustrator': {//{{{
|
|
1181
|
+
'endnodes': 'this',
|
|
1182
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
|
|
1183
|
+
}//}}}
|
|
1184
|
+
}; /*}}}*/
|
|
1185
|
+
this.elements.scripts = { /*{{{*/
|
|
1186
|
+
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
|
1187
|
+
}; /*}}}*/
|
|
801
1188
|
}
|