| 41 | * 执行器是无状态的,状态存储在NodeRuntimeState中 |
| 42 | */ |
| 43 | export interface INodeExecutor { |
| 44 | /** |
| 45 | * 执行节点逻辑 |
| 46 | * |
| 47 | * @param context 执行上下文 |
| 48 | * @returns 执行结果状态 |
| 49 | */ |
| 50 | execute(context: NodeExecutionContext): TaskStatus; |
| 51 | |
| 52 | /** |
| 53 | * 重置节点状态(可选) |
| 54 | * |
| 55 | * 当节点完成或被中断时调用 |
| 56 | */ |
| 57 | reset?(context: NodeExecutionContext): void; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * 复合节点执行结果 |
no outgoing calls
no test coverage detected