(
blockId: string,
blockName: string,
blockType: string,
executionOrder: number,
iterationContext?: IterationContext,
childWorkflowContext?: ChildWorkflowContext
)
| 287 | } |
| 288 | |
| 289 | const onBlockStart = async ( |
| 290 | blockId: string, |
| 291 | blockName: string, |
| 292 | blockType: string, |
| 293 | executionOrder: number, |
| 294 | iterationContext?: IterationContext, |
| 295 | childWorkflowContext?: ChildWorkflowContext |
| 296 | ) => { |
| 297 | await sendBufferedEvent({ |
| 298 | type: 'block:started', |
| 299 | timestamp: new Date().toISOString(), |
| 300 | executionId, |
| 301 | workflowId, |
| 302 | data: { |
| 303 | blockId, |
| 304 | blockName, |
| 305 | blockType, |
| 306 | executionOrder, |
| 307 | ...(iterationContext && { |
| 308 | iterationCurrent: iterationContext.iterationCurrent, |
| 309 | iterationTotal: iterationContext.iterationTotal, |
| 310 | iterationType: iterationContext.iterationType, |
| 311 | iterationContainerId: iterationContext.iterationContainerId, |
| 312 | ...(iterationContext.parentIterations?.length && { |
| 313 | parentIterations: iterationContext.parentIterations, |
| 314 | }), |
| 315 | }), |
| 316 | ...(childWorkflowContext && { |
| 317 | childWorkflowBlockId: childWorkflowContext.parentBlockId, |
| 318 | childWorkflowName: childWorkflowContext.workflowName, |
| 319 | }), |
| 320 | }, |
| 321 | }) |
| 322 | } |
| 323 | |
| 324 | const onBlockComplete = async ( |
| 325 | blockId: string, |
no test coverage detected