{ "createTime": 1689260185434, "updateTime": 1689259167761, "name": "create_vre_folder_for_context", "description": "Upon creation of a new context, create also a vre folder on the workspace", "version": 1, "tasks": [ { "name": "LAMBDA_TASK", "taskReferenceName": "init", "inputParameters": { "base_url": "https://url.gcube.d4science.org/", "keycloak": "{{ keycloak }}/{{ keycloak_realm }}", "keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}", "storagehub" : "{{ storagehub }}" "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', '/') }" }, "type": "LAMBDA", "decisionCases": {}, "defaultCase": [], "forkTasks": [], "startDelay": 0, "joinOn": [], "optional": false, "defaultExclusiveJoinTask": [], "asyncComplete": false, "loopOver": [] }, { "name": "pyrest", "taskReferenceName": "authorize", "inputParameters": { "url": "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token", "method": "POST", "headers": { "Accept": "application/json" }, "body": { "client_id": "orchestrator", "client_secret": "{{ keycloak_auth }}", "grant_type": "client_credentials" } }, "type": "SIMPLE", "decisionCases": {}, "defaultCase": [], "forkTasks": [], "startDelay": 0, "joinOn": [], "optional": false, "defaultExclusiveJoinTask": [], "asyncComplete": false, "loopOver": [] }, { "name": "pyrest", "taskReferenceName": "create_vre_folder", "inputParameters": { "url": "https://en5ql62qrka7q.x.pipedream.net/${init.output.result.child}", "method": "POST", "headers": { "Authorization": "Bearer bearer_here", "Accept": "application/json", "Content-Type": "multipart/form-data" }, "body": { "accessType": "WRITE_ALL", "folderOwner": "", "group": "${init.output.result.decoded_context}" } }, "type": "SIMPLE", "decisionCases": {}, "defaultCase": [], "forkTasks": [], "startDelay": 0, "joinOn": [], "optional": false, "defaultExclusiveJoinTask": [], "asyncComplete": false, "loopOver": [] } ], "inputParameters": [ "context" ], "outputParameters": {}, "schemaVersion": 2, "restartable": true, "workflowStatusListenerEnabled": false, "ownerEmail": "example@email.com", "timeoutPolicy": "ALERT_ONLY", "timeoutSeconds": 0, "variables": {}, "inputTemplate": {} }