diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Bundling/subProcess/NOMBundleWorkflow.bpmn b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Bundling/subProcess/NOMBundleWorkflow.bpmn index e5f2cfcf..3e0018b0 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Bundling/subProcess/NOMBundleWorkflow.bpmn +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Bundling/subProcess/NOMBundleWorkflow.bpmn @@ -17,7 +17,6 @@ Activity_06nypz0 - Event_0ml6v2t Gateway_1pd38qv Activity_0ro66yt Gateway_0nd8s9d @@ -29,6 +28,7 @@ Gateway_15uoiyo Activity_123733v Activity_0hieobd + Event_0ml6v2t @@ -48,9 +48,18 @@ execution.setVariable('name','Test'); system.out.println ("emailTo "+execution.getVariable('emailTo')); system.out.println ("name "+execution.getVariable('name')); -system.out.println("dataGrid length"+ dataGrid.length); +system.out.println("dataGrid simple"+ dataGrid); +system.out.println("dataGrid exe"+ execution.getVariable('dataGrid')); + +system.out.println ("emailsToArray before "+execution.getVariable('emailsToArray')); + +var dataGridObject = null; + +dataGridObject = JSON.parse(dataGrid); + + var listOwnerEmailAddress = []; -var dataGridObject = JSON.parse(dataGrid); + for(i in dataGridObject) { if(dataGridObject[i] !== null && dataGridObject[i] != undefined ) @@ -64,21 +73,22 @@ for(i in dataGridObject) } if(listOwnerEmailAddress.length > 0) -{ - execution.setVariable('emailsToArray',JSON.stringify(listOwnerEmailAddress)); +{ + execution.setVariable("emailTo", Java.to(listOwnerEmailAddress, "java.lang.Object[]")); } execution.setVariable('EmailType','nom'); -system.out.println ("emailsToArray "+execution.getVariable('emailsToArray')); - +system.out.println ("emailsToArray after "+execution.getVariable('emailsToArray')); +execution.setVariable('formName','Notification of Likely or Actual Migration'); - task.execution.setVariable('isCssaTeam',false); + task.execution.setVariable('isCssaTeam',false); +task.execution.setVariable('userRole','Site Information Advisor'); @@ -97,9 +107,6 @@ task.execution.setVariable('deleteReason', "completed"); Flow_1oam11w Flow_0l71ern - - Flow_0x0w3ip - @@ -227,7 +234,8 @@ system.out.println ("Sent to Caseworker"); task.execution.setVariable('task_id',task.getId()); -task.execution.setVariableLocal('variable1',"srcr"); +task.execution.setVariableLocal('variable1',"srcr"); +task.execution.setVariable('userRole','Case Worker'); task.execution.setVariable('requestStatus', task.execution.getVariable('action')); @@ -269,7 +277,9 @@ system.out.println ("Sent to SDM"); - task.execution.setVariable('task_id',task.getId()); + task.execution.setVariable('task_id',task.getId()); +task.execution.setVariable('userRole','Statutory Decision Maker'); + task.execution.setVariable('requestStatus', task.execution.getVariable('action')); @@ -353,7 +363,8 @@ system.out.println ("isSentFromSociety "+execution.getVariable('isSentFromSociet task.execution.setVariable('task_id',task.getId()); -task.execution.setVariableLocal('variable1',"srcr"); +task.execution.setVariableLocal('variable1',"srcr"); +task.execution.setVariable('userRole','Site Risk Classification Officer'); task.execution.setVariable('requestStatus', task.execution.getVariable('action')); @@ -656,7 +667,7 @@ execution.setVariable('requestType', 'SRCR'); Flow_04l5mhw Flow_00msr8t - + Flow_00msr8t Flow_10qa12g var system = java.lang.System; @@ -731,6 +742,9 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); + + Flow_0x0w3ip + @@ -752,6 +766,47 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -787,15 +842,9 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - - - - - - + @@ -828,43 +877,6 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -879,59 +891,25 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - - - - - + + + + + + - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1076,11 +1054,11 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - + + - + @@ -1218,11 +1196,46 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/CommonEmailWorkflow.bpmn b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/CommonEmailWorkflow.bpmn index a4baee00..0ba457da 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/CommonEmailWorkflow.bpmn +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/CommonEmailWorkflow.bpmn @@ -68,28 +68,11 @@ system.out.println ("name: "+name); "from": "NOREPLYEPD@gov.bc.ca", "priority": "normal", "subject": execution.getVariable("subject"), - "to": [], + "to": execution.getVariable("emailTo"), "tag": "", "attachments": [] } -if(applicationType==="nom") -{ - console.log("nom emails",toEmailListArray); - console.log("nom emails type",typeof toEmailListArray); - var toEmailListArrayObj = JSON.parse(toEmailListArray); - console.log("toEmailListArrayObj",toEmailListArrayObj); - for(i in toEmailListArrayObj) - { - p.to.push(toEmailListArrayObj[i]); - } -} -else -{ - p.to.push(execution.getVariable("emailTo")) -} - - console.log("Payload") console.log(JSON.stringify(p)) JSON.stringify(p) diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/email-template.dmn b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/email-template.dmn index 47bb2c94..ce8a40d6 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/email-template.dmn +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/Common/email-template.dmn @@ -92,6 +92,32 @@ "epd-support@gov.bc.ca" + + + "dera_updated" + + + + + + "NOREPLYEPD@gov.bc.ca" + + + + + + + + + "Detailed Ecological Risk Assessment Checklist" + + + "templates/nom_application.ftl" + + + "epd-support@gov.bc.ca" + + diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/templates/nom_application.ftl b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/templates/nom_application.ftl new file mode 100644 index 00000000..f2dc0edb --- /dev/null +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/templates/nom_application.ftl @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + +
+ + + Site Remediation System +
+ + + + + + + + + + + + + + + + + + + +
+
+
+

+ Notification of Likely or Actual Migration. +

+
+

+ Hello ${name}, +

+

+ Your Notification of Likely or Actual Migration application has been updated. Current status is ${action}. +

+
+

+ If you need any help, don’t hesitate to reach out to us at ${support} +

+
+
+
+ +

EPD will never send an email that asks you to provide, confirm or verify personal, log on or account information. + DO NOT reply to this email as it was sent from an unmonitored account. +

+
+ + \ No newline at end of file