(11199,'operation_registered','operation',137,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11200,'operation_registered','operation',138,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/entries\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11201,'operation_registered','operation',139,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11202,'operation_registered','operation',140,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"PUT\"}','{}','2025-12-20 02:38:15'),(11203,'operation_registered','operation',141,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId/complete\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11204,'operation_registered','operation',142,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"DELETE\"}','{}','2025-12-20 02:38:15'),(11205,'operation_registered','operation',143,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-request\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11206,'operation_registered','operation',144,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-status/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 02:38:15'),(11207,'operation_registered','operation',145,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/approve-payment/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 02:38:15'),(11208,'operation_registered','operation',146,'supply-chain-service',NULL,'{\"path\": \"/api/reports/stock-adjustments\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11209,'operation_registered','operation',147,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles/:id/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11210,'operation_registered','operation',148,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/complete\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11211,'operation_registered','operation',149,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/lock\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11212,'operation_registered','operation',150,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/backup-reconcile\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11213,'operation_registered','operation',151,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse\", \"method\": \"POST\"}','{}','2025-12-20 02:38:15'),(11214,'operation_registered','operation',152,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"PUT\"}','{}','2025-12-20 02:38:15'),(11215,'operation_registered','operation',153,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"DELETE\"}','{}','2025-12-20 02:38:15'),(11216,'operation_registered','operation',121,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11217,'operation_registered','operation',123,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11218,'operation_registered','operation',124,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/costs\", \"method\": \"PATCH\"}','{}','2025-12-20 02:41:41'),(11219,'operation_registered','operation',125,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/stage\", \"method\": \"PATCH\"}','{}','2025-12-20 02:41:41'),(11220,'operation_registered','operation',126,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/payment\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11221,'operation_registered','operation',127,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11222,'operation_registered','operation',128,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11223,'operation_registered','operation',129,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id/price\", \"method\": \"PATCH\"}','{}','2025-12-20 02:41:41'),(11224,'operation_registered','operation',130,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11225,'operation_registered','operation',131,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers/:id\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11226,'operation_registered','operation',132,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/inspections\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11227,'operation_registered','operation',133,'supply-chain-service',NULL,'{\"path\": \"/api/quality/inspections/:inspection_id\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11228,'operation_registered','operation',134,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/complete\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11229,'operation_registered','operation',135,'supply-chain-service',NULL,'{\"path\": \"/api/material-movement\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11230,'operation_registered','operation',136,'supply-chain-service',NULL,'{\"path\": \"/api/gate-clearance/create-or-update\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11231,'operation_registered','operation',137,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11232,'operation_registered','operation',138,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/entries\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11233,'operation_registered','operation',139,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11234,'operation_registered','operation',140,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:41'),(11235,'operation_registered','operation',141,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId/complete\", \"method\": \"POST\"}','{}','2025-12-20 02:41:41'),(11236,'operation_registered','operation',142,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"DELETE\"}','{}','2025-12-20 02:41:42'),(11237,'operation_registered','operation',143,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-request\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11238,'operation_registered','operation',144,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-status/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 02:41:42'),(11239,'operation_registered','operation',145,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/approve-payment/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 02:41:42'),(11240,'operation_registered','operation',146,'supply-chain-service',NULL,'{\"path\": \"/api/reports/stock-adjustments\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11241,'operation_registered','operation',147,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles/:id/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11242,'operation_registered','operation',148,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/complete\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11243,'operation_registered','operation',149,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/lock\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11244,'operation_registered','operation',150,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/backup-reconcile\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11245,'operation_registered','operation',151,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse\", \"method\": \"POST\"}','{}','2025-12-20 02:41:42'),(11246,'operation_registered','operation',152,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"PUT\"}','{}','2025-12-20 02:41:42'),(11247,'operation_registered','operation',153,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"DELETE\"}','{}','2025-12-20 02:41:42'),(11248,'request_created','request',148,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 02:43:56'),(11249,'operation_invoked','operation_invocation',143,'supply-chain-service',NULL,'{\"requestId\": 148, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 02:43:56'),(11250,'request_created','request',149,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 02:44:28'),(11251,'operation_invoked','operation_invocation',144,'supply-chain-service',NULL,'{\"requestId\": 149, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 02:44:28'),(11252,'request_approved','request',149,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 02:44:52'),(11253,'request_approved','request',148,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 02:44:54'),(11254,'operation_decision','operation_invocation',144,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 149, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 02:45:17'),(11255,'request_approved','request',149,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 02:45:17'),(11256,'operation_decision','operation_invocation',143,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 148, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 02:45:23'),(11257,'request_approved','request',148,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 02:45:23'),(11258,'operation_registered','operation',121,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11259,'operation_registered','operation',123,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11260,'operation_registered','operation',124,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/costs\", \"method\": \"PATCH\"}','{}','2025-12-20 17:48:17'),(11261,'operation_registered','operation',125,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/stage\", \"method\": \"PATCH\"}','{}','2025-12-20 17:48:17'),(11262,'operation_registered','operation',126,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/payment\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11263,'operation_registered','operation',127,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11264,'operation_registered','operation',128,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11265,'operation_registered','operation',129,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id/price\", \"method\": \"PATCH\"}','{}','2025-12-20 17:48:17'),(11266,'operation_registered','operation',130,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11267,'operation_registered','operation',131,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers/:id\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11268,'operation_registered','operation',132,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/inspections\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11269,'operation_registered','operation',133,'supply-chain-service',NULL,'{\"path\": \"/api/quality/inspections/:inspection_id\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11270,'operation_registered','operation',134,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/complete\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11271,'operation_registered','operation',135,'supply-chain-service',NULL,'{\"path\": \"/api/material-movement\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11272,'operation_registered','operation',136,'supply-chain-service',NULL,'{\"path\": \"/api/gate-clearance/create-or-update\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11273,'operation_registered','operation',137,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11274,'operation_registered','operation',138,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/entries\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11275,'operation_registered','operation',139,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11276,'operation_registered','operation',140,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11277,'operation_registered','operation',141,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId/complete\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11278,'operation_registered','operation',142,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"DELETE\"}','{}','2025-12-20 17:48:17'),(11279,'operation_registered','operation',143,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-request\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11280,'operation_registered','operation',144,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-status/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 17:48:17'),(11281,'operation_registered','operation',145,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/approve-payment/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 17:48:17'),(11282,'operation_registered','operation',146,'supply-chain-service',NULL,'{\"path\": \"/api/reports/stock-adjustments\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11283,'operation_registered','operation',147,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles/:id/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11284,'operation_registered','operation',148,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/complete\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11285,'operation_registered','operation',149,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/lock\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11286,'operation_registered','operation',150,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/backup-reconcile\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11287,'operation_registered','operation',151,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse\", \"method\": \"POST\"}','{}','2025-12-20 17:48:17'),(11288,'operation_registered','operation',152,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"PUT\"}','{}','2025-12-20 17:48:17'),(11289,'operation_registered','operation',153,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"DELETE\"}','{}','2025-12-20 17:48:17'),(11290,'request_created','request',150,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 18:05:56'),(11291,'operation_invoked','operation_invocation',145,'supply-chain-service',NULL,'{\"requestId\": 150, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 18:05:56'),(11292,'request_approved','request',150,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 18:06:16'),(11293,'operation_decision','operation_invocation',145,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 150, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 18:06:35'),(11294,'request_approved','request',150,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 18:06:35'),(11295,'request_created','request',151,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 18:41:58'),(11296,'operation_invoked','operation_invocation',146,'supply-chain-service',NULL,'{\"requestId\": 151, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 18:41:58'),(11297,'request_approved','request',151,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 18:42:13'),(11298,'operation_decision','operation_invocation',146,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 151, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 18:42:29'),(11299,'request_approved','request',151,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 18:42:29'),(11300,'request_created','request',152,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 19:45:34'),(11301,'operation_invoked','operation_invocation',147,'supply-chain-service',NULL,'{\"requestId\": 152, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 19:45:34'),(11302,'request_approved','request',152,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 19:45:43'),(11303,'operation_decision','operation_invocation',147,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 152, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 19:47:58'),(11304,'request_approved','request',152,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 19:47:58'),(11305,'operation_registered','operation',121,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11306,'operation_registered','operation',123,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11307,'operation_registered','operation',124,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/costs\", \"method\": \"PATCH\"}','{}','2025-12-20 20:33:57'),(11308,'operation_registered','operation',125,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/stage\", \"method\": \"PATCH\"}','{}','2025-12-20 20:33:57'),(11309,'operation_registered','operation',126,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/payment\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11310,'operation_registered','operation',127,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11311,'operation_registered','operation',128,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11312,'operation_registered','operation',129,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id/price\", \"method\": \"PATCH\"}','{}','2025-12-20 20:33:57'),(11313,'operation_registered','operation',130,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11314,'operation_registered','operation',131,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11315,'operation_registered','operation',132,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/inspections\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11316,'operation_registered','operation',133,'supply-chain-service',NULL,'{\"path\": \"/api/quality/inspections/:inspection_id\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11317,'operation_registered','operation',134,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/complete\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11318,'operation_registered','operation',135,'supply-chain-service',NULL,'{\"path\": \"/api/material-movement\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11319,'operation_registered','operation',136,'supply-chain-service',NULL,'{\"path\": \"/api/gate-clearance/create-or-update\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11320,'operation_registered','operation',137,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11321,'operation_registered','operation',138,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/entries\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11322,'operation_registered','operation',139,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11323,'operation_registered','operation',140,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11324,'operation_registered','operation',141,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId/complete\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11325,'operation_registered','operation',142,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"DELETE\"}','{}','2025-12-20 20:33:57'),(11326,'operation_registered','operation',143,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-request\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11327,'operation_registered','operation',144,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-status/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 20:33:57'),(11328,'operation_registered','operation',145,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/approve-payment/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 20:33:57'),(11329,'operation_registered','operation',146,'supply-chain-service',NULL,'{\"path\": \"/api/reports/stock-adjustments\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11330,'operation_registered','operation',147,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles/:id/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11331,'operation_registered','operation',148,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/complete\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11332,'operation_registered','operation',149,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/lock\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11333,'operation_registered','operation',150,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/backup-reconcile\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11334,'operation_registered','operation',151,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse\", \"method\": \"POST\"}','{}','2025-12-20 20:33:57'),(11335,'operation_registered','operation',152,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:33:57'),(11336,'operation_registered','operation',153,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"DELETE\"}','{}','2025-12-20 20:33:57'),(11337,'operation_registered','operation',121,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11338,'operation_registered','operation',123,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11339,'operation_registered','operation',124,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/costs\", \"method\": \"PATCH\"}','{}','2025-12-20 20:34:26'),(11340,'operation_registered','operation',125,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/stage\", \"method\": \"PATCH\"}','{}','2025-12-20 20:34:26'),(11341,'operation_registered','operation',126,'supply-chain-service',NULL,'{\"path\": \"/api/purchase-orders/:id/payment\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11342,'operation_registered','operation',127,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11343,'operation_registered','operation',128,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11344,'operation_registered','operation',129,'supply-chain-service',NULL,'{\"path\": \"/api/raw-materials/:id/price\", \"method\": \"PATCH\"}','{}','2025-12-20 20:34:26'),(11345,'operation_registered','operation',130,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11346,'operation_registered','operation',131,'supply-chain-service',NULL,'{\"path\": \"/api/suppliers/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11347,'operation_registered','operation',132,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/inspections\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11348,'operation_registered','operation',133,'supply-chain-service',NULL,'{\"path\": \"/api/quality/inspections/:inspection_id\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11349,'operation_registered','operation',134,'supply-chain-service',NULL,'{\"path\": \"/api/quality/purchase-orders/:purchase_order_id/complete\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11350,'operation_registered','operation',135,'supply-chain-service',NULL,'{\"path\": \"/api/material-movement\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11351,'operation_registered','operation',136,'supply-chain-service',NULL,'{\"path\": \"/api/gate-clearance/create-or-update\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11352,'operation_registered','operation',137,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11353,'operation_registered','operation',138,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/entries\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11354,'operation_registered','operation',139,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11355,'operation_registered','operation',140,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11356,'operation_registered','operation',141,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId/complete\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11357,'operation_registered','operation',142,'supply-chain-service',NULL,'{\"path\": \"/api/weighbridge/:id/weighbridge/:recordId\", \"method\": \"DELETE\"}','{}','2025-12-20 20:34:26'),(11358,'operation_registered','operation',143,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-request\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11359,'operation_registered','operation',144,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/payment-status/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 20:34:26'),(11360,'operation_registered','operation',145,'supply-chain-service',NULL,'{\"path\": \"/api/accounts/approve-payment/:id\", \"method\": \"PATCH\"}','{}','2025-12-20 20:34:26'),(11361,'operation_registered','operation',146,'supply-chain-service',NULL,'{\"path\": \"/api/reports/stock-adjustments\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11362,'operation_registered','operation',147,'supply-chain-service',NULL,'{\"path\": \"/api/vehicles/:id/vehicles\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11363,'operation_registered','operation',148,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/complete\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11364,'operation_registered','operation',149,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/lock\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11365,'operation_registered','operation',150,'supply-chain-service',NULL,'{\"path\": \"/api/end-of-day/backup-reconcile\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11366,'operation_registered','operation',151,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse\", \"method\": \"POST\"}','{}','2025-12-20 20:34:26'),(11367,'operation_registered','operation',152,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"PUT\"}','{}','2025-12-20 20:34:26'),(11368,'operation_registered','operation',153,'supply-chain-service',NULL,'{\"path\": \"/api/warehouse/:id\", \"method\": \"DELETE\"}','{}','2025-12-20 20:34:26'),(11369,'request_created','request',153,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 20:38:21'),(11370,'operation_invoked','operation_invocation',148,'supply-chain-service',NULL,'{\"requestId\": 153, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 20:38:21'),(11371,'request_approved','request',153,'8',NULL,'{\"stepId\": 64}','{}','2025-12-20 20:38:34'),(11372,'operation_decision','operation_invocation',148,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 153, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 20:38:43'),(11373,'request_approved','request',153,'4',NULL,'{\"stepId\": 64}','{}','2025-12-20 20:38:43'),(11374,'workflow_updated','workflow',1,'8',NULL,'{\"name\": \"Purchase Order Approval\", \"module\": \"supply_chain\", \"operation\": \"create_purchase_order\"}','{}','2025-12-20 20:50:34'),(11375,'request_created','request',154,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 20:50:59'),(11376,'operation_invoked','operation_invocation',149,'supply-chain-service',NULL,'{\"requestId\": 154, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 20:50:59'),(11377,'operation_decision','operation_invocation',149,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 154, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 20:51:09'),(11378,'request_approved','request',154,'8',NULL,'{\"stepId\": 135}','{}','2025-12-20 20:51:09'),(11379,'request_created','request',155,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 20:58:54'),(11380,'operation_invoked','operation_invocation',150,'supply-chain-service',NULL,'{\"requestId\": 155, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 20:58:54'),(11381,'operation_decision','operation_invocation',150,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 155, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 20:59:02'),(11382,'request_approved','request',155,'8',NULL,'{\"stepId\": 135}','{}','2025-12-20 20:59:02'),(11383,'request_created','request',156,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 21:21:48'),(11384,'operation_invoked','operation_invocation',151,'supply-chain-service',NULL,'{\"requestId\": 156, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 21:21:48'),(11385,'operation_decision','operation_invocation',151,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 156, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 21:21:53'),(11386,'request_approved','request',156,'8',NULL,'{\"stepId\": 135}','{}','2025-12-20 21:21:53'),(11387,'request_created','request',157,'8',NULL,'{\"module\": \"supply_chain\", \"operation\": \"create_purchase_order\", \"workflowId\": 1}','{}','2025-12-20 23:23:57'),(11388,'operation_invoked','operation_invocation',152,'supply-chain-service',NULL,'{\"requestId\": 157, \"operationId\": 121, \"requiresApproval\": true}','{}','2025-12-20 23:23:57'),(11389,'operation_decision','operation_invocation',152,NULL,NULL,'{\"decision\": \"approved\", \"requestId\": 157, \"callbackUrl\": \"http://localhost:3003/api/purchase-orders/callbacks/approval\"}','{}','2025-12-20 23:24:03'),(11390,'request_approved','request',157,'8',NULL,'{\"stepId\": 135}','{}','2025-12-20 23:24:03');

--
-- Table structure for table `workflow_policies`
--

CREATE TABLE `workflow_policies` (
  `id` int NOT NULL AUTO_INCREMENT,
  `module` varchar(100) NOT NULL,
  `operation` varchar(100) NOT NULL,
  `condition_expr` text,
  `workflow_id` int NOT NULL,
  `priority` int DEFAULT '1',
  `active` tinyint(1) DEFAULT '1',
  `created_by` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `workflow_id` (`workflow_id`),
  KEY `idx_module_operation_priority` (`module`,`operation`,`priority` DESC),
  KEY `idx_active` (`active`),
  CONSTRAINT `workflow_policies_ibfk_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `workflow_policies`
--

INSERT INTO `workflow_policies` VALUES (1,'supply_chain','create_purchase_order',NULL,1,1,1,'system','2025-11-14 01:02:06','2025-11-14 01:58:40'),(2,'supply_chain','create_purchase_order',NULL,1,100,1,'system','2025-11-14 02:09:17','2025-11-14 02:09:17'),(3,'supply_chain','add_weighbridge_record',NULL,8,1,1,'1','2025-11-22 14:54:41','2025-11-25 11:32:55'),(4,'supply_chain','update_supplier',NULL,7,1,1,'1','2025-11-22 14:54:46','2025-11-22 14:54:46'),(5,'supply_chain','create_supplier',NULL,6,1,1,'1','2025-11-22 14:54:46','2025-11-22 14:54:46'),(6,'supply_chain','update_raw_material_price',NULL,5,1,1,'1','2025-11-22 14:54:46','2025-11-22 14:54:46'),(7,'supply_chain','update_raw_material',NULL,4,1,1,'1','2025-11-22 14:54:46','2025-11-22 14:54:46'),(8,'supply_chain','update_purchase_order_costs',NULL,3,1,1,'1','2025-11-22 14:54:46','2025-11-22 14:54:46'),(9,'supply_chain','update_purchase_order',NULL,2,1,1,'1','2025-11-22 14:54:47','2025-11-22 14:54:47'),(10,'supply_chain','create_purchase_order','total_amount > 5000',9,1,1,'system','2025-11-22 16:41:08','2025-11-22 16:41:08'),(11,'ap','create_vendor_bill','amount >= 100000',31,1,1,'system','2025-12-13 22:56:47','2025-12-13 22:56:47'),(12,'ap','update_vendor_bill','true',32,1,1,'system','2025-12-13 22:56:48','2025-12-13 22:56:48'),(13,'ap','create_supplier','credit_limit > 500000',33,1,1,'system','2025-12-13 22:56:49','2025-12-13 22:56:49'),(14,'ap','process_payment','amount >= 50000',34,1,1,'system','2025-12-13 22:56:50','2025-12-13 22:56:50'),(15,'ap','accept_qc_completed_po','final_payable_amount >= 250000',35,1,1,'system','2025-12-13 22:56:51','2025-12-13 22:56:51'),(16,'ap','set_supplier_opening_balance','true',36,1,1,'system','2025-12-13 22:56:52','2025-12-13 22:56:52'),(17,'ap','perform_three_way_match','match_tolerance < 95',37,1,1,'system','2025-12-13 22:56:53','2025-12-13 22:56:53'),(18,'accounts','create_vendor_bill','amount >= 100000',38,1,1,'system','2025-12-13 23:09:58','2025-12-13 23:09:58'),(19,'accounts','update_vendor_bill','true',39,1,1,'system','2025-12-13 23:09:59','2025-12-13 23:09:59'),(20,'accounts','create_supplier','credit_limit > 500000',40,1,1,'system','2025-12-13 23:10:00','2025-12-13 23:10:00'),(21,'accounts','process_payment','amount >= 50000',41,1,1,'system','2025-12-13 23:10:02','2025-12-13 23:10:02'),(22,'accounts','accept_qc_completed_po','final_payable_amount >= 250000',42,1,1,'system','2025-12-13 23:10:03','2025-12-13 23:10:03'),(23,'accounts','set_supplier_opening_balance','true',43,1,1,'system','2025-12-13 23:10:04','2025-12-13 23:10:04'),(24,'accounts','perform_three_way_match','match_tolerance < 95',44,1,1,'system','2025-12-13 23:10:05','2025-12-13 23:10:05'),(25,'accounts','create_vendor_bill','amount >= 100000',45,1,1,'system','2025-12-13 23:49:13','2025-12-13 23:49:13'),(26,'accounts','update_vendor_bill','true',46,1,1,'system','2025-12-13 23:49:14','2025-12-13 23:49:14'),(27,'accounts','create_supplier','credit_limit > 500000',47,1,1,'system','2025-12-13 23:49:15','2025-12-13 23:49:15'),(28,'accounts','process_payment','amount >= 50000',48,1,1,'system','2025-12-13 23:49:16','2025-12-13 23:49:16'),(29,'accounts','accept_qc_completed_po','final_payable_amount >= 250000',49,1,1,'system','2025-12-13 23:49:17','2025-12-13 23:49:17'),(30,'accounts','set_supplier_opening_balance','true',50,1,1,'system','2025-12-13 23:49:18','2025-12-13 23:49:18'),(31,'accounts','perform_three_way_match','match_tolerance < 95',51,1,1,'system','2025-12-13 23:49:19','2025-12-13 23:49:19'),(32,'accounts','create_vendor_bill','amount >= 100000',45,1,1,'system','2025-12-13 23:50:12','2025-12-13 23:50:12');

--
-- Table structure for table `workflow_steps`
--

CREATE TABLE `workflow_steps` (
  `id` int NOT NULL AUTO_INCREMENT,
  `workflow_id` int NOT NULL,
  `step_order` int NOT NULL,
  `mode` enum('serial','parallel','quorum') DEFAULT 'serial',
  `quorum` int DEFAULT '1',
  `assignees` json NOT NULL,
  `sla_minutes` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_workflow_order` (`workflow_id`,`step_order`),
  CONSTRAINT `workflow_steps_ibfk_1` FOREIGN KEY (`workflow_id`) REFERENCES `workflows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `workflow_steps`
--

INSERT INTO `workflow_steps` VALUES (45,2,1,'parallel',2,'[{\"type\": \"user\", \"refId\": \"4\"}, {\"type\": \"user\", \"refId\": \"5\"}]',1,'2025-11-22 13:44:16','2025-11-22 13:44:16'),(46,2,2,'serial',2,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"3\"}]',1440,'2025-11-22 13:44:16','2025-11-22 13:44:16'),(50,4,1,'serial',2,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"5\"}]',NULL,'2025-11-22 13:56:02','2025-11-22 13:56:02'),(51,4,2,'serial',3,'[{\"type\": \"user\", \"refId\": \"4\"}, {\"type\": \"user\", \"refId\": \"2\"}, {\"type\": \"user\", \"refId\": \"3\"}]',NULL,'2025-11-22 13:56:02','2025-11-22 13:56:02'),(52,5,1,'serial',3,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"4\"}, {\"type\": \"user\", \"refId\": \"5\"}]',NULL,'2025-11-22 13:58:40','2025-11-22 13:58:40'),(53,5,2,'serial',2,'[{\"type\": \"user\", \"refId\": \"3\"}, {\"type\": \"user\", \"refId\": \"2\"}]',NULL,'2025-11-22 13:58:40','2025-11-22 13:58:40'),(54,6,1,'parallel',2,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"5\"}]',NULL,'2025-11-22 14:00:38','2025-11-22 14:00:38'),(55,6,2,'serial',2,'[{\"type\": \"user\", \"refId\": \"2\"}, {\"type\": \"user\", \"refId\": \"4\"}]',NULL,'2025-11-22 14:00:38','2025-11-22 14:00:38'),(56,7,1,'parallel',2,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"4\"}, {\"type\": \"user\", \"refId\": \"5\"}]',NULL,'2025-11-22 14:02:49','2025-11-22 14:02:49'),(57,7,2,'serial',1,'[{\"type\": \"user\", \"refId\": \"3\"}]',NULL,'2025-11-22 14:02:49','2025-11-22 14:02:49'),(61,9,1,'serial',1,'[{\"type\": \"user\", \"refId\": \"8\"}]',1440,'2025-11-25 07:18:05','2025-11-25 07:18:05'),(67,8,1,'serial',1,'[{\"type\": \"user\", \"refId\": \"8\"}]',2,'2025-11-25 11:27:23','2025-11-25 11:27:23'),(68,3,1,'serial',3,'[{\"type\": \"user\", \"refId\": \"8\"}, {\"type\": \"user\", \"refId\": \"4\"}, {\"type\": \"user\", \"refId\": \"5\"}]',NULL,'2025-11-26 13:12:45','2025-11-26 13:12:45'),(69,3,2,'serial',1,'[{\"type\": \"user\", \"refId\": \"3\"}]',1440,'2025-11-26 13:12:45','2025-11-26 13:12:45'),(100,31,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 22:56:46','2025-12-13 22:56:46'),(101,31,2,'serial',2,'[{\"type\": \"role\", \"value\": \"senior_finance_manager\"}, {\"type\": \"role\", \"value\": \"cfo\"}]',2880,'2025-12-13 22:56:46','2025-12-13 22:56:46'),(102,32,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_supervisor\"}]',720,'2025-12-13 22:56:48','2025-12-13 22:56:48'),(103,33,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 22:56:49','2025-12-13 22:56:49'),(104,33,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 22:56:49','2025-12-13 22:56:49'),(105,34,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accountant\"}]',720,'2025-12-13 22:56:50','2025-12-13 22:56:50'),(106,34,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 22:56:50','2025-12-13 22:56:50'),(107,35,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 22:56:51','2025-12-13 22:56:51'),(108,35,2,'parallel',2,'[{\"type\": \"role\", \"value\": \"senior_procurement_manager\"}, {\"type\": \"role\", \"value\": \"finance_manager\"}]',2880,'2025-12-13 22:56:51','2025-12-13 22:56:51'),(109,36,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 22:56:52','2025-12-13 22:56:52'),(110,37,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accounts_payable_specialist\"}]',720,'2025-12-13 22:56:53','2025-12-13 22:56:53'),(113,39,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_supervisor\"}]',720,'2025-12-13 23:09:59','2025-12-13 23:09:59'),(114,40,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 23:10:00','2025-12-13 23:10:00'),(115,40,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:10:00','2025-12-13 23:10:00'),(116,41,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accountant\"}]',720,'2025-12-13 23:10:01','2025-12-13 23:10:01'),(117,41,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:10:01','2025-12-13 23:10:01'),(118,42,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 23:10:03','2025-12-13 23:10:03'),(119,42,2,'parallel',2,'[{\"type\": \"role\", \"value\": \"senior_procurement_manager\"}, {\"type\": \"role\", \"value\": \"finance_manager\"}]',2880,'2025-12-13 23:10:03','2025-12-13 23:10:03'),(120,43,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:10:04','2025-12-13 23:10:04'),(121,44,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accounts_payable_specialist\"}]',720,'2025-12-13 23:10:05','2025-12-13 23:10:05'),(122,38,1,'serial',1,'[{\"type\": \"user\", \"refId\": \"4\"}]',1440,'2025-12-13 23:34:01','2025-12-13 23:34:01'),(123,38,2,'serial',1,'[{\"type\": \"user\", \"refId\": \"8\"}]',2880,'2025-12-13 23:34:01','2025-12-13 23:34:01'),(124,45,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:49:13','2025-12-13 23:49:13'),(125,45,2,'serial',2,'[{\"type\": \"role\", \"value\": \"senior_finance_manager\"}, {\"type\": \"role\", \"value\": \"cfo\"}]',2880,'2025-12-13 23:49:13','2025-12-13 23:49:13'),(126,46,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_supervisor\"}]',720,'2025-12-13 23:49:14','2025-12-13 23:49:14'),(127,47,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 23:49:15','2025-12-13 23:49:15'),(128,47,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:49:15','2025-12-13 23:49:15'),(129,48,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accountant\"}]',720,'2025-12-13 23:49:16','2025-12-13 23:49:16'),(130,48,2,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:49:16','2025-12-13 23:49:16'),(131,49,1,'serial',1,'[{\"type\": \"role\", \"value\": \"procurement_manager\"}]',1440,'2025-12-13 23:49:17','2025-12-13 23:49:17'),(132,49,2,'parallel',2,'[{\"type\": \"role\", \"value\": \"senior_procurement_manager\"}, {\"type\": \"role\", \"value\": \"finance_manager\"}]',2880,'2025-12-13 23:49:17','2025-12-13 23:49:17'),(133,50,1,'serial',1,'[{\"type\": \"role\", \"value\": \"finance_manager\"}]',1440,'2025-12-13 23:49:18','2025-12-13 23:49:18'),(134,51,1,'serial',1,'[{\"type\": \"role\", \"value\": \"accounts_payable_specialist\"}]',720,'2025-12-13 23:49:19','2025-12-13 23:49:19'),(135,1,1,'serial',1,'[{\"type\": \"user\", \"refId\": \"8\"}]',1440,'2025-12-20 20:50:34','2025-12-20 20:50:34'),(136,1,2,'serial',1,'[{\"type\": \"user\", \"refId\": \"3\"}]',1440,'2025-12-20 20:50:34','2025-12-20 20:50:34');

--
-- Table structure for table `workflows`
--

CREATE TABLE `workflows` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `module` varchar(100) NOT NULL,
  `operation` varchar(100) NOT NULL,
  `description` text,
  `active` tinyint(1) DEFAULT '1',
  `created_by` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` enum('approval','notification') DEFAULT 'approval',
  PRIMARY KEY (`id`),
  KEY `idx_module_operation` (`module`,`operation`),
  KEY `idx_active` (`active`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `workflows`
--

INSERT INTO `workflows` VALUES (1,'Purchase Order Approval','supply_chain','create_purchase_order','Standard approval workflow for purchase orders',1,'system','2025-11-14 01:02:06','2025-12-20 20:50:34','approval'),(2,'Update purchase order','supply_chain','update_purchase_order','updating any information detail on the purchase order',1,'admin','2025-11-14 01:24:00','2025-11-22 13:44:16','approval'),(3,'Update Purchase Order cost','supply_chain','update_purchase_order_costs','',1,'8','2025-11-22 13:52:45','2025-11-26 13:12:45','notification'),(4,'Update raw materials','supply_chain','update_raw_material','',1,'8','2025-11-22 13:55:23','2025-11-22 13:56:02','approval'),(5,'Update Raw Material Price','supply_chain','update_raw_material_price','',1,'8','2025-11-22 13:58:40','2025-11-22 13:58:40','approval'),(6,'Create Supplier','supply_chain','create_supplier','Create Supplier',1,'8','2025-11-22 14:00:38','2025-11-22 14:00:38','approval'),(7,'Update Supplier','supply_chain','update_supplier','',1,'8','2025-11-22 14:02:49','2025-11-22 14:02:49','approval'),(8,'Add Weighbridge record','supply_chain','add_weighbridge_record','',1,'8','2025-11-22 14:13:28','2025-11-25 11:32:55','notification'),(9,'Purchase Order Approval','supply_chain','create_purchase_order','Standard approval workflow for purchase orders',0,'system','2025-11-22 16:41:08','2025-11-25 07:19:56','approval'),(31,'Vendor Bill Approval Workflow','ap','create_vendor_bill','Approval workflow for new vendor bills based on amount thresholds',0,'system','2025-12-13 22:56:46','2025-12-13 23:37:44','approval'),(32,'Vendor Bill Update Approval','ap','update_vendor_bill','Approval workflow for vendor bill modifications',0,'system','2025-12-13 22:56:48','2025-12-13 23:37:46','approval'),(33,'High-Value Supplier Creation','ap','create_supplier','Approval workflow for new supplier registration',0,'system','2025-12-13 22:56:49','2025-12-13 23:37:48','approval'),(34,'Payment Processing Workflow','ap','process_payment','Approval workflow for payment processing based on amount',0,'system','2025-12-13 22:56:50','2025-12-13 23:37:51','approval'),(35,'QC PO Acceptance Workflow','ap','accept_qc_completed_po','Workflow for accepting QC completed purchase orders',0,'system','2025-12-13 22:56:51','2025-12-13 23:37:12','approval'),(36,'Supplier Opening Balance Setup','ap','set_supplier_opening_balance','Approval workflow for setting supplier opening balances',0,'system','2025-12-13 22:56:52','2025-12-13 23:37:10','approval'),(37,'Three-Way Match Validation','ap','perform_three_way_match','Workflow for three-way matching validation',0,'system','2025-12-13 22:56:53','2025-12-13 23:37:07','approval'),(38,'Vendor Bill Approval Workflow','accounts','create_vendor_bill','Approval workflow for new vendor bills based on amount thresholds',0,'system','2025-12-13 23:09:58','2025-12-13 23:35:38','approval'),(39,'Vendor Bill Update Approval','accounts','update_vendor_bill','Approval workflow for vendor bill modifications',0,'system','2025-12-13 23:09:59','2025-12-13 23:37:02','approval'),(40,'High-Value Supplier Creation','accounts','create_supplier','Approval workflow for new supplier registration',0,'system','2025-12-13 23:10:00','2025-12-13 23:36:45','approval'),(41,'Payment Processing Workflow','accounts','process_payment','Approval workflow for payment processing based on amount',0,'system','2025-12-13 23:10:01','2025-12-13 23:36:42','approval'),(42,'QC PO Acceptance Workflow','accounts','accept_qc_completed_po','Workflow for accepting QC completed purchase orders',0,'system','2025-12-13 23:10:03','2025-12-13 23:35:30','approval'),(43,'Supplier Opening Balance Setup','accounts','set_supplier_opening_balance','Approval workflow for setting supplier opening balances',0,'system','2025-12-13 23:10:04','2025-12-13 23:35:27','approval'),(44,'Three-Way Match Validation','accounts','perform_three_way_match','Workflow for three-way matching validation',0,'system','2025-12-13 23:10:05','2025-12-13 23:35:24','approval'),(45,'Vendor Bill Approval Workflow','accounts','create_vendor_bill','Approval workflow for new vendor bills based on amount thresholds',1,'system','2025-12-13 23:49:13','2025-12-13 23:49:13','approval'),(46,'Vendor Bill Update Approval','accounts','update_vendor_bill','Approval workflow for vendor bill modifications',1,'system','2025-12-13 23:49:14','2025-12-13 23:49:14','approval'),(47,'High-Value Supplier Creation','accounts','create_supplier','Approval workflow for new supplier registration',1,'system','2025-12-13 23:49:15','2025-12-13 23:49:15','approval'),(48,'Payment Processing Workflow','accounts','process_payment','Approval workflow for payment processing based on amount',1,'system','2025-12-13 23:49:16','2025-12-13 23:49:16','approval'),(49,'QC PO Acceptance Workflow','accounts','accept_qc_completed_po','Workflow for accepting QC completed purchase orders',1,'system','2025-12-13 23:49:17','2025-12-13 23:49:17','approval'),(50,'Supplier Opening Balance Setup','accounts','set_supplier_opening_balance','Approval workflow for setting supplier opening balances',1,'system','2025-12-13 23:49:18','2025-12-13 23:49:18','approval'),(51,'Three-Way Match Validation','accounts','perform_three_way_match','Workflow for three-way matching validation',1,'system','2025-12-13 23:49:19','2025-12-13 23:49:19','approval');

--
-- Dumping events for database 'hybrid_users'
--

--
-- Dumping routines for database 'hybrid_users'
--


