English
Replacement approver enhancement
About 513 wordsAbout 2 min
2026-04-16
- In the approval workflow scenario, when the default "change approver" interaction (such as whether the change opinion is mandatory) cannot meet the business requirements, it can be enhanced by the approval details plugin mounting logic: the web end is customized before the change approver popup rendering; the mobile end is uniformly intercepted before the approval operation, and the approver related extension data is replaced through the context API setting. * *
Typical scenarios include:
- Web: dynamically control whether “Change Opinion” is required according to business rules (
setOpinionRequired) - Mobile: before the approval action is triggered, set * * Replace the processor reason * * through
setChangeApproverExtData, whether it is required, etc.
Applicable scenarios
Applicable to the scenario where "the Approval Detail page already exists, but the relevant verification or extension fields of the replacement processor need to be customized according to business rules"; the specific event parameters and examples are subject to the reference manual. The web is not the same as a mobile access point, so do not mix API names.
# Applicable Pages
- Approval Detail page (Replacement approver related capabilities: Web is the pop-up link; mobile is the hook before the approval operation, see the recommended entrance for details)
# When is it appropriate to do a replacement approver enhancement
If you are experiencing any of these needs, it is often a good idea to prioritize a change of approver enhancement:
- Web: Need to dynamically control whether “Change Opinion” is required based on process, node or role
- Mobile: need to insert logic before clicking on the approval related action, and set whether the reason for changing the processor is required (
setChangeApproverExtData), etc.
# Development Ideas
Replacement approver enhancements can often be broken down into three steps:
- Define the terminal:
approval.changeApprover.render.beforeis used for the web;flow.approval.action.beforeis used for the mobile terminal (before the approval operation, it is not a separate "change approver pop-up" event name) - Register the corresponding event or hook in the approval details plugin and call the API in the reference manual within the callback
- Publish the plugin and complete configuration and validation in the Target Approval Detail Scenario
DEVELOPMENT WORKFLOW
Confirm that the business is only effective in the "Change Processor" or the approval operation link related to it, so as to avoid confusion with the general opinion area capability.
Create the approval details plugin and register the portal:
- Mobile:
flow.approval.action.before
Implement according to the reference manual: use
setOpinionRequiredon the web side; callsetChangeApproverExtData(such as{ isRequired: true }) onoptions.contexton the mobile side, and returnisInterceptas required.Joint adjustment: cover scenarios such as required/non-required, abnormally closed pop-ups or interrupted operations.
Publish and configure the plugin.
# Recommended entrance
Next
- Pre-signing enhancement: Pre-signing enhancement
- Distinguish between components and plug-ins: View the Components Guide vs. Plug-ins Guide
