moved from decision to switch for compatibility with new conductor

This commit is contained in:
Marco Lettere 2023-10-12 13:33:11 +02:00
parent bd35f5aded
commit d61e893a8b
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": "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[]')",
"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()",
"evaluatorType" : "javascript"
},
"type": "INLINE"
@ -127,7 +127,7 @@
"inputParameters": {
"role": "${workflow.input.role}",
"roles" : "${get_client_roles.output.body}",
"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[]')",
"expression": "function f(){for(var i=0; i < $.roles.length;i++){if($.roles[i]['name'] == $.role) return Java.to([$.roles[i]], 'java.lang.Object[]')}} f()",
"evaluatorType" : "javascript"
}
},