moved from decision to switch for compatibility with new conductor

This commit is contained in:
Marco Lettere 2023-10-12 15:01:51 +02:00
parent 7ca6e1e022
commit 47a09e155d
2 changed files with 25 additions and 25 deletions

View File

@ -54,7 +54,7 @@
"inputParameters": {
"foundusers" : "${lookup_user.output.body}",
"username" : "${workflow.input.user}",
"expression": "function f(){for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return Java.to([$.foundusers[i]], 'java.lang.Object[]')}} f()",
"expression": "function f(){for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return $.foundusers[i] } f()",
"evaluatorType" : "javascript"
},
"type": "INLINE"
@ -63,11 +63,11 @@
"name": "check_user_existance",
"taskReferenceName": "check_user_existance",
"inputParameters": {
"users": "${select_user.output.result}"
"user": "${select_user.output.result}"
},
"type": "SWITCH",
"evaluatorType": "javascript",
"expression": "($.users.length !== 1 ? 'true' : 'false')",
"expression": "$.user == null ? 'true' : 'false'",
"decisionCases": {
"true": [
{

View File

@ -55,32 +55,32 @@
"foundusers": "${lookup_user.output.body}",
"username": "${workflow.input.user}",
"evaluatorType" : "javascript",
"expression": "function f(){for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return Java.to([$.foundusers[i]], 'java.lang.Object[]')}} f()"
"expression": "function f(){for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return $.foundusers[i]}} f()"
},
"type": "INLINE"
},
{
"name": "check_user_existance",
"taskReferenceName": "check_user_existance",
"inputParameters": {
"users": "${select_user.output.result}"
},
"type": "SWITCH",
"evaluatorType" : "javascript",
"expression": "($.users.length !== 1 ? 'true' : 'false')",
"decisionCases": {
"true": [
{
"name" : "terminate",
"taskReferenceName" : "terminate_when_no_user",
"type" : "TERMINATE",
"inputParameters" : {
"terminationStatus" : "COMPLETED"
}
}
]
}
},
"name": "check_user_existance",
"taskReferenceName": "check_user_existance",
"inputParameters": {
"users": "${select_user.output.result}"
},
"type": "SWITCH",
"evaluatorType" : "javascript",
"expression": "($.user == null ? 'true' : 'false')",
"decisionCases": {
"true": [
{
"name" : "terminate",
"taskReferenceName" : "terminate_when_no_user",
"type" : "TERMINATE",
"inputParameters" : {
"terminationStatus" : "COMPLETED"
}
}
]
}
},
{
"name" : "pyrest",
"taskReferenceName" : "lookup_client",