English
flow.approval.opinion.candirect.complete.render.before
About 197 wordsLess than 1 minute
2025-11-24
This hook is used before the edit approval opinion dialog is rendered on the approval detail page. It is used to control whether the edit approval opinion dialog should appear.
Note: This hook is used before the edit approval opinion dialog is rendered on the approval detail page and is used to control whether the edit approval opinion dialog should appear.
canDirectCompleteTask
Complete the task directly without showing the edit approval opinion dialog.
Parameters
| Parameter | Description | Type |
|---|---|---|
| isCanDirectCompleteTask | Whether to complete the task directly without showing the edit approval opinion dialog true: yes false: no | Boolean |
Parameter Code Example
canDirectCompleteTask: trueCode Example
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
let self = this;
return [{
event: "flow.approval.opinion.candirect.complete.render.before",
functional: async function (context, options) {
return Promise.resolve({
canDirectCompleteTask: true, // passing true means the edit approval content dialog will not appear, and the task will be completed directly
});
}
}]
}
}
}
