System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T token)
   at IncidentReporter.API.BLL.CategoryConfigurationsBll.ExtractModuleAssociationConfigs(String configJson, Int32 orgId, Int32 sourceModuleId, Int32 categoryId, Int32 userId) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\CategoryConfigurationsBll.cs:line 795
   at IncidentReporter.API.BLL.CategoryConfigurationsBll.<UpdateCategoryConfigurationAsync>d__7.MoveNext() in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\CategoryConfigurationsBll.cs:line 308

(This Permit is valid for one shift after that renewal/extension of the permit required).

(This Permit is valid for 08:30 AM to 6:00 PM after that special permission required for Continuation of the Job).

Service involved: Steam/Air/ Water /other (specify)

SAFETY PRECAUTION REQUIRED - (J)Electrical Work

All possible back feeding supplies disconnected.

Use of non-metal portable ladders ensured.

Temporary power cables using good condition & rating as per requirement.

Proper routing of temporary cables ensured.

Qualified electrician available for the job.

PROCESS DEPARTMENT - Instructions if Any

MECHANICAL DEPARTMENT - Instructions if Any

ELECTRICAL & INST.DEPART. - Instructions if Any

PERMIT AUTHORISED BY: (THE DEPARTMENT HEAD OF THE CONCERNED DEPARTMENT)

PERMIT RECEIVED BY: (IF CONTRACTOR ENGAGED FOR THE WORK)

PERMIT HAND OVER / EXTENTION / SPECIAL PERMISSION:

PERMIT CLOSED AFTER EXTENSION BY AUTHORISER:


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Modules/79/Categories/All


Request Body : {"SiteIds":[909],"PageNumber":1,"PageLimit":1000,"IsPublished":true,"UserId":267,"AcmModuleId":79}


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement/TriggerCallback


Request Body : {"status":"skipped","targetRecordId":null,"triggerConfigId":36,"executionLogId":624,"failureReason":"Conditions not met"}


[VM-TriggerCallback] User created — orgId=251 targetRecordId= triggerConfigId=36 status=skipped


[VM-TriggerCallback] No TargetRecordId — skipping PWA link. orgId=251


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Modules/79/Categories/188


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Modules/79/Workflows/States/Startable


Request Body : {"Dimensions":{"CategoryTypeId":["188"]}}


Request URL : https://api-sandbox.oqsha.com/Organisation/256/Users/DropDown?siteId=909&categoryIds=188&isActive=true


Published trigger event: OrgId=251, SourceModuleId=121, SourceRecordId=17, Event=record_updated


[VM-Notify] Orchestrator skipped | visitorId=17 orgId=251 state=Requested stateRouterNotifications=0


Queueing Visitor Management Timer Engine event. OrgId=251, ModuleId=121, RecordId=17, TriggerEvent=Requested


Publishing Timer Engine events. EventCount=1, Endpoint=api/timer-engine/events/bulk


Request URL : https://api-sandbox.oqsha.com/Organisation/251/Users/DropDown?siteId=737&siteId=747&siteId=736&siteId=734&siteId=748&siteId=735


Request URL : https://api-sandbox.oqsha.com/Organisations/251/Modules/121/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement/All


Timer Engine events POST succeeded. Status: OK, Body: {"status":"Success","data":{"totalEventCount":1,"successfulEventCount":1,"failedEventCount":0,"matchedRuleCount":0,"createdQueueCount":0,"skippedQueueCount":0,"errors":[],"skippedReasons":[]},"message":"Timer event batch submitted successfully.","errors":null}


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement/17


Request URL : https://api-sandbox.oqsha.com/Organisations/251/Modules/121/Workflows/Transitions/Available


Request URL : https://api-sandbox.oqsha.com/Organisations/251/Contractors/All?siteIds=735&IsActive=1


Request Body : {"CurrentEntityState":"Requested","ActorContext":{"Employee":[4297],"createdby":[267]},"EntityId":17,"StaticActors":{"Creator":[267]}}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Divisions


Request URL : https://api-sandbox.oqsha.com/Organisations/248/IncidentLocations?isActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/5538/incidentsites?isActive=1


Request URL : https://api-sandbox.oqsha.com/Organisations/248


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/5538


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement/TriggerCallback


Request Body : {"status":"success","targetRecordId":23509,"triggerConfigId":36,"executionLogId":625,"failureReason":null}


[VM-TriggerCallback] User created — orgId=251 targetRecordId=23509 triggerConfigId=36 status=success


[VM-TriggerCallback] Fetched user — visitorUserId=23509 displayName=dsdsd dsds countryCode=+91 mobile=9564738195


[VM-TriggerCallback] Sending PWA link — to=+919564738195 visitor=dsdsd dsds site=Washoe Valley visitorUserId=23509


[VM-Notify] PWA link STUB — to=+919564738195 visitor=dsdsd dsds site=Washoe Valley pwaUrl=https://pwa-staging.oqsha.com template=visitor_site_induction_v1


Osmo-x WhatsApp Message has been Sent


[VM-Notify] PWA link delivered=True | to=+919564738195


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Modules


Published trigger event: OrgId=251, SourceModuleId=121, SourceRecordId=17, Event=record_updated


[VM-Notify] Orchestrator skipped | visitorId=17 orgId=251 newState=Approved stateChanged=True stateRouterNotifications=0


Queueing Visitor Management Timer Engine event. OrgId=251, ModuleId=121, RecordId=17, TriggerEvent=Approved


Publishing Timer Engine events. EventCount=1, Endpoint=api/timer-engine/events/bulk


Timer Engine events POST succeeded. Status: OK, Body: {"status":"Success","data":{"totalEventCount":1,"successfulEventCount":1,"failedEventCount":0,"matchedRuleCount":0,"createdQueueCount":0,"skippedQueueCount":0,"errors":[],"skippedReasons":[]},"message":"Timer event batch submitted successfully.","errors":null}


Request URL : https://api-sandbox.oqsha.com/Organisations/251/Modules/121/Workflows/States/Types


Request URL : https://api-sandbox.oqsha.com/Organisation/251/Users/DropDown?siteId=737&siteId=747&siteId=736&siteId=734&siteId=748&siteId=735


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Modules/79/Categories/100032


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Modules/79/Workflows/States/Startable


Request URL : https://api-sandbox.oqsha.com/Organisations/251/VisitorManagement/All


Request Body : {"Dimensions":{"CategoryTypeId":["100032"]}}


Request URL : https://api-sandbox.oqsha.com/Organisations/256/Investigations/All


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Users/5538


Request Body : {"SiteId":[909],"CategoryId":[],"StateTypeId":[],"StartDate":"","EndDate":"","SearchTerm":"","SortingColumn":["CreatedOn"],"SortingOrder":["desc"],"PageNumber":1,"PageLimit":500}


Request URL : https://api-sandbox.oqsha.com/Organisation/256/Users/DropDown?siteId=909&categoryIds=100032&isActive=true


Request URL : https://api-sandbox.oqsha.com/Languages


Request URL : https://api-sandbox.oqsha.com/Organisations/248/PendingActionsNotifications


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Modules


Request URL : https://api-sandbox.oqsha.com/Organisation/248/UserPreference


Request URL : https://api-sandbox.oqsha.com/Dashboard/Organisations/248/SideMenu


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Reports/Dashboards


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Training/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/TaskCategories/Dropdown


Request Body : {"SiteIds":[708,744,707,705,709,706],"FromDate":"2026-04-01","ToDate":"2026-09-04"}


Request Body : {"SiteId":[708,744,707,705,709,706],"UserId":5538}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Divisions/Dropdown


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChangeList/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Tasks/List/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/PermitToWork/All/Sites/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/IncidentManagement/Firs/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/KPI/PlantMaster/Sites/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Inspections/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Courses/Counts


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Incidents/Counts


Request Body : {"SiteIds":[708,744,707,705,709,706],"FromDate":"2026-04-01","ToDate":"2026-09-04","CategoryId":[]}


Request Body : {"SiteIds":[708,744,707,705,709,706],"FromDate":"2026-04-01","ToDate":"2026-09-04","AcmModuleId":46}


Request Body : {"SiteIds":[708,744,707,705,709,706]}


Request Body : {"SiteIds":[708,744,707,705,709,706],"FromDate":"2026-04-01","ToDate":"2026-09-04","CategoryId":[1637,1574,1575,1576]}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/WorkPermit/Statuses


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Library/Categories


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/EmployeeMasterDropdown


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/PlantMasterDropdown


Request Body : {"OrgId":248,"UserId":5538}


Request Body : {"OrgId":[248],"SiteId":[708,744,707,705,709,706]}


Request URL : https://api-sandbox.oqsha.com/Organisation/248/KPI/PlantMaster/AverageRatings


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Users/DropDown?ModuleName=Library


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Users/DropDown?ModuleName=MOC


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Departments


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChange/Statuses


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChange/Categories


Request Body : {"PageNumber":0,"PageSize":0,"SiteId":[],"UserId":5538}


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChangeList


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChange/411


Request URL : https://api-sandbox.oqsha.com/Organisation/248/AccessControl/Roles


Request URL : https://api-sandbox.oqsha.com/Organisations/248/ManagementOfChange/411/MocHistory


Request URL : https://api-sandbox.oqsha.com/Organisations/248/Departments?siteId=708


Request Body : {"PageNumber":0,"PageSize":0,"SiteId":[708],"UserId":5538}


Request URL : https://api-sandbox.oqsha.com/Organisation/248/Users/DropDown?ModuleName=MOC&siteId=708