English
flow.approval.action.before
About 111 wordsLess than 1 minute
2026-04-17
flow.approval.action.before
Description: This hook is used to intercept before an approval to-do action is executed or supplement context.
1. isIntercept
Feature Description
- Intercepts before an approval to-do action is executed or supplements context.
Parameters
| Parameter | Description | Type |
|---|---|---|
| action | Current action information | Object |
| context | Context capabilities passed through to the plugin | Object |
Return Value
| Parameter | Description | Type |
|---|---|---|
| isIntercept | Whether to intercept the default action | Boolean |
Parameter Code Example
let action = options && options.action;Code Example
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
return [
{
event: "flow.approval.action.before",
functional: async function (context, options) {
let action = options && options.action;
let pluginContext = options && options.context;
return Promise.resolve({
isIntercept: false
});
}
}
];
}
};
};