moved from decision to switch for compatibility with new conductor

This commit is contained in:
Marco Lettere 2023-10-12 13:20:45 +02:00
parent 20025bad84
commit bd35f5aded
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
"inputParameters": {
"foundusers" : "${lookup_user.output.body}",
"username" : "${workflow.input.user}",
"expression": "for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username) return Java.to([$.foundusers[i]], 'java.lang.Object[]')}",
"expression": "var found = null; for(var i=0; i < $.foundusers.length;i++){if($.foundusers[i]['username'] == $.username){ found = i; break;}; return found == null ? null : Java.to([$.foundusers[found]], 'java.lang.Object[]')",
"evaluatorType" : "javascript"
},
"type": "INLINE"
@ -127,7 +127,7 @@
"inputParameters": {
"role": "${workflow.input.role}",
"roles" : "${get_client_roles.output.body}",
"expression": "for(var i=0; i < $.roles.length;i++){if($.roles[i]['name'] == $.role) return Java.to([$.roles[i]], 'java.lang.Object[]')}",
"expression": "var found = null; for(var i=0; i < $.roles.length;i++){if($.roles[i]['name'] == $.role){ found = i; break; }}; return found == null ? null : Java.to([$.roles[found]], 'java.lang.Object[]')",
"evaluatorType" : "javascript"
}
},