Skip to content

Commit

Permalink
handle arrays in email
Browse files Browse the repository at this point in the history
  • Loading branch information
jaise-aot committed Sep 28, 2023
1 parent c93f1d9 commit ce853e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ system.out.println ("name: "+name);</bpmn:script>
"from": "[email protected]",
"priority": "normal",
"subject": execution.getVariable("subject"),
"to": [],
"to": execution.getVariable("emailTo"),
"tag": "",
"attachments": []
}
p.to.push(execution.getVariable("emailTo"))

console.log("Payload")
console.log(JSON.stringify(p))
JSON.stringify(p)</camunda:script>
Expand Down Expand Up @@ -149,27 +149,27 @@ system.out.println ("result: "+result);</bpmn:script>
<bpmndi:BPMNShape id="BPMNShape_1hi0nx6" bpmnElement="Activity_0nm63gf">
<dc:Bounds x="240" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_13xdoy5_di" bpmnElement="Activity_1cy9bql">
<dc:Bounds x="930" y="80" width="100" height="80" />
<bpmndi:BPMNLabel />
<bpmndi:BPMNShape id="Activity_1ynm6j6_di" bpmnElement="Activity_04ks0sg">
<dc:Bounds x="370" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0pegmhv_di" bpmnElement="Activity_1w8sq4d">
<dc:Bounds x="780" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1jy96yb_di" bpmnElement="Event_1jy96yb">
<dc:Bounds x="1072" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1082" y="145" width="20" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0pegmhv_di" bpmnElement="Activity_1w8sq4d">
<dc:Bounds x="780" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1l8slzj_di" bpmnElement="Task_1q29nrc">
<dc:Bounds x="640" y="80" width="100" height="80" />
<bpmndi:BPMNShape id="Activity_13xdoy5_di" bpmnElement="Activity_1cy9bql">
<dc:Bounds x="930" y="80" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BusinessRuleTask_02kbmdk_di" bpmnElement="BusinessRuleTask_02kbmdk">
<dc:Bounds x="510" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ynm6j6_di" bpmnElement="Activity_04ks0sg">
<dc:Bounds x="370" y="80" width="100" height="80" />
<bpmndi:BPMNShape id="ScriptTask_1l8slzj_di" bpmnElement="Task_1q29nrc">
<dc:Bounds x="640" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0cog7s9_di" bpmnElement="Flow_0cog7s9">
<di:waypoint x="340" y="120" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
<bpmn:script>var system = java.lang.System;
system.out.println ("simpleemail"+execution.getVariable('simpleemail'));
var clientEmail = execution.getVariable('simpleemail');
execution.setVariable('emailTo',clientEmail);
var emailsToArray = [];
emailsToArray.push(clientEmail)
execution.setVariable("emailTo", Java.to(emailsToArray, "java.lang.Object[]"));
system.out.println ("emailTo"+execution.getVariable('emailTo'));
system.out.println ("firstname "+execution.getVariable('s1-firstname'));
var firstname=execution.getVariable('s1-firstname');
Expand All @@ -70,7 +72,7 @@ execution.setVariable('name',firstname);
<bpmn:outgoing>Flow_1la2yud</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Activity_06nypz0" name="Review SIR Form" camunda:candidateGroups="formsflow/formsflow-reviewer/site-information-advisor">
<bpmn:extensionElements>
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="action" label="Action" type="string" />
</camunda:formData>
Expand Down

0 comments on commit ce853e1

Please sign in to comment.