|
|
|
@ -102,6 +102,27 @@
|
|
|
|
|
"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; } return { 'group' : selectByPath($.groups, $.tree, 0)}"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name" : "check_group_existance",
|
|
|
|
|
"taskReferenceName" : "check_group_existance",
|
|
|
|
|
"type" : "DECISION",
|
|
|
|
|
"inputParameters" :{
|
|
|
|
|
"group" : "${extract_group.output.result.group}"
|
|
|
|
|
},
|
|
|
|
|
"caseExpression": "(($.group != null) ? 'delete' : 'skip')",
|
|
|
|
|
"decisionCases" : {
|
|
|
|
|
"skip" : [
|
|
|
|
|
{
|
|
|
|
|
"name" : "terminate",
|
|
|
|
|
"taskReferenceName" : "terminate_when_no_group",
|
|
|
|
|
"type" : "TERMINATE",
|
|
|
|
|
"inputParameters" : {
|
|
|
|
|
"terminationStatus" : "COMPLETED"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name" : "pyrest",
|
|
|
|
|
"taskReferenceName" : "delete_user_from_group",
|
|
|
|
|