简体中文
flow.stage.task.action.before
约 164 字小于 1 分钟
2026-04-17
flow.stage.task.action.before
说明:该钩子用于任务动作执行前拦截。
一. isIntercept
功能描述
- 任务动作执行前拦截。
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| task | 当前任务信息 | Object |
| action | 当前动作信息 | Object |
| executionType | 执行类型 | String |
| propellerResult | 阶段推进器实例数据 | Object |
| stageData | 当前阶段数据 | Object |
返回结果
| 参数 | 说明 | 类型 |
|---|---|---|
| isIntercept | 是否拦截默认操作 | Boolean |
参数代码示例
let task = options && options.task;代码示例
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
return [
{
event: "flow.stage.task.action.before",
functional: async function (context, options) {
let task = options && options.task;
let action = options && options.action;
let executionType = options && options.executionType;
let propellerResult = options && options.propellerResult;
let stageData = options && options.stageData;
return Promise.resolve({
isIntercept: false
});
}
}
];
}
};
};