Skip to content

Commit

Permalink
email integration in nir workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaise-aot committed Sep 29, 2023
1 parent ce853e1 commit dbdd133
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
<bpmn:outgoing>Flow_0unffch</bpmn:outgoing>
<bpmn:script>var system = java.lang.System;
var clientEmail = execution.getVariable('simpleemail3');
execution.setVariable('clientEmail',clientEmail);
var emailsToArray = [];
emailsToArray.push(clientEmail)
execution.setVariable("emailTo", Java.to(emailsToArray, "java.lang.Object[]"));
var riskclassification = execution.getVariable('riskclassification');
system.out.println ("formUrl "+execution.getVariable('formUrl'));
var siteRiskClassification = execution.getVariable('siteRiskClassification');
system.out.println ("siteRiskClassification "+siteRiskClassification );
execution.setVariable('siteRiskClassification',siteRiskClassification);
</bpmn:script>
var name=execution.getVariable('nirName');
system.out.println ("name "+execution.getVariable('nirName'));
execution.setVariable('name',name); </bpmn:script>
</bpmn:scriptTask>
<bpmn:receiveTask id="Task_05ulff4" name="Application Resubmitted" messageRef="Message_1ngb2eg">
<bpmn:extensionElements>
Expand Down Expand Up @@ -111,6 +115,9 @@ task.execution.setVariable('deleteReason', "completed");</camunda:script>
<bpmn:callActivity id="Activity_1os7sys" name="Send Email" calledElement="common-email-workflow">
<bpmn:extensionElements>
<camunda:in variables="all" />
<camunda:inputOutput>
<camunda:inputParameter name="category">nir_updated</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0bwxoom</bpmn:incoming>
<bpmn:outgoing>Flow_0x0w3ip</bpmn:outgoing>
Expand All @@ -121,6 +128,9 @@ task.execution.setVariable('deleteReason', "completed");</camunda:script>
<bpmn:callActivity id="Activity_1gjzpac" name="Send Decision Email" calledElement="common-email-workflow">
<bpmn:extensionElements>
<camunda:in variables="all" />
<camunda:inputOutput>
<camunda:inputParameter name="category">nir_updated</camunda:inputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ixmsle</bpmn:incoming>
<bpmn:outgoing>Flow_1cgcuxz</bpmn:outgoing>
Expand Down Expand Up @@ -573,7 +583,7 @@ execution.setVariable("applicationStatus", "Rejected");
</bpmn:extensionElements>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1cgcuxz" sourceRef="Activity_1gjzpac" targetRef="Event_01t23k0" />
<bpmn:sequenceFlow id="Flow_1g1b94u" sourceRef="Activity_06nypz0" targetRef="Activity_1n3rj1g">
<bpmn:sequenceFlow id="Flow_1g1b94u" name="Rejected" sourceRef="Activity_06nypz0" targetRef="Activity_1n3rj1g">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${action == 'Rejected' }</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
Expand Down Expand Up @@ -967,6 +977,9 @@ execution.setVariable("applicationStatus", "Rejected");
<di:waypoint x="411" y="420" />
<di:waypoint x="861" y="420" />
<di:waypoint x="861" y="670" />
<bpmndi:BPMNLabel>
<dc:Bounds x="614" y="402" width="44" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,58 @@
<text>"[email protected]"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_0ygn6ai">
<inputEntry id="UnaryTests_1hzb1kb">
<text>"nom_updated"</text>
</inputEntry>
<outputEntry id="LiteralExpression_0cbmy7o">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_1pxf60n">
<text>"[email protected]"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0mxfr8j">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_1l7jv5i">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0tovgsb">
<text>"Notification of Likely or Actual Migration Application Status Update"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0la9u3x">
<text>"templates/nom_application.ftl"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1l601us">
<text>"[email protected]"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_1vzpiut">
<inputEntry id="UnaryTests_1owiayt">
<text>"nir_updated"</text>
</inputEntry>
<outputEntry id="LiteralExpression_1ne3kdr">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_1m84wj0">
<text>"[email protected]"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1otdreo">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0nj6yjz">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0ol8a8s">
<text>"Notification of Independent Remediation Application Status Update"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1ndgbup">
<text>"templates/nir_application.ftl"</text>
</outputEntry>
<outputEntry id="LiteralExpression_0fm9kmi">
<text>"[email protected]"</text>
</outputEntry>
</rule>
</decisionTable>
</decision>
<dmndi:DMNDI>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html style="margin: 0;padding: 0;box-sizing: border-box;border: none;">

<head style="margin: 0;padding: 0;box-sizing: border-box;border: none;">
<meta charset="utf-8" style="margin: 0;padding: 0;box-sizing: border-box;border: none;">
<meta http-equiv="X-UA-Compatible" content="IE=edge" style="margin: 0;padding: 0;box-sizing: border-box;border: none;">
<meta name="viewport" content="width=device-width, initial-scale=1.0" style="margin: 0;padding: 0;box-sizing: border-box;border: none;">

</head>

<body style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;color: #313132;">
<table style="width: 580px;">
<tr>
<td style="width: 151px;">
<img style="width: 151px;" src="https://taft.fin.gov.bc.ca/img/BCID_H_rgb_pos_150.png">
</td>
<td>
<span id="nir_notification" style="overflow: visible;line-height: 30px;text-align: left;font-style: normal;font-weight: bold;font-size: 20px;color: rgba(0, 51, 102, 1);letter-spacing: -0.2px;vertical-align: middle;">Site Remediation Services</span>
</td>
</tr>
</table>
<table style="width: 580px;">
<tr>
<td>
<hr color="#DBDCDC" size="1px">
</td>
</tr>
<tr>
<td>
<p class="info" style="margin-top: 24px;margin-bottom: 0;overflow: visible;line-height:27px;text-align: left;font-style: normal;font-weight: bold;font-size: 20px;color: #313132;letter-spacing: 0px;">
Notification of Independent Remediation.
</p>
</td>
</tr>
<tr>
<td>
<p class="info" style="margin-top: 24px;margin-bottom: 0;overflow: visible;line-height: 24px;text-align: left;font-style: normal;font-weight: normal;font-size: 16px;color: #313132;letter-spacing: 0px;">
Dear ${name},
</p>
<p class="info" style="margin-top: 24px;margin-bottom: 0;overflow: visible;line-height: 24px;text-align: left;font-style: normal;font-weight: normal;font-size: 16px;color: #313132;letter-spacing: 0px;">
Your Notification of Independent Remediation application has been updated. Current status is ${action}.
</p>
</td>
</tr>
<tr>
<td>
<p class="info" style="margin-top: 24px;margin-bottom: 0;overflow: visible;line-height: 24px;text-align: left;font-style: normal;font-weight: normal;font-size: 16px;color: #313132;letter-spacing: 0px;">
<span>If you need any help, don’t hesitate to reach out to us at <a class="link" href="mailto:${support}" style="overflow: visible;line-height: 24px;text-align: left;overflow-wrap: break-word;word-wrap: break-word;font-style: normal;font-weight: normal;font-size: 16px;color: #1A5A96;text-decoration: underline;">${support}</a></span>
</p>
</td>
</tr>
<tr>
<td style="padding-top: 24px;">
<hr color="#DBDCDC" size="1px">
</td>
</tr>
<tr>
<td>
<p class="footer">Have questions or need help? Please email us at:
<a class="footer_link" href="mailto:${support}">${support}</a>
</p>
<p> BC Public Services 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.
</p>
</td>
</tr>
</table>
</body>
</html>

0 comments on commit dbdd133

Please sign in to comment.