### Start Notification Sender Program.cs Execution ###


### Calling ConfigureService.Configure() function ###


### Start Event Execution ###


Message : {"EventName":"INFORM_TO_INCIDENT_CREATION_NOTIFICATION","EventArgs":[{"Key":"IncidentId","Value":71929},{"Key":"InformToUserId","Value":5532}]}


### Started process for Execution of Event : INFORM_TO_INCIDENT_CREATION_NOTIFICATION ###


### Started processing Inform-To Incident Creation Notification ###


Calling SendInformToNotification function for ticket creation


Sending Inform-To WhatsApp for IncidentId: 71929


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000008275","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_ticket_inform_to_template_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Lesia Hardman"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"T/FBYDW/NMM/26/00001"},{"type":"text","text":"11"},{"type":"text","text":"Colver"},{"type":"text","text":"Near Misses"},{"type":"text","text":"Hebert Eaton"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Open"},{"type":"text","text":"https://oqsha.com/#/incidents/view/248/71929?dlType=viewTicket"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Osmo-x WhatsApp Message has been Sent


Generating Safety Alert report.


## Safety Alert Email Sent to Lesia Hardman##


Sending Inform-To Email (with Safety Alert PDF) for IncidentId: 71929


*--- Sending Email Serice Initiated ---*


Reading and binding data to Email Template


Initializing Email Service Client


Generating Email Request


Safety Alert T/FBYDW/NMM/26/00001 has been created

This is a test mode notification. Notification was not delivered to recipient.


--- Email created using Osmo-x ---


--- Email response from Osmo-x is 201


### Ended processing Inform-To Incident Creation Notification ###


### End Event Execution ###


### Start Event Execution ###


Message : {"EventName":"INFORM_TO_INCIDENT_CREATION_NOTIFICATION","EventArgs":[{"Key":"IncidentId","Value":71930},{"Key":"InformToUserId","Value":5532}]}


Sending Inform-To WhatsApp for IncidentId: 71930


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000008275","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_ticket_inform_to_template_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Lesia Hardman"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"T/FBYDW/NMM/26/00002"},{"type":"text","text":"22"},{"type":"text","text":"Colver"},{"type":"text","text":"Near Misses"},{"type":"text","text":"Hebert Eaton"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Open"},{"type":"text","text":"https://oqsha.com/#/incidents/view/248/71930?dlType=viewTicket"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Osmo-x WhatsApp Message has been Sent


Generating Safety Alert report.


Sending Inform-To Email (with Safety Alert PDF) for IncidentId: 71930


Safety Alert T/FBYDW/NMM/26/00002 has been created


Message : {"EventName":"INFORM_TO_INCIDENT_CREATION_NOTIFICATION","EventArgs":[{"Key":"IncidentId","Value":71931},{"Key":"InformToUserId","Value":5532}]}


Sending Inform-To WhatsApp for IncidentId: 71931


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000008275","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_ticket_inform_to_template_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Lesia Hardman"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"T/FBYDW/HSS/26/00001"},{"type":"text","text":" "},{"type":"text","text":"Colver"},{"type":"text","text":"HSE Suggestion"},{"type":"text","text":"Ade Goodrich"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Open"},{"type":"text","text":"https://oqsha.com/#/incidents/view/248/71931?dlType=viewTicket"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Sending Inform-To Email (with Safety Alert PDF) for IncidentId: 71931


Initializing Email Service Client


Generating Email Request


Safety Alert T/FBYDW/HSS/26/00001 has been created


--- Email created using Osmo-x ---


--- Email response from Osmo-x is 201


### End Event Execution ###


### Start Event Execution ###


### Started process for Execution of Event : NOTIFICATION_TO_TASK_ASSIGNEES ###


# Calling SendNotificationToTaskAssignees function for WhatsApp notification #


Sending WhatsApp notification for task assignment to user ID: 11237


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000010599","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_task_assigned_to_notification_v4","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Ade Goodrich"},{"type":"text","text":"Action Tracker"},{"type":"text","text":"AT/FBYDW/ROO/TTT/26/00001"},{"type":"text","text":"Trolley Fire extinguisher ke aage laga hua hai"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"https://oqsha.com/#/tasks/edit/12561?dlType=viewTask&orgID=248"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Message : {"EventName":"ASSIGNED_TO_NOTIFICATION","EventArgs":[{"Key":"AssignedIncidentID","Value":71901},{"Key":"AssignedToID","Value":11237}]}


### Started process for Execution of Event : ASSIGNED_TO_NOTIFICATION ###


### Started processing Assigned to Notification Event ###


# Calling SendNotificationToAssignedId function for all types of assigned to notification #


Osmo-x WhatsApp Message has been Sent


Generating report.


PDF generation successfull


Stopped Assigned To SMS as Org Level setting is set to false


# Preparing notification body #


### Ended processing Assigned to Notification Event ###


Message : {"EventName":"UPDATE_INCIDENT_NOTIFICATION","EventArgs":[{"Key":"IncidentId","Value":71901},{"Key":"IncidentHistoryId","Value":89248},{"Key":"IsTicketAssigned","Value":true}]}


### Started process for Execution of Event : UPDATE_INCIDENT_NOTIFICATION ###


### Started processing for Update incident Event ###


# Calling  SendNotification function for  all types of notification #


Sending Assigned To Whatsapp for IncidentId:71901


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000009689","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_ticket_update_whatsapp_template_v4","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Brielle Duffey"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"5IVSAL"},{"type":"text","text":"Safety Alert status updated to Assigned"},{"type":"text","text":"Safety Alert"},{"type":"text","text":"Trolley Fire extinguisher ke aage laga hua hai"},{"type":"text","text":"Colver"},{"type":"text","text":"Unsafe Act"},{"type":"text","text":"Brielle Duffey"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Assigned"},{"type":"text","text":"https://oqsha.com/#/incidents/view/248/71901?dlType=viewTicket"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


# Checking for device existence #


# User device exists #


Sending Assigned To Notification for IncidentId:71901


Inside SendAppNotification Device Type: GCM


Generating AWS SNS Request


Endpoint: arn:aws:sns:ap-south-1:637423593880:endpoint/GCM/Oqsha-Android-Production/d89694f2-eebf-3129-af50-c7802322e7e3


Unauthorized


--- AWS SNS Push Notification created using Osmo-x ---


--- Push notification response from Osmo-x is Unauthorized


Push notification failed to send to a device 14631.


# Push notification did not send #


### Ended processing Update incident Event ###


### End Event Execution ###


### Start Notification Sender Program.cs Execution ###


### Calling ConfigureService.Configure() function ###


### Start Event Execution ###


### Started process for Execution of Event : NOTIFICATION_TO_TASK_ASSIGNEES ###


# Calling SendNotificationToTaskAssignees function for WhatsApp notification #


Sending WhatsApp notification for task assignment to user ID: 267


Osmo-x WhatsApp Message has been Sent


Sending Task Assignment Email for TaskId: 12563, UserId: 267


*--- Sending Email Serice Initiated ---*


Reading and binding data to Email Template


Initializing Email Service Client


Generating Email Request


New Task Assigned - AT/SAIL/OFF/III/26/00006


--- Email created using Osmo-x ---


--- Email response from Osmo-x is 201


Sending WhatsApp notification for task assignment to user ID: 7631


Sending Task Assignment Email for TaskId: 12563, UserId: 7631


### End Event Execution ###


### Started process for Execution of Event : ADD_USER ###


### Started Event for Add User Email ###


Calling Send Email Function for Add User Email


Welcome to OQSHA


### Start Event Execution ###


Message : {"EventName":"NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1934"},{"Key":"ApproverIds","Value":"[6717]"},{"Key":"SiteName","Value":"Colver"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/ROO/CSE/26/00001"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


### Started process for Execution of Event : NOTIFICATION_FOR_WORK_PERMIT_CREATION ###


# Calling SendNotificationForWorkPermitCreation function for email/WhatsApp #


Executing email and WhatsApp notifications to WorkPermit approvers


Sending WorkPermit creation email to:


Error occurred while sending email using Osmo-x.


System.NullReferenceException: Object reference not set to an instance of an object.
   at IncidentReporter.NotificationSender.EmailHelper.SendEmail(String template, String subject, Object args, String toAddress, String ccAddress, List`1 reportAttachments, List`1 additionalAttachmentsFilePath, String rootEmailTemplatePath, OrganisationFromConfig organisationFromAddress) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Helpers\EmailHelper.cs:line 39


Sending WorkPermit creation WhatsApp message to: 912000003962


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000003962","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_work_permit_creation_alert_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Adelbert Miley"},{"type":"text","text":"WP/FBYDW/ROO/CSE/26/00001"},{"type":"text","text":"Colver"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Hebert Eaton"},{"type":"text","text":"https://oqsha.com/#/permit-to-work/view-work-permit/248/1934?dlType=viewWorkPermitV2"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Osmo-x WhatsApp Message has been Sent


Message : {"EventName":"DEPARTMENT_INCHARGE_NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1934"},{"Key":"UserIds","Value":"[]"},{"Key":"SiteName","Value":"Colver"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/ROO/CSE/26/00001"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


### Started process for Execution of Event : DEPARTMENT_INCHARGE_NOTIFICATION_FOR_WORK_PERMIT_CREATION ###


# Calling SendDepartmentInchargeNotificationForWorkPermitCreation function for email/WhatsApp #


### End Event Execution ###


Message : {"EventName":"NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1935"},{"Key":"ApproverIds","Value":"[6621]"},{"Key":"SiteName","Value":"Eastpoint"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/CET/CSE/26/00001"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


Sending WorkPermit creation email to: osm01656@osmosys.co


*--- Sending Email Serice Initiated ---*


Reading and binding data to Email Template


Initializing Email Service Client


Generating Email Request


New Work Permit Assigned


--- Email created using Osmo-x ---


--- Email response from Osmo-x is 201


Sending WorkPermit creation WhatsApp message to: 912000005791


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000005791","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_work_permit_creation_alert_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Bridgette Eaton"},{"type":"text","text":"WP/FBYDW/CET/CSE/26/00001"},{"type":"text","text":"Eastpoint"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Hebert Eaton"},{"type":"text","text":"https://oqsha.com/#/permit-to-work/view-work-permit/248/1935?dlType=viewWorkPermitV2"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


### Start Event Execution ###


Message : {"EventName":"DEPARTMENT_INCHARGE_NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1935"},{"Key":"UserIds","Value":"[]"},{"Key":"SiteName","Value":"Eastpoint"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/CET/CSE/26/00001"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


Message : {"EventName":"NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1936"},{"Key":"ApproverIds","Value":"[6621]"},{"Key":"SiteName","Value":"Eastpoint"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/CET/CSE/26/00002"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


### Started process for Execution of Event : NOTIFICATION_FOR_WORK_PERMIT_CREATION ###


# Calling SendNotificationForWorkPermitCreation function for email/WhatsApp #


Executing email and WhatsApp notifications to WorkPermit approvers


Osmo-x WhatsApp payload: {"providerId":48,"data":{"to":"912000005791","messaging_product":"whatsapp","type":"template","template":{"namespace":"d8bcb6bd_2ab2_439c_9d9e_947501266c77","name":"oqsha_work_permit_creation_alert_v3","language":{"policy":"deterministic","code":"en"},"components":[{"type":"body","sub_type":null,"index":0,"parameters":[{"type":"text","text":"Bridgette Eaton"},{"type":"text","text":"WP/FBYDW/CET/CSE/26/00002"},{"type":"text","text":"Eastpoint"},{"type":"text","text":"Falcon's Beyond Global Inc. Warrants"},{"type":"text","text":"Hebert Eaton"},{"type":"text","text":"https://oqsha.com/#/permit-to-work/view-work-permit/248/1936?dlType=viewWorkPermitV2"},{"type":"text","text":"EHS Department - TTK Prestige Limited"}]}]}}}


Osmo-x WhatsApp Message has been Sent


### End Event Execution ###


Message : {"EventName":"DEPARTMENT_INCHARGE_NOTIFICATION_FOR_WORK_PERMIT_CREATION","EventArgs":[{"Key":"WorkPermitId","Value":"1936"},{"Key":"UserIds","Value":"[]"},{"Key":"SiteName","Value":"Eastpoint"},{"Key":"CreatedBy","Value":"Hebert Eaton"},{"Key":"WorkPermitUid","Value":"WP/FBYDW/CET/CSE/26/00002"},{"Key":"OrgId","Value":248},{"Key":"OrganisationName","Value":"Falcon's Beyond Global Inc. Warrants"}]}


### Started process for Execution of Event : NOTIFICATION_TO_TASK_ASSIGNEES ###


# Calling SendNotificationToTaskAssignees function for WhatsApp notification #


Sending WhatsApp notification for task assignment to user ID: 11344


Sending Task Assignment Email for TaskId: 12565, UserId: 11344


Initializing Email Service Client


Generating Email Request


New Task Assigned - AT/SAIL/OFF/III/26/00008


--- Email created using Osmo-x ---


--- Email response from Osmo-x is 201


### Start Event Execution ###


Sending WhatsApp notification for task assignment to user ID: 12372


Sending Task Assignment Email for TaskId: 12567, UserId: 12372


*--- Sending Email Serice Initiated ---*


Reading and binding data to Email Template


New Task Assigned - AT/SAIL/OFF/III/26/00010


### End Event Execution ###


Sending WhatsApp notification for task assignment to user ID: 7631


Osmo-x WhatsApp Message has been Sent


Sending Task Assignment Email for TaskId: 12569, UserId: 7631


New Task Assigned - AT/SAIL/OFF/III/26/00012


### Start Notification Sender Program.cs Execution ###


### Calling ConfigureService.Configure() function ###