adapted delete user from group to also handle gateways
This commit is contained in:
parent
0f2023bb62
commit
8805ceb944
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue