|
|
|
@ -99,11 +99,11 @@
|
|
|
|
|
"name": "INLINE_TASK",
|
|
|
|
|
"taskReferenceName": "extract_group",
|
|
|
|
|
"type": "INLINE",
|
|
|
|
|
"evaluatorType" : "javascript",
|
|
|
|
|
"inputParameters": {
|
|
|
|
|
"tree" : "${init.output.result.tree}",
|
|
|
|
|
"groups" : "${look_up_groups.output.body}",
|
|
|
|
|
"scriptExpression": "function selectByPath(groups, path, level) { for (var i=0; i < groups.length; i++) {if (groups[i].name === path[level]) {if (level === path.length - 1) return groups[i];return selectByPath(groups[i].subGroups, path, level+1)}} return null; } function f() { return { 'group' : selectByPath($.groups, $.tree, 0)}} f()"
|
|
|
|
|
"expression": "function selectByPath(groups, path, level) { for (var i=0; i < groups.length; i++) {if (groups[i].name === path[level]) {if (level === path.length - 1) return groups[i];return selectByPath(groups[i].subGroups, path, level+1)}} return null; } function f() { return { 'group' : selectByPath($.groups, $.tree, 0)}} f()",
|
|
|
|
|
"evaluatorType" : "javascript"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|