beta-glozic-workflow 1.0.0
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.
- package/README.md +70 -0
- package/dist/component/TaskPalette/TaskPalette.css +105 -0
- package/dist/component/TaskPalette/TaskPalette.js +104 -0
- package/dist/component/TaskPalette/index.js +10 -0
- package/dist/component/TaskPaletteGroup/TaskPaletteGroup.css +85 -0
- package/dist/component/TaskPaletteGroup/TaskPaletteGroup.js +71 -0
- package/dist/component/TaskPaletteGroup/index.js +10 -0
- package/dist/css/style.css +363 -0
- package/dist/index.css +0 -0
- package/dist/index.js +2040 -0
- package/dist/nodeconfig.js +50 -0
- package/dist/utils/Designer.module.js +202 -0
- package/dist/utils/taskConfig.js +330 -0
- package/dist/utils/workflow.config.js +176 -0
- package/package.json +58 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
+
require("core-js/modules/es.string.replace.js");
|
|
9
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
10
|
+
const uuidv4 = () => {
|
|
11
|
+
return 'xxxxx'.replace(/[xy]/g, function (c) {
|
|
12
|
+
var r = Math.random() * 16 | 0,
|
|
13
|
+
v = c == 'x' ? r : r & 0x3 | 0x8;
|
|
14
|
+
return v.toString(16);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const startNodeId = "node-start";
|
|
18
|
+
const stopNodeId = "node-stop";
|
|
19
|
+
const defaultNodes = [{
|
|
20
|
+
id: "".concat(startNodeId),
|
|
21
|
+
text: 'Start',
|
|
22
|
+
data: {
|
|
23
|
+
nodeType: 'start'
|
|
24
|
+
},
|
|
25
|
+
height: 39,
|
|
26
|
+
width: 200,
|
|
27
|
+
nodeType: 'start',
|
|
28
|
+
icon: "play-circle"
|
|
29
|
+
}, {
|
|
30
|
+
id: "".concat(stopNodeId),
|
|
31
|
+
text: 'Stop',
|
|
32
|
+
data: {
|
|
33
|
+
nodeType: 'stop'
|
|
34
|
+
},
|
|
35
|
+
height: 39,
|
|
36
|
+
width: 200,
|
|
37
|
+
nodeType: 'stop',
|
|
38
|
+
icon: "stop-circle-o"
|
|
39
|
+
}];
|
|
40
|
+
const defaultEdge = [{
|
|
41
|
+
id: "edge-".concat(uuidv4()),
|
|
42
|
+
from: "".concat(startNodeId),
|
|
43
|
+
to: "".concat(stopNodeId)
|
|
44
|
+
}];
|
|
45
|
+
var _default = {
|
|
46
|
+
defaultNodes,
|
|
47
|
+
defaultEdge,
|
|
48
|
+
uuidv4
|
|
49
|
+
};
|
|
50
|
+
exports.default = _default;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.toggleDisabledTask = exports.shouldLoopNodeExpand = exports.renameTask = exports.overlayPlus = exports.isFlowchartWillMove = exports.isExpandBranchNode = exports.getWidthOfGroup = exports.getTaskData = exports.getFileNameParam = exports.generateGuid = exports.addTaskMenuIcon = void 0;
|
|
8
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
9
|
+
require("core-js/modules/es.string.replace.js");
|
|
10
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
11
|
+
require("core-js/modules/es.string.search.js");
|
|
12
|
+
var _workflow = require("./workflow.config");
|
|
13
|
+
var Designer = _interopRequireWildcard(require("../index"));
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
const overlayPlus = function overlayPlus(source, target) {
|
|
17
|
+
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
18
|
+
let overlay = {
|
|
19
|
+
create: component => {
|
|
20
|
+
let plusIcon = document.createElement('div');
|
|
21
|
+
plusIcon.classList.add('overlay-plus');
|
|
22
|
+
plusIcon.innerHTML = '<div class="workflow--node-dropable-zone unselectable" data-position="' + position + '" data-source="' + source + '" data-target="' + target + '"><span class="fa fa-plus fc-task-placeholder"></span></div>';
|
|
23
|
+
// //console.log(plusIcon)
|
|
24
|
+
return plusIcon;
|
|
25
|
+
},
|
|
26
|
+
location: 0.5,
|
|
27
|
+
id: "overlayPLus"
|
|
28
|
+
};
|
|
29
|
+
// //console.log(overlay)
|
|
30
|
+
return overlay;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// if enough space for new node -> no need move flowchart down
|
|
34
|
+
exports.overlayPlus = overlayPlus;
|
|
35
|
+
const isFlowchartWillMove = (nodes, parent, position, newNode, source, target) => {
|
|
36
|
+
let sourceH = nodes[source].element.offsetHeight;
|
|
37
|
+
let targetH = nodes[target].element.offsetHeight;
|
|
38
|
+
let currentGap = nodes[target].element.offsetTop - nodes[source].element.offsetTop - sourceH;
|
|
39
|
+
let expectGap = _workflow.config.nodeGap;
|
|
40
|
+
if (newNode.branch >= 1) expectGap += _workflow.config.nodeGap * 2 + _workflow.config.nodeSizeDefault / 2;
|
|
41
|
+
// else if (newNode.branch === 1) expectGap += config.nodeGap*2 + config.nodeSizeDefault;
|
|
42
|
+
else expectGap += _workflow.config.nodeSizeDefault + _workflow.config.nodeGap;
|
|
43
|
+
//console.log('0206 ', expectGap, currentGap)
|
|
44
|
+
return expectGap > currentGap;
|
|
45
|
+
};
|
|
46
|
+
exports.isFlowchartWillMove = isFlowchartWillMove;
|
|
47
|
+
const shouldLoopNodeExpand = (loopNode, jsPlumbInstance) => {
|
|
48
|
+
//console.log('shouldLoopNodeExpand ', loopNode)
|
|
49
|
+
let loopNodeP = loopNode.split('-');
|
|
50
|
+
let endNode = "".concat(loopNodeP[0], "-end-").concat(loopNodeP[1]);
|
|
51
|
+
let leftbot = "".concat(loopNodeP[0], "-leftbot-").concat(loopNodeP[1]);
|
|
52
|
+
let connection = jsPlumbInstance.getConnections({
|
|
53
|
+
source: leftbot,
|
|
54
|
+
target: endNode
|
|
55
|
+
})[0].connector;
|
|
56
|
+
let bBox = connection.svg.getBBox();
|
|
57
|
+
//console.log(bBox.width)
|
|
58
|
+
return bBox.width <= 100 + _workflow.config.nodeWidthDefault / 2 + 10;
|
|
59
|
+
};
|
|
60
|
+
exports.shouldLoopNodeExpand = shouldLoopNodeExpand;
|
|
61
|
+
const isExpandBranchNode = (nodes, parent, jsPlumbInstance) => {
|
|
62
|
+
//console.log('isExpandBranchNode', nodes, parent, nodes[parent])
|
|
63
|
+
let nextNode = nodes[parent].next.left;
|
|
64
|
+
// //console.log('2605',nodes, parent, nextNode, jsPlumbInstance.getConnections({source: parent, target: nextNode}))
|
|
65
|
+
let connection = jsPlumbInstance.getConnections({
|
|
66
|
+
source: parent,
|
|
67
|
+
target: nextNode
|
|
68
|
+
})[0].connector;
|
|
69
|
+
//console.log('isExpandBranchNode', connection)
|
|
70
|
+
let bBox = connection.svg.getBBox();
|
|
71
|
+
// //console.log('2605', connection, parent, nextNode, bBox.width);
|
|
72
|
+
return bBox.width <= _workflow.config.nodeWidthDefault / 2 + 100;
|
|
73
|
+
};
|
|
74
|
+
exports.isExpandBranchNode = isExpandBranchNode;
|
|
75
|
+
function isExpandWhileNode(nodes, parent, jsPlumbInstance) {}
|
|
76
|
+
const getWidthOfGroup = (nodes, node) => {
|
|
77
|
+
let endId = "node-end-".concat(nodes[node].count);
|
|
78
|
+
let cItem = nodes[node].next[0];
|
|
79
|
+
let right = Number.MIN_SAFE_INTEGER;
|
|
80
|
+
let left = Number.MAX_SAFE_INTEGER;
|
|
81
|
+
let leftChange = false;
|
|
82
|
+
let rightChange = false;
|
|
83
|
+
//console.log(cItem, endId, node, nodes[node])
|
|
84
|
+
while (cItem !== endId) {
|
|
85
|
+
//console.log('0106 getWidthOfGroup', node, cItem)
|
|
86
|
+
if (nodes[cItem].branch === 1) {
|
|
87
|
+
let l = nodes["node-lefttop-".concat(nodes[node].count)].element.offsetLeft;
|
|
88
|
+
let r = nodes["node-righttop-".concat(nodes[node].count)].element.offsetLeft;
|
|
89
|
+
if (l < left) {
|
|
90
|
+
left = l;
|
|
91
|
+
leftChange = true;
|
|
92
|
+
}
|
|
93
|
+
if (r > right) {
|
|
94
|
+
right = r;
|
|
95
|
+
rightChange = true;
|
|
96
|
+
}
|
|
97
|
+
} else if (nodes[cItem].branch >= 2) {
|
|
98
|
+
nodes[cItem][0].forEach(l => {
|
|
99
|
+
let v = nodes[l].element.offsetLeft;
|
|
100
|
+
if (v < left) {
|
|
101
|
+
leftChange = true;
|
|
102
|
+
left = v;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
nodes[cItem][nodes[cItem].branch - 1].forEach(r => {
|
|
106
|
+
let v = nodes[r].element.offsetLeft;
|
|
107
|
+
//console.log('====> r ', r, nodes[r].type, Designer.SPECIAL_END_NODE, Designer.SPECIAL_CORNER_NODE)
|
|
108
|
+
if (nodes[r].type !== Designer.SPECIAL_END_NODE && nodes[r].type !== Designer.SPECIAL_CORNER_NODE) {
|
|
109
|
+
//console.log('here*******', v)
|
|
110
|
+
v += _workflow.config.nodeWidthDefault;
|
|
111
|
+
}
|
|
112
|
+
//console.log(v, right)
|
|
113
|
+
if (v > right) {
|
|
114
|
+
rightChange = true;
|
|
115
|
+
right = v;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (nodes[cItem].branch >= 1) {
|
|
120
|
+
cItem = nodes["node-end-".concat(nodes[cItem].count)].next;
|
|
121
|
+
} else {
|
|
122
|
+
cItem = nodes[cItem].next;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//console.log(leftChange, rightChange)
|
|
126
|
+
return {
|
|
127
|
+
left: leftChange ? left : false,
|
|
128
|
+
right: rightChange ? right : false
|
|
129
|
+
};
|
|
130
|
+
//console.log('getWidthOfGroup ', left, right)
|
|
131
|
+
};
|
|
132
|
+
exports.getWidthOfGroup = getWidthOfGroup;
|
|
133
|
+
const addTaskMenuIcon = task => {
|
|
134
|
+
let menu = document.createElement('div');
|
|
135
|
+
menu.innerHTML = "<div class=\"task-iconmenu-container\">\n <div class=\"task-iconmenu-inner\" >\n <div class=\"task-iconmenu-btn fa fa-ellipsis-h\">\n </div>\n <div class=\"task-iconmenu-board\">\n <div class=\"task-iconmenu-board-inner\" data-task=\"".concat(task.getAttribute('id'), "\">\n <div class=\"task-iconmenu-item\" data-btn=\"copy\"><span class=\"fa fa-copy\"></span>Copy</div>\n <div class=\"task-iconmenu-item\" data-btn=\"rename\"><span class=\"fa fa-pencil\"></span>Rename</div>\n <div class=\"task-iconmenu-item\" data-btn=\"disabled\"><span class=\"fa fa-ban\"></span>Disabled/Enabled</div>\n <div class=\"task-iconmenu-item\" data-btn=\"delete\"><span class=\"fa fa-trash\"></span>Delete</div>\n </div>\n </div>\n </div>\n </div>");
|
|
136
|
+
task.append(menu);
|
|
137
|
+
};
|
|
138
|
+
exports.addTaskMenuIcon = addTaskMenuIcon;
|
|
139
|
+
const getTaskData = (task, nodes) => {
|
|
140
|
+
//console.log('getTaskData ', task, nodes)
|
|
141
|
+
let next = task.next;
|
|
142
|
+
let previous = task.previous;
|
|
143
|
+
//console.log(next, previous, Designer.NODE_END, Designer.NODE_START)
|
|
144
|
+
if (next === Designer.NODE_END) next = null;else if (typeof next === 'object' && next !== null) {
|
|
145
|
+
next = nodes["node-end-".concat(task.count)].next;
|
|
146
|
+
if (next === Designer.NODE_END) next = null;
|
|
147
|
+
} else if (next && nodes[next].type === Designer.SPECIAL_CORNER_NODE) next = null;
|
|
148
|
+
if (previous === Designer.NODE_START) previous = null;else if (previous && nodes[previous].type === Designer.SPECIAL_END_NODE) previous = nodes[previous].parent;else if (previous && nodes[previous].type === Designer.SPECIAL_CORNER_NODE) previous = null;
|
|
149
|
+
if (next) next = Number(next.split('-')[1]);
|
|
150
|
+
if (previous) previous = Number(previous.split('-')[1]);
|
|
151
|
+
return {
|
|
152
|
+
"number": task.number,
|
|
153
|
+
"next": next,
|
|
154
|
+
"previous": previous,
|
|
155
|
+
"parent": task.parent,
|
|
156
|
+
"configuration": task.configuration,
|
|
157
|
+
"branches": task.branches,
|
|
158
|
+
"taskType": task.taskType,
|
|
159
|
+
"datatype": task.datatype
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
exports.getTaskData = getTaskData;
|
|
163
|
+
const toggleDisabledTask = (taskId, tasks) => {
|
|
164
|
+
if (tasks[taskId].configuration.isDisabled) tasks[taskId].element.classList.remove('is-disabled');else tasks[taskId].element.classList.add('is-disabled');
|
|
165
|
+
tasks[taskId].configuration.isDisabled = !tasks[taskId].configuration.isDisabled;
|
|
166
|
+
};
|
|
167
|
+
exports.toggleDisabledTask = toggleDisabledTask;
|
|
168
|
+
const renameTask = (taskId, tasks, value) => {
|
|
169
|
+
tasks[taskId].configuration.actionName = value;
|
|
170
|
+
tasks[taskId].schema.title = value;
|
|
171
|
+
document.getElementById(taskId).querySelector('.task-palette-title').innerHTML = value;
|
|
172
|
+
};
|
|
173
|
+
exports.renameTask = renameTask;
|
|
174
|
+
function getJsonDataFromFile() {}
|
|
175
|
+
const generateGuid = () => {
|
|
176
|
+
var d = new Date().getTime();
|
|
177
|
+
if (window.performance && typeof window.performance.now === "function") {
|
|
178
|
+
d += performance.now();
|
|
179
|
+
; //use high-precision timer if available
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
183
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
|
184
|
+
d = Math.floor(d / 16);
|
|
185
|
+
return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
186
|
+
});
|
|
187
|
+
return guid;
|
|
188
|
+
};
|
|
189
|
+
exports.generateGuid = generateGuid;
|
|
190
|
+
const getFileNameParam = () => {
|
|
191
|
+
let search = window.location.search;
|
|
192
|
+
if (!search) return null;
|
|
193
|
+
search = search.split('?')[1];
|
|
194
|
+
search = search.split('&');
|
|
195
|
+
//console.log('search ', search)
|
|
196
|
+
search = search.map(e => e.split('='));
|
|
197
|
+
//console.log('search ', search)
|
|
198
|
+
search.filter(s => s[0] === 'filename');
|
|
199
|
+
//console.log('search ', search)
|
|
200
|
+
return search[0][1];
|
|
201
|
+
};
|
|
202
|
+
exports.getFileNameParam = getFileNameParam;
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.taskConfig = void 0;
|
|
7
|
+
const taskConfig = {
|
|
8
|
+
"Functions": {
|
|
9
|
+
"logMessage": {
|
|
10
|
+
"title": "Log Message",
|
|
11
|
+
"nodeType": "Log Message",
|
|
12
|
+
"name": "logMessage",
|
|
13
|
+
"description": "log a message to log database...",
|
|
14
|
+
"type": "function",
|
|
15
|
+
"icon": "history",
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"_comment_enabled": "if 'no', it will not available in the task palette",
|
|
18
|
+
"input": 1,
|
|
19
|
+
"output": 1,
|
|
20
|
+
"branch": 0,
|
|
21
|
+
"code": []
|
|
22
|
+
},
|
|
23
|
+
"jseditor": {
|
|
24
|
+
"title": "JS Editor",
|
|
25
|
+
"nodeType": "JS Editor",
|
|
26
|
+
"name": "js_editor",
|
|
27
|
+
"description": "",
|
|
28
|
+
"type": "function",
|
|
29
|
+
"icon": "futbol-o",
|
|
30
|
+
"enabled": true,
|
|
31
|
+
"_comment_enabled": "",
|
|
32
|
+
"input": 1,
|
|
33
|
+
"output": 1,
|
|
34
|
+
"branch": 0,
|
|
35
|
+
"code": []
|
|
36
|
+
},
|
|
37
|
+
"toast": {
|
|
38
|
+
"title": "Toast",
|
|
39
|
+
"nodeType": "Toast",
|
|
40
|
+
"name": "toast",
|
|
41
|
+
"description": "",
|
|
42
|
+
"type": "function",
|
|
43
|
+
"icon": "bell-o",
|
|
44
|
+
"enabled": true,
|
|
45
|
+
"_comment_enabled": "",
|
|
46
|
+
"input": 1,
|
|
47
|
+
"output": 1,
|
|
48
|
+
"branch": 0,
|
|
49
|
+
"code": []
|
|
50
|
+
},
|
|
51
|
+
"redirect": {
|
|
52
|
+
"title": "Redirect",
|
|
53
|
+
"nodeType": "Redirect",
|
|
54
|
+
"name": "redirect",
|
|
55
|
+
"description": "",
|
|
56
|
+
"type": "function",
|
|
57
|
+
"icon": "share-square",
|
|
58
|
+
"enabled": true,
|
|
59
|
+
"_comment_enabled": "",
|
|
60
|
+
"input": 1,
|
|
61
|
+
"output": 1,
|
|
62
|
+
"branch": 0,
|
|
63
|
+
"code": []
|
|
64
|
+
},
|
|
65
|
+
"queryJson": {
|
|
66
|
+
"title": "Query Json",
|
|
67
|
+
"nodeType": "Query Json",
|
|
68
|
+
"name": "queryJson",
|
|
69
|
+
"description": "log a message to log database...",
|
|
70
|
+
"type": "function",
|
|
71
|
+
"icon": "filter",
|
|
72
|
+
"enabled": true,
|
|
73
|
+
"_comment_enabled": "if 'no', it will not available in the task palette",
|
|
74
|
+
"input": 1,
|
|
75
|
+
"output": 1,
|
|
76
|
+
"branch": 0,
|
|
77
|
+
"code": []
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"Services": {
|
|
81
|
+
"sendEmail": {
|
|
82
|
+
"title": "Send Email",
|
|
83
|
+
"nodeType": "Send Email",
|
|
84
|
+
"name": "sendEmail",
|
|
85
|
+
"description": "Send email service",
|
|
86
|
+
"type": "service",
|
|
87
|
+
"icon": "envelope",
|
|
88
|
+
"enabled": true,
|
|
89
|
+
"_comment": "",
|
|
90
|
+
"input": 1,
|
|
91
|
+
"output": 1,
|
|
92
|
+
"branch": 0,
|
|
93
|
+
"code": []
|
|
94
|
+
},
|
|
95
|
+
"sendSms": {
|
|
96
|
+
"title": "Send SMS",
|
|
97
|
+
"nodeType": "Send SMS",
|
|
98
|
+
"name": "sendSms",
|
|
99
|
+
"description": "Send sms service",
|
|
100
|
+
"type": "service",
|
|
101
|
+
"icon": "envelope",
|
|
102
|
+
"enabled": true,
|
|
103
|
+
"_comment": "",
|
|
104
|
+
"input": 1,
|
|
105
|
+
"output": 1,
|
|
106
|
+
"branch": 0,
|
|
107
|
+
"code": []
|
|
108
|
+
},
|
|
109
|
+
"assignTask": {
|
|
110
|
+
"title": "Assign Task",
|
|
111
|
+
"nodeType": "Assign Task",
|
|
112
|
+
"name": "assignTask",
|
|
113
|
+
"description": "Assign a task and get response",
|
|
114
|
+
"icon": "check-square",
|
|
115
|
+
"type": "get-response",
|
|
116
|
+
"mode": "pause-resume",
|
|
117
|
+
"enabled": true,
|
|
118
|
+
"_comment_enabled": "",
|
|
119
|
+
"input": 1,
|
|
120
|
+
"output": 2,
|
|
121
|
+
"branch": 2,
|
|
122
|
+
"branches": [{
|
|
123
|
+
"condition": false,
|
|
124
|
+
"name": "No_Branch",
|
|
125
|
+
"actions": []
|
|
126
|
+
}, {
|
|
127
|
+
"condition": true,
|
|
128
|
+
"name": "Yes_Branch",
|
|
129
|
+
"actions": []
|
|
130
|
+
}]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"Logic and controls": {
|
|
134
|
+
"IF_ELSE": {
|
|
135
|
+
"schema": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": [],
|
|
138
|
+
"title": "IF ELSE",
|
|
139
|
+
"properties": {
|
|
140
|
+
"operand1": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"title": "Variable",
|
|
143
|
+
"enum": ["<WF_Variables_setting>"]
|
|
144
|
+
},
|
|
145
|
+
"operator": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"title": "Operator",
|
|
148
|
+
"enum": ["==", "!=", "in", "<", ">"]
|
|
149
|
+
},
|
|
150
|
+
"operand2": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"title": "Value"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"uiSchema": {},
|
|
157
|
+
"title": "If Else",
|
|
158
|
+
"nodeType": "Condition",
|
|
159
|
+
"name": "IF_ELSE",
|
|
160
|
+
"description": "IF_ELSE(CMP, branch_if_true, branch_if_false)",
|
|
161
|
+
"type": "logic",
|
|
162
|
+
"icon": "question",
|
|
163
|
+
"enabled": true,
|
|
164
|
+
"input": 1,
|
|
165
|
+
"output": 2,
|
|
166
|
+
"branch": 2,
|
|
167
|
+
"code": ["IF(", " CMP((lambda o, e: o.data[var], val, operator), ", " [branch0], ", " [branch1]", ")"],
|
|
168
|
+
"branches": [{
|
|
169
|
+
"condition": false,
|
|
170
|
+
"name": "No_Branch",
|
|
171
|
+
"actions": []
|
|
172
|
+
}, {
|
|
173
|
+
"condition": true,
|
|
174
|
+
"name": "Yes_Branch",
|
|
175
|
+
"actions": []
|
|
176
|
+
}]
|
|
177
|
+
},
|
|
178
|
+
"WHILE": {
|
|
179
|
+
"title": "While",
|
|
180
|
+
"nodeType": "Loop",
|
|
181
|
+
"name": "WHILE",
|
|
182
|
+
"description": "WHILE(CMP, branch)",
|
|
183
|
+
"type": "logic",
|
|
184
|
+
"icon": "retweet",
|
|
185
|
+
"enabled": true,
|
|
186
|
+
"input": 1,
|
|
187
|
+
"output": 1,
|
|
188
|
+
"branch": 1,
|
|
189
|
+
"code": ["WHILE(", " CMP((lambda o, e: o.data[var], val, operator), ", " [branch0]", ")"],
|
|
190
|
+
"branches": [{
|
|
191
|
+
"condition": true,
|
|
192
|
+
"name": "While_branch",
|
|
193
|
+
"actions": []
|
|
194
|
+
}],
|
|
195
|
+
"wrapper": true
|
|
196
|
+
},
|
|
197
|
+
"BRANCH": {
|
|
198
|
+
"branches": [{
|
|
199
|
+
"name": "branch0",
|
|
200
|
+
"actions": []
|
|
201
|
+
}, {
|
|
202
|
+
"name": "branch1",
|
|
203
|
+
"actions": []
|
|
204
|
+
}],
|
|
205
|
+
"title": "Parallel branches",
|
|
206
|
+
"nodeType": "BRANCH",
|
|
207
|
+
"name": "BRANCH",
|
|
208
|
+
"description": "IF_ELSE(CMP, branch_if_true, branch_if_false)",
|
|
209
|
+
"type": "logic",
|
|
210
|
+
"icon": "random",
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"input": 1,
|
|
213
|
+
"output": 2,
|
|
214
|
+
"branch": 2,
|
|
215
|
+
"code": ["IF(", " CMP((lambda o, e: o.data[var], val, operator), ", " [branch0], ", " [branch1]", ")"]
|
|
216
|
+
},
|
|
217
|
+
"FLEXIBLE_OUTPUT": {
|
|
218
|
+
"title": "FLEXIBLE_OUTPUT",
|
|
219
|
+
"name": "FLEXIBLE_OUTPUT",
|
|
220
|
+
"description": "Flexible branch",
|
|
221
|
+
"type": "logic",
|
|
222
|
+
"nodeType": "FLEXIBLE_OUTPUT",
|
|
223
|
+
"enabled": false,
|
|
224
|
+
"input": 1,
|
|
225
|
+
"output": 2,
|
|
226
|
+
"branch": 2,
|
|
227
|
+
"branches": [{
|
|
228
|
+
"name": "While_branch0",
|
|
229
|
+
"actions": []
|
|
230
|
+
}, {
|
|
231
|
+
"name": "While_branch1",
|
|
232
|
+
"actions": []
|
|
233
|
+
}],
|
|
234
|
+
"defaultFormData": {
|
|
235
|
+
"config": "",
|
|
236
|
+
"branches": [{
|
|
237
|
+
"branchname": "branch1"
|
|
238
|
+
}, {
|
|
239
|
+
"branchname": "default"
|
|
240
|
+
}]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"Integration": {
|
|
245
|
+
"callWebService": {
|
|
246
|
+
"actionID": "ff5fbcf2-43a3-47b4-95b6-adbac3e0c4e1",
|
|
247
|
+
"title": "Call a web service",
|
|
248
|
+
"name": "Call web service",
|
|
249
|
+
"nodeType": "Call Web Service",
|
|
250
|
+
"description": "Call a web service",
|
|
251
|
+
"type": "service",
|
|
252
|
+
"icon": "plug",
|
|
253
|
+
"enabled": true,
|
|
254
|
+
"input": 1,
|
|
255
|
+
"output": 1,
|
|
256
|
+
"branch": 0
|
|
257
|
+
},
|
|
258
|
+
"collectionOperation": {
|
|
259
|
+
"title": "Collection Operation",
|
|
260
|
+
"nodeType": "Collection",
|
|
261
|
+
"name": "queryJson",
|
|
262
|
+
"description": "",
|
|
263
|
+
"type": "function",
|
|
264
|
+
"icon": "database",
|
|
265
|
+
"enabled": true,
|
|
266
|
+
"_comment_enabled": "",
|
|
267
|
+
"input": 1,
|
|
268
|
+
"output": 1,
|
|
269
|
+
"branch": 0,
|
|
270
|
+
"code": [""]
|
|
271
|
+
},
|
|
272
|
+
"renderwebcontent": {
|
|
273
|
+
"title": "Render Web Content",
|
|
274
|
+
"nodeType": "Render Content",
|
|
275
|
+
"name": "renderwebcontent",
|
|
276
|
+
"description": "",
|
|
277
|
+
"type": "function",
|
|
278
|
+
"icon": "futbol-o",
|
|
279
|
+
"enabled": true,
|
|
280
|
+
"_comment_enabled": "",
|
|
281
|
+
"input": 1,
|
|
282
|
+
"output": 1,
|
|
283
|
+
"branch": 0,
|
|
284
|
+
"code": [""]
|
|
285
|
+
},
|
|
286
|
+
"startWorkflow": {
|
|
287
|
+
"title": "Setup Workflow",
|
|
288
|
+
"nodeType": "Setup Workflow",
|
|
289
|
+
"name": "startWorkflow",
|
|
290
|
+
"description": "",
|
|
291
|
+
"type": "function",
|
|
292
|
+
"icon": "play-circle",
|
|
293
|
+
"enabled": true,
|
|
294
|
+
"_comment_enabled": "",
|
|
295
|
+
"input": 1,
|
|
296
|
+
"output": 1,
|
|
297
|
+
"branch": 0,
|
|
298
|
+
"code": [""]
|
|
299
|
+
},
|
|
300
|
+
"qrcode": {
|
|
301
|
+
"title": "QR Code",
|
|
302
|
+
"nodeType": "QR Code",
|
|
303
|
+
"name": "qrcode",
|
|
304
|
+
"description": "",
|
|
305
|
+
"type": "function",
|
|
306
|
+
"icon": "qrcode",
|
|
307
|
+
"enabled": true,
|
|
308
|
+
"_comment_enabled": "",
|
|
309
|
+
"input": 1,
|
|
310
|
+
"output": 1,
|
|
311
|
+
"branch": 0,
|
|
312
|
+
"code": [""]
|
|
313
|
+
},
|
|
314
|
+
"setFormComponent": {
|
|
315
|
+
"title": "Set Form Component",
|
|
316
|
+
"nodeType": "Set Form Component",
|
|
317
|
+
"name": "setFormComponent",
|
|
318
|
+
"description": "",
|
|
319
|
+
"type": "function",
|
|
320
|
+
"icon": "question",
|
|
321
|
+
"enabled": true,
|
|
322
|
+
"_comment_enabled": "",
|
|
323
|
+
"input": 1,
|
|
324
|
+
"output": 1,
|
|
325
|
+
"branch": 0,
|
|
326
|
+
"code": [""]
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
exports.taskConfig = taskConfig;
|