English
Approval comments are required
About 423 wordsAbout 1 min
2026-05-08
- Approval comments are required if the Business Flow Approval Node agrees or disagrees. * *
Description
The Business Flow approval node does not support the required configuration of approval comments by default. Approval comments are required when consent/rejection can be achieved through the plug-in.
# Example of a typical scenario
- Scenario 1 * *: approval comments are required when agreeing Ex: When the amount exceeds the threshold, the approval comment must be filled in for the consent action
- Scenario 2 * *: Approval comments required for rejection Ex: Rejection Action must select or fill in Rejection Reason
- Scenario 3 * *: Conditional judgment is required Ex: Required based on amount and task type
Applicable Scenario
- Approval comments are required to be mandatory at the approval node
- Special business scenarios need to record the reason for the approval decision
- Whether or not comments are required to be dynamically set according to the amount, task type, etc.
# Applicable Pages
- Business Flow Details Page - On Approval Action
# Development Ideas
Enhancements can often be broken down into three steps:
- Identify which link to enhance * *
- Determine which actions are required (consent/rejection)
- Determine what's required
- Select the appropriate extension event/hook * *
- Mobile: via
flow.bpm.task.action.before - Web:
bpm.process.render.before
- Access the extension point in the plugin and verify the behavior * *
- Call
api.agreeOpinionRequired()setting consent is required - Call
api.rejectOpinionRequired()to set disagreement required
DEVELOPMENT WORKFLOW
- Clarify mandatory business rules * *
- Determine which actions are required
- Determine what's required
- Required logic for writing comments * *
// Web-side example module.exports = class Plugins { apply() { return [{ event: 'bpm.process.render.before', functional: this.bpmProcessRenderBefore.bind(this) }]; } bpmProcessRenderBefore(api) { let taskData = api.getTaskData(); if (taskData.amount > 100000 || taskData.isImportant) { api.agreeOpinionRequired(); } api.rejectOpinionRequired(); } }; //Examples on mobile module.exports = function (context, pluginService, pluginParam) { return { apply() { return [ { event: "flow.bpm.task.action.before", functional: async function (context, options) { let action = options && options.action; let bpmTaskDetail = options && options.bpmTaskDetail; let pluginContext = options && options.context; //Is consent required pluginContext.agreeOpinionRequired(isRequire) //Whether the rejection is required pluginContext.rejectOpinionRequired(isRequire) return Promise.resolve({ isIntercept: false, }); } } ]; } }; }- Configure the plugin * *
- Select the corresponding plugin in the custom plugin configuration
# Recommended entrance
Caution
- Product status * *: Business Flow approval nodes currently do not support required configurations, this function is implemented through plug-ins
- User experience * *: Required comments will affect the efficiency of the approval, it is recommended to enable it only if necessary
- Prompt message * *: It is recommended to cooperate with the UI prompt to inform the user why they need to fill in the comments
