(
blockId: string,
blockName: string,
blockType: string,
executionOrder: number,
iterationContext?: IterationContext,
childWorkflowContext?: ChildWorkflowContext
)
| 580 | } |
| 581 | |
| 582 | const wrappedOnBlockStart = ( |
| 583 | blockId: string, |
| 584 | blockName: string, |
| 585 | blockType: string, |
| 586 | executionOrder: number, |
| 587 | iterationContext?: IterationContext, |
| 588 | childWorkflowContext?: ChildWorkflowContext |
| 589 | ) => { |
| 590 | let persistenceSucceeded = false |
| 591 | const persistencePromise = (async () => { |
| 592 | await loggingSession.onBlockStart(blockId, blockName, blockType, new Date().toISOString()) |
| 593 | persistenceSucceeded = true |
| 594 | })().catch((error) => { |
| 595 | logger.warn(`[${requestId}] Block start persistence failed`, { |
| 596 | executionId, |
| 597 | blockId, |
| 598 | blockType, |
| 599 | error, |
| 600 | }) |
| 601 | }) |
| 602 | |
| 603 | const lifecyclePromise = (async () => { |
| 604 | await persistencePromise |
| 605 | if (!persistenceSucceeded || !onBlockStart) return |
| 606 | |
| 607 | try { |
| 608 | await onBlockStart( |
| 609 | blockId, |
| 610 | blockName, |
| 611 | blockType, |
| 612 | executionOrder, |
| 613 | iterationContext, |
| 614 | childWorkflowContext |
| 615 | ) |
| 616 | } catch (error) { |
| 617 | logger.warn(`[${requestId}] Block start callback failed`, { |
| 618 | executionId, |
| 619 | blockId, |
| 620 | blockType, |
| 621 | error, |
| 622 | }) |
| 623 | } |
| 624 | })() |
| 625 | |
| 626 | trackLifecycleCallback(lifecyclePromise) |
| 627 | return persistencePromise |
| 628 | } |
| 629 | |
| 630 | const largeValueExecutionIds = Array.from( |
| 631 | new Set( |
nothing calls this directly
no test coverage detected