diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SRCR/SRCRWorkflow.bpmn b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SRCR/SRCRWorkflow.bpmn index 2a64bed9..0520258c 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SRCR/SRCRWorkflow.bpmn +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-bpm/processes/SRCR/SRCRWorkflow.bpmn @@ -1,5 +1,5 @@ - + @@ -8,7 +8,6 @@ Activity_08fgjgt Gateway_132oe4w - Gateway_1epcelq Gateway_1kotdsu @@ -19,7 +18,6 @@ Activity_06nypz0 Gateway_1osruh3 - Gateway_05aj26w Gateway_1nljcfc @@ -75,10 +73,33 @@ var ownerEmail = execution.getVariable('owneremail'); system.out.println ("ownerEmail "+ownerEmail); execution.setVariable('ownerEmail',ownerEmail); -var emailsToArray = []; -emailsToArray.push(agentEmail); -execution.setVariable("emailTo", Java.to(emailsToArray, "java.lang.Object[]")); -system.out.println ("emailTo"+execution.getVariable('emailTo')); + +system.out.println("dataGrid simple"+ dataGridone); +system.out.println("dataGrid exe"+ execution.getVariable('dataGridone')); + +var dataGridObject = null; + +dataGridObject = JSON.parse(dataGridone); + + +var listOwnerEmailAddress = []; + +for(i in dataGridObject) +{ + if(dataGridObject[i] !== null && dataGridObject[i] != undefined ) + { + var ownerEmailAddress = dataGridObject[i].simpleemail; + if(ownerEmailAddress !== '') + { + listOwnerEmailAddress.push(ownerEmailAddress) + } + } +} + +if(listOwnerEmailAddress.length > 0) +{ + execution.setVariable("emailTo", Java.to(listOwnerEmailAddress, "java.lang.Object[]")); +} execution.setVariable('name','User'); @@ -94,7 +115,12 @@ if (triggers == 'ministryServiceApplicationWithTheRecommendationOfAnApprovedProf execution.setVariable('isSentFromSociety',true); } else { execution.setVariable('isSentFromSociety',false); -} +} + + +execution.setVariable('EmailType','nom'); + +execution.setVariable('formName','Site Risk Classification Report'); Flow_0xiuxfc @@ -127,7 +153,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); - +task.execution.setVariable('userRole','CSAP'); @@ -142,15 +168,10 @@ execution.setVariable('isSdm',false); Flow_159m7j9 - Flow_0lds37b + Flow_159m7j9 Flow_0iim75v Flow_0glptri - - Flow_159m7j9 - Flow_0lds37b - Flow_1js7p0u - @@ -159,7 +180,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); - +task.execution.setVariable('userRole','CSAP Society'); @@ -174,16 +195,11 @@ execution.setVariable('isSdm',false); Flow_1pghhuh - Flow_1vlzzd5 + Flow_1pghhuh Flow_11adl9o Flow_0y1l5de Flow_0err7mx - - Flow_1pghhuh - Flow_1vlzzd5 - Flow_10q9o6e - Flow_13r7dqy Flow_1igr7br @@ -199,7 +215,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); - +task.execution.setVariable('userRole','CSSA Team'); @@ -227,8 +243,6 @@ execution.setVariable('isSdm',false); srcr_updated - Flow_1js7p0u - Flow_10q9o6e Flow_1d8a6i9 Flow_1s9sm8u Flow_1gnzs70 @@ -357,8 +371,7 @@ execution.setVariable('isSrco',false); ${action == 'Recheck'} - - + @@ -375,12 +388,10 @@ execution.setVariable('isSdm',false); ${action == 'Accepted'} - ${action == 'Recheck'} - - + @@ -397,7 +408,6 @@ execution.setVariable('isSdm',false); ${action == 'Accepted'} - @@ -493,7 +503,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); - +task.execution.setVariable('userRole','Statutory Decision Maker'); @@ -552,7 +562,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); - +task.execution.setVariable('userRole','Case Worker'); @@ -598,6 +608,7 @@ execution.setVariable('isSdm',false); task.execution.setVariable('applicationStatus', task.execution.getVariable('action')); +task.execution.setVariable('userRole','Site Risk Classification Officer'); @@ -699,6 +710,20 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); + + + + + + + + + + + + + + @@ -713,288 +738,286 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + - + - - - + + + + + + + + + + + + - + - - - - - - - - - - + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + + - + - - - - - - + + + + + + + + + + + - + - - - - - - - - - - - - - - - - + + + + + + - + - - - + + + + + - + - - - - - - - - - - - - - - + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - + + + + + - + - - - + + + - + - - - - - - - - - + + + - + - - - - - - - - + + + - - - - + + + - + - - - - - + + + + - + - - - + + + + + + + + + - + - - - + + + - + - - - - - + + + + - + - - - + + + - - - + + + + + + + + - - - + + + - + - - - - - + + - + - - + + @@ -1002,305 +1025,269 @@ system.out.println ("srcoAssignment"+execution.getVariable('srcoAssignment')); - + - - + + - + - - - - - - - - - - - + - + - - - + + + - - - + + + - - - - - - - + + + - - - + + + + + - + - - - - - - - - - - + + + - + - - - - - - - - - - - - + + + - + - - - + + + + + - + - - - - + + + + + + + - - - + + + + + + + + - - - + + + - + - - - + + + + + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - - - - - - - + + - + - - - - - + + + + + + + - + - - - - - - + + + - + - - - - - - + + + + + + + + + + - + - - - - - - - - - - + + + + + + + - + - - - - - - + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + + + - + - - - - - - + + + - + - - - - - - - - - - - - - + + + + + + - + - - - - + + + + + + + + + + - + - - - - - - - - - - - - + + + - + - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +