arvo-event-handler 3.0.6 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ArvoEventHandler/helpers.d.ts +2 -2
- package/dist/ArvoEventHandler/index.d.ts +4 -4
- package/dist/ArvoEventHandler/index.js +13 -34
- package/dist/ArvoEventHandler/types.d.ts +5 -3
- package/dist/ArvoMachine/createMachine.d.ts +4 -2
- package/dist/ArvoMachine/createMachine.js +1 -1
- package/dist/ArvoMachine/types.d.ts +5 -1
- package/dist/ArvoOrchestrationUtils/createEmitableEvent.d.ts +30 -0
- package/dist/ArvoOrchestrationUtils/createEmitableEvent.js +160 -0
- package/dist/ArvoOrchestrationUtils/error.d.ts +18 -0
- package/dist/{ArvoOrchestrator → ArvoOrchestrationUtils}/error.js +14 -9
- package/dist/ArvoOrchestrationUtils/handlerErrors.d.ts +35 -0
- package/dist/ArvoOrchestrationUtils/handlerErrors.js +184 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionState.d.ts +11 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionState.js +7 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/acquireLockWithValidation.d.ts +8 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/acquireLockWithValidation.js +69 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/index.d.ts +40 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/index.js +228 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/validateAndParseSubject.d.ts +7 -0
- package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/validateAndParseSubject.js +25 -0
- package/dist/ArvoOrchestrationUtils/types.d.ts +1 -0
- package/dist/ArvoOrchestrationUtils/types.js +2 -0
- package/dist/ArvoOrchestrator/factory.js +13 -0
- package/dist/ArvoOrchestrator/index.d.ts +5 -21
- package/dist/ArvoOrchestrator/index.js +93 -505
- package/dist/ArvoOrchestrator/types.d.ts +5 -4
- package/dist/ArvoResumable/factory.d.ts +2 -2
- package/dist/ArvoResumable/factory.js +1 -1
- package/dist/ArvoResumable/index.d.ts +6 -20
- package/dist/ArvoResumable/index.js +85 -462
- package/dist/ArvoResumable/types.d.ts +8 -5
- package/dist/IArvoEventHandler/index.d.ts +36 -0
- package/dist/IArvoEventHandler/index.js +2 -0
- package/dist/MachineExecutionEngine/index.d.ts +1 -1
- package/dist/MachineRegistry/index.d.ts +1 -1
- package/dist/SyncEventResource/index.d.ts +1 -1
- package/dist/SyncEventResource/index.js +1 -1
- package/dist/index.d.ts +14 -13
- package/dist/index.js +24 -23
- package/dist/types.d.ts +2 -2
- package/dist/utils/SimpleEventBroker/helper.d.ts +2 -2
- package/package.json +5 -4
- package/dist/AbstractArvoEventHandler/index.d.ts +0 -91
- package/dist/AbstractArvoEventHandler/index.js +0 -18
- package/dist/ArvoOrchestrator/error.d.ts +0 -16
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { type ArvoContractRecord, type ArvoEvent
|
|
2
|
-
import type
|
|
3
|
-
import type { EnqueueArvoEventActionParam } from '../ArvoMachine/types';
|
|
1
|
+
import { type ArvoContractRecord, type ArvoEvent } from 'arvo-core';
|
|
2
|
+
import type IArvoEventHandler from '../IArvoEventHandler';
|
|
4
3
|
import type { IMachineExectionEngine } from '../MachineExecutionEngine/interface';
|
|
5
4
|
import type { IMachineMemory } from '../MachineMemory/interface';
|
|
6
5
|
import type { IMachineRegistry } from '../MachineRegistry/interface';
|
|
7
|
-
import type { IArvoOrchestrator, MachineMemoryRecord } from './types';
|
|
8
6
|
import { SyncEventResource } from '../SyncEventResource';
|
|
9
|
-
import AbstractArvoEventHandler from '../AbstractArvoEventHandler';
|
|
10
7
|
import type { ArvoEventHandlerOpenTelemetryOptions } from '../types';
|
|
8
|
+
import type { ArvoOrchestratorParam, MachineMemoryRecord } from './types';
|
|
11
9
|
/**
|
|
12
10
|
* Orchestrates state machine execution and lifecycle management.
|
|
13
11
|
* Handles machine resolution, state management, event processing and error handling.
|
|
14
12
|
*/
|
|
15
|
-
export declare class ArvoOrchestrator
|
|
13
|
+
export declare class ArvoOrchestrator implements IArvoEventHandler {
|
|
16
14
|
readonly executionunits: number;
|
|
17
15
|
readonly registry: IMachineRegistry;
|
|
18
16
|
readonly executionEngine: IMachineExectionEngine;
|
|
@@ -27,21 +25,7 @@ export declare class ArvoOrchestrator extends AbstractArvoEventHandler {
|
|
|
27
25
|
* @param params - Configuration parameters
|
|
28
26
|
* @throws Error if machines in registry have different sources
|
|
29
27
|
*/
|
|
30
|
-
constructor({ executionunits, memory, registry, executionEngine, requiresResourceLocking, systemErrorDomain, }:
|
|
31
|
-
/**
|
|
32
|
-
* Creates emittable event from execution result
|
|
33
|
-
* @param event - Source event to emit
|
|
34
|
-
* @param machine - Machine that generated event
|
|
35
|
-
* @param otelHeaders - OpenTelemetry headers
|
|
36
|
-
* @param orchestrationParentSubject - Parent orchestration subject
|
|
37
|
-
* @param sourceEvent - Original triggering event
|
|
38
|
-
* @param initEventId - The id of the event which initiated the orchestration in the first place
|
|
39
|
-
* @param _domain - The domain of the event.
|
|
40
|
-
*
|
|
41
|
-
* @throws {ContractViolation} On schema/contract mismatch
|
|
42
|
-
* @throws {ExecutionViolation} On invalid parentSubject$$ format
|
|
43
|
-
*/
|
|
44
|
-
protected createEmittableEvent(event: EnqueueArvoEventActionParam, machine: ArvoMachine<any, any, any, any, any>, otelHeaders: OpenTelemetryHeaders, orchestrationParentSubject: string | null, sourceEvent: ArvoEvent, initEventId: string, _domain: string | null): ArvoEvent;
|
|
28
|
+
constructor({ executionunits, memory, registry, executionEngine, requiresResourceLocking, systemErrorDomain, }: ArvoOrchestratorParam);
|
|
45
29
|
/**
|
|
46
30
|
* Core orchestration method that executes state machines in response to events.
|
|
47
31
|
*
|