fixing workflow

This commit is contained in:
dcore94 2021-09-17 15:12:32 +02:00
parent b8f6e018dd
commit 66c0e3ac68
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
"workspace" : "{{ workspace }}", "workspace" : "{{ workspace }}",
"auth" : "Bearer ${workflow.input.token}", "auth" : "Bearer ${workflow.input.token}",
"parentfolder" : "Blue-Cloud Data Downloads", "parentfolder" : "Blue-Cloud Data Downloads",
"folder" : "${workflow.input.descriptor.userOrderName}-${workflow.input.descriptor.order_number}", "folder" : "${workflow.input.descriptor.userOrderName}-${workflow.input.descriptor.orderNumber}",
"scriptExpression": "1 === 1" "scriptExpression": "1 === 1"
} }
}, },
@ -172,7 +172,7 @@
"inputParameters": { "inputParameters": {
"input" : "${workflow.input.descriptor}", "input" : "${workflow.input.descriptor}",
"output" : "${join_parallel_downloads.output}", "output" : "${join_parallel_downloads.output}",
"scriptExpression": "var k,report={requestid:$.input.request_id,order_number:$.input.order_number,errors:[]},keys=[],errors=[];for(var k in $.output) keys.push(k);keys.sort();for(k in keys){var index=keys[k].split('_')[1],o=$.output[keys[k]];o.endpoint1.error&&errors.push({url:$.input.downloads[index].url,number:index,error_number:1002,error_message:o.endpoint1.error}),o.endpoint2.error&&errors.push({url:$.input.descriptor.downloads[index].url,number:index,error_number:9999,error_message:o.endpoint2.error})};report['errors']=Java.to(errors,'java.util.Map[]');return {report:report}" "scriptExpression": "var k,report={requestid:$.input.requestId,orderNumber:$.input.orderNumber,errors:[]},keys=[],errors=[];for(var k in $.output) keys.push(k);keys.sort();for(k in keys){var index=keys[k].split('_')[1],o=$.output[keys[k]];o.endpoint1.error&&errors.push({url:$.input.downloads[index].url,number:index,error_number:1002,error_message:o.endpoint1.error}),o.endpoint2.error&&errors.push({url:$.input.descriptor.downloads[index].url,number:index,error_number:9999,error_message:o.endpoint2.error})};report['errors']=Java.to(errors,'java.util.Map[]');return {report:report}"
} }
}, },
{ {
@ -211,9 +211,9 @@
"html" : "<html><body><p>Dear user,</p> <p>your request with id <b>{v1}</b> related to order <b>{v2}</b> number <b>{v3}</b> has completed with the following outcome:</p><br/> {v4} <br/><p>You can access your data through the D4Science <a href='{v5}'>workspace</a> in the folder {v6}</p><br/><br/><p style='font-size:small;color:gray'>WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.</p></body></html>", "html" : "<html><body><p>Dear user,</p> <p>your request with id <b>{v1}</b> related to order <b>{v2}</b> number <b>{v3}</b> has completed with the following outcome:</p><br/> {v4} <br/><p>You can access your data through the D4Science <a href='{v5}'>workspace</a> in the folder {v6}</p><br/><br/><p style='font-size:small;color:gray'>WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.</p></body></html>",
"subject" : "Outcome of Bluecloud DA cache download {v1}", "subject" : "Outcome of Bluecloud DA cache download {v1}",
"extra_vars":{ "extra_vars":{
"v1" : "${workflow.input.descriptor.request_id}", "v1" : "${workflow.input.descriptor.requestId}",
"v2" : "${workflow.input.descriptor.userOrderName}", "v2" : "${workflow.input.descriptor.userOrderName}",
"v3" : "${workflow.input.descriptor.order_number}", "v3" : "${workflow.input.descriptor.orderNumber}",
"v4" : "${build_email_report.output.result.report}", "v4" : "${build_email_report.output.result.report}",
"v5" : "${init.input.workspace}", "v5" : "${init.input.workspace}",
"v6" : "${init.input.parentfolder}" "v6" : "${init.input.parentfolder}"