审批流执行提示错误

新建了审批事件


在执行通过或驳回时,都提示错误。用的是外挂mysql数据源。
驳回提示:Cannot read properties of undefined (reading ‘commit’)
通过提示:commit has been called on this transaction(76dea495-60f2-4f30-88da-8f1e16682300), you can no longer use it. (The rejected query is attached as the ‘sql’ property of this error)

这是什么问题?数据库事务执行错误?用的是root用户。

具体错误:
{“log”:“{"level":"error","message":"commit has been called on this transaction(5f134e47-bc4a-44f0-b373-b3a9143568b2), you can no longer use it. (The rejected query is attached as the ‘sql’ property of this error)","meta":{"err":"Error: commit has been called on this transaction(5f134e47-bc4a-44f0-b373-b3a9143568b2), you can no longer use it. (The rejected query is attached as the ‘sql’ property of this error)\n at checkTransaction (/app/nocobase/node_modules/sequelize/lib/sequelize.js:294:23)\n at /app/nocobase/node_modules/sequelize/lib/sequelize.js:304:7\n at /app/nocobase/node_modules/retry-as-promised/dist/index.js:65:25\n at new Promise (\u003canonymous\u003e)\n at retryAsPromised (/app/nocobase/node_modules/retry-as-promised/dist/index.js:54:12)\n at Sequelize.query (/app/nocobase/node_modules/sequelize/lib/sequelize.js:300:12)\n at MySQLQueryInterface.update (/app/nocobase/node_modules/sequelize/lib/dialects/abstract/query-interface.js:355:33)\n at model.save (/app/nocobase/node_modules/sequelize/lib/model.js:2490:79)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async model.update (/app/nocobase/node_modules/sequelize/lib/model.js:2598:12)\n at async submit (/app/nocobase/storage/plugins/@nocobase/plugin-workflow-approval/dist/server/actions/approvalRecords.js:164:7)\n at async triggerWorkflowActionMiddleware (/app/nocobase/node_modules/@nocobase/plugin-workflow-action-trigger/dist/server/ActionTrigger.js:61:7)\n at async middleware (/app/nocobase/storage/plugins/@nocobase/plugin-workflow-approval/dist/server/ApprovalTrigger.js:252:5)\n at async dataTemplate (/app/nocobase/node_modules/@nocobase/server/lib/middlewares/data-template.js:36:3)\n at async app.acl.use.after (/app/nocobase/node_modules/@nocobase/plugin-acl/dist/server/server.js:534:9)\n at async middlewares.add.tag (/app/nocobase/node_modules/@nocobase/acl/lib/acl.js:398:9)"},"module":"approvalRecords","submodule":"submit","method":"error-handler","app":"main","reqId":"9000f68f-1410-4f7b-b4ba-d751e34b5985","dataSourceKey":"main","timestamp":"2025-03-12 17:59:06"}\n”,“stream”:“stdout”,“time”:“2025-03-12T09:59:06.593695059Z”}
{“log”:“{"level":"error","message":"response /api/approvalRecords:submit?filterByTk=15","method":"POST","path":"/api/approvalRecords:submit?filterByTk=15","res":[{"message":"commit has been called on this transaction(5f134e47-bc4a-44f0-b373-b3a9143568b2), you can no longer use it. (The rejected query is attached as the ‘sql’ property of this error)"}],"action":{"actionName":"submit","resourceName":"approvalRecords","params":{"filterByTk":"15","resourceName":"approvalRecords","actionName":"submit","values":{"status":2,"data":{"ID":"1","LOT_ID":"1001","CONTRACT_ID":"HD","PRODUCTS_ID":"111","DPVPS_EXPEND":null,"STCDC_EXPEND":null,"COUPON_EXPEND":null}}}},"userId":4,"status":500,"cost":12,"app":"main","reqId":"9000f68f-1410-4f7b-b4ba-d751e34b5985","bodySize":203,"timestamp":"2025-03-12 17:59:06"}\n”,“stream”:“stdout”,“time”:“2025-03-12T09:59:06.594004575Z”}

好的,我们排查一下这个情况。

该问题已修复,可以更新至 1.6.3。

1 Like