early termination when no user found

This commit is contained in:
Marco Lettere 2022-03-11 12:52:07 +01:00
parent 67435074ad
commit a4807d24e8
2 changed files with 23 additions and 2 deletions

View File

@ -2,9 +2,9 @@
workflows:
# - create-user-add-to-vre
# - group_deleted
# - user-group_created
- user-group_created
# - user-group-role_created
- group_created
# - group_created
# - invitation-accepted
# - user-group_deleted
# - user-group-role_deleted

View File

@ -58,6 +58,27 @@
"scriptExpression": "for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return Java.to([$.foundusers[i]], 'java.lang.Object[]')}"
},
"type": "LAMBDA"
},
{
"name": "check_user_existance",
"taskReferenceName": "check_user_existance",
"inputParameters": {
"user": "${select_user.output.result[0]}"
},
"type": "DECISION",
"caseExpression": "($.user == null ? 'true' : 'false')",
"decisionCases": {
"true": [
{
"name" : "terminate",
"taskReferenceName" : "terminate_when_no_user",
"type" : "TERMINATE",
"inputParameters" : {
"terminationStatus" : "COMPLETED"
}
}
]
}
},
{
"name" : "pyrest",