fixed workflow
This commit is contained in:
parent
0846edfb75
commit
00782d90e1
|
@ -14,7 +14,7 @@
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"storagehub" : "{{ storagehub }}",
|
"storagehub" : "{{ storagehub }}",
|
||||||
"ctx": "${workflow.input.context}",
|
"ctx": "${workflow.input.context}",
|
||||||
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))} if(e($.ctx)) throw('Context must not be empty'); return { decoded_context : $.ctx.replaceAll('%2F', '/') }"
|
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))} if(e($.ctx)) throw('Context must not be empty'); return { shubified_context_name : ($.ctx[0] === '%' ? $.ctx.replace('%2F', '') : $.ctx).split('%2F').join('-') }"
|
||||||
},
|
},
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"decisionCases": {},
|
"decisionCases": {},
|
||||||
|
@ -29,45 +29,37 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "pyrest",
|
"name" : "pyrest",
|
||||||
"taskReferenceName": "authorize",
|
"taskReferenceName" : "authorize_with_uma_rpt",
|
||||||
|
"type" : "SIMPLE",
|
||||||
"inputParameters" : {
|
"inputParameters" : {
|
||||||
"url": "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token",
|
"url" : "${init.input.keycloak}/protocol/openid-connect/token",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"headers" : {
|
"headers" : {
|
||||||
"Accept" : "application/json"
|
"Accept" : "application/json"
|
||||||
},
|
},
|
||||||
"body" : {
|
"body" : {
|
||||||
|
"audience" : "${init.input.root_vo}",
|
||||||
|
"grant_type" : "urn:ietf:params:oauth:grant-type:uma-ticket",
|
||||||
"client_id" : "orchestrator",
|
"client_id" : "orchestrator",
|
||||||
"client_secret": "{{ keycloak_auth }}",
|
"client_secret" : "{{ keycloak_auth }}"
|
||||||
"grant_type": "client_credentials"
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"type": "SIMPLE",
|
|
||||||
"decisionCases": {},
|
|
||||||
"defaultCase": [],
|
|
||||||
"forkTasks": [],
|
|
||||||
"startDelay": 0,
|
|
||||||
"joinOn": [],
|
|
||||||
"optional": false,
|
|
||||||
"defaultExclusiveJoinTask": [],
|
|
||||||
"asyncComplete": false,
|
|
||||||
"loopOver": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pyrest",
|
"name": "pyrest",
|
||||||
"taskReferenceName": "create_vre_folder",
|
"taskReferenceName": "create_vre_folder",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"url": "https://en5ql62qrka7q.x.pipedream.net/${init.output.result.child}",
|
"url": "${init.input.storagehub}/groups",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Bearer bearer_here",
|
"Authorization": "Bearer ${authorize_with_uma_rpt.output.body.access_token}",
|
||||||
"Accept": "application/json",
|
"Accept": "text/plain",
|
||||||
"Content-Type": "multipart/form-data"
|
"Content-Type": "multipart/form-data"
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"accessType": "WRITE_ALL",
|
"accessType": "WRITE_OWN",
|
||||||
"folderOwner": "",
|
"folderOwner": "orchestrator",
|
||||||
"group": "${init.output.result.decoded_context}"
|
"group": "${init.output.result.shubified_context_name}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "SIMPLE",
|
"type": "SIMPLE",
|
||||||
|
|
Loading…
Reference in New Issue