Skip to content

Commit c4a849f

Browse files
authored
Updated SDS workflow to send bcbox emails to approving authority (#1059)
1 parent 7402b23 commit c4a849f

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SDS/SDSWorkflow.bpmn

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@
4242
<bpmn:script>var system = java.lang.System;
4343
var clientEmail= execution.getVariable('contactPersonEmailAddress');
4444
execution.setVariable('clientEmail',clientEmail);
45+
var aaEmail= execution.getVariable('approvingAuthorityEmailAddress');
4546
var emailsToArray = [];
46-
emailsToArray.push(clientEmail)
47+
emailsToArray.push(clientEmail);
48+
49+
4750
execution.setVariable('emailTo',JSON.stringify(emailsToArray));
4851
var siteOwnerEmail = execution.getVariable('ownerEmailAddress');
4952
execution.setVariable('siteOwnerEmail',siteOwnerEmail);
@@ -74,13 +77,20 @@ var emailsIdsToProcess = [];
7477
emailsIdsToProcess.push(clientEmail);
7578

7679
emailsIdsToProcess.push(siteOwnerEmail);
80+
81+
var section5DeclarationSectionLocalGovernmentPermits = execution.getVariable('section5DeclarationSectionLocalGovernmentPermits');
82+
if(section5DeclarationSectionLocalGovernmentPermits === true || section5DeclarationSectionLocalGovernmentPermits === "true")
83+
{
84+
emailsIdsToProcess.push(aaEmail);
85+
}
86+
7787
execution.setVariable('emailsIdsToProcess',JSON.stringify(emailsIdsToProcess));
7888

7989
var emailsIdsToProcessForSO = [];
8090
emailsIdsToProcessForSO.push(siteOwnerEmail);
8191
execution.setVariable('emailsIdsToProcessSO',JSON.stringify(emailsIdsToProcessForSO));
8292

83-
var aaEmail= execution.getVariable('approvingAuthorityEmailAddress');
93+
8494
var emailsIdsToProcessForTaskAssignmentArr = [];
8595

8696
emailsIdsToProcessForTaskAssignmentArr.push(aaEmail);
@@ -489,6 +499,10 @@ execution.setVariable('siteAddress',siteAddress);
489499
<dc:Bounds x="190" y="90" width="980" height="410" />
490500
<bpmndi:BPMNLabel />
491501
</bpmndi:BPMNShape>
502+
<bpmndi:BPMNEdge id="Flow_1qps1ys_di" bpmnElement="Flow_1qps1ys">
503+
<di:waypoint x="378" y="700" />
504+
<di:waypoint x="520" y="700" />
505+
</bpmndi:BPMNEdge>
492506
<bpmndi:BPMNEdge id="Flow_0r4070a_di" bpmnElement="Flow_0r4070a">
493507
<di:waypoint x="480" y="590" />
494508
<di:waypoint x="410" y="590" />
@@ -632,10 +646,6 @@ execution.setVariable('siteAddress',siteAddress);
632646
<dc:Bounds x="527" y="441" width="18" height="14" />
633647
</bpmndi:BPMNLabel>
634648
</bpmndi:BPMNEdge>
635-
<bpmndi:BPMNEdge id="Flow_1qps1ys_di" bpmnElement="Flow_1qps1ys">
636-
<di:waypoint x="378" y="700" />
637-
<di:waypoint x="520" y="700" />
638-
</bpmndi:BPMNEdge>
639649
<bpmndi:BPMNShape id="BPMNShape_0zk5qh7" bpmnElement="Activity_1ozfgid">
640650
<dc:Bounds x="303" y="222" width="100" height="80" />
641651
<bpmndi:BPMNLabel />

0 commit comments

Comments
 (0)