2021-12-20 18:00:01 +01:00
|
|
|
{
|
|
|
|
"ownerApp" : "Orchestrator",
|
|
|
|
"name" : "add_workspace_client_to_contexts",
|
|
|
|
"createBy" : "Marco Lettere",
|
|
|
|
"description": "A workspace client is made Member of all the contexts passed as input by calling the add_workspace_client_to_context sub-workflow",
|
|
|
|
"version" : 1,
|
|
|
|
"ownerEmail" : "marco.lettere@nubisware.com",
|
|
|
|
"inputParameters" : ["client_id", "context_list"],
|
|
|
|
"tasks" : [
|
|
|
|
{
|
|
|
|
"name": "LAMBDA_TASK",
|
|
|
|
"taskReferenceName": "init",
|
|
|
|
"type": "LAMBDA",
|
|
|
|
"inputParameters": {
|
|
|
|
"root_vo": "{{ root_vo }}",
|
|
|
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
2021-12-20 18:01:19 +01:00
|
|
|
"id" : "${workflow.input.client_id}",
|
2021-12-20 18:00:01 +01:00
|
|
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
2021-12-21 11:02:19 +01:00
|
|
|
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.id)) throw('Client ID must not be empty'); return { }"
|
2021-12-20 18:00:01 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "LAMBDA_TASK",
|
|
|
|
"taskReferenceName": "build_tasks_to_add_ws_client_to_all_contexts",
|
|
|
|
"type": "LAMBDA",
|
|
|
|
"inputParameters": {
|
|
|
|
"context_list" : "${workflow.input.context_list}",
|
|
|
|
"client_id" : "${workflow.input.client_id}",
|
|
|
|
"scriptExpression": "inputs={},tasks=[];for(var i=0;i<$.context_list.length;i++)c=$.context_list[i],tasks.push({name:'sub_workflow_task',type:'SUB_WORKFLOW',taskReferenceName:'add_workspace_client_to_context_'+i, subWorkflowParam:{ name:'add_workspace_client_to_context'}}),inputs['add_workspace_client_to_context_'+i]={client_id : $.client_id, context: c};return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name" : "fork_dynamic",
|
|
|
|
"type" : "FORK_JOIN_DYNAMIC",
|
|
|
|
"taskReferenceName" : "parallel_build_tasks_to_add_ws_client_to_all_contexts",
|
|
|
|
"inputParameters" : {
|
|
|
|
"tasks" : "${build_tasks_to_add_ws_client_to_all_contexts.output.result.tasks}",
|
|
|
|
"inputs" : "${build_tasks_to_add_ws_client_to_all_contexts.output.result.inputs}"
|
|
|
|
},
|
|
|
|
"dynamicForkTasksParam": "tasks",
|
|
|
|
"dynamicForkTasksInputParamName": "inputs"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name" : "join",
|
|
|
|
"type" : "JOIN",
|
|
|
|
"taskReferenceName" : "join_build_tasks_to_add_ws_client_to_all_contexts"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|