arvo-event-handler
    Preparing search index...

    Variable ArvoDomainConst

    ArvoDomain: {
        FROM_CURRENT_SUBJECT: "domain.event.current.subject";
        FROM_EVENT_CONTRACT: "domain.contract.inherit";
        FROM_PARENT_SUBJECT: "domain.parent.subject";
        FROM_SELF_CONTRACT: "domain.contract.self.inherit";
        FROM_TRIGGERING_EVENT: "domain.event.inherit";
        LOCAL: null;
        ORCHESTRATION_CONTEXT: "domain.orchestration.context";
    } = ...

    Symbolic constants for domain resolution in Arvo event emission.

    These can be passed into the domain array of an emitted ArvoEvent to indicate that the final domain should be dynamically resolved from a specific context.

    Type Declaration

    • ReadonlyFROM_CURRENT_SUBJECT: "domain.event.current.subject"

      Extract domain from the current event's subject.

      Parses the subject to retrieve execution.domain. Falls back to LOCAL if subject is not a valid ArvoOrchestrationSubject.

    • ReadonlyFROM_EVENT_CONTRACT: "domain.contract.inherit"

      Resolve domain from the event's contract.

      For orchestrators, uses the service contract's domain. For handlers, behaves the same as FROM_SELF_CONTRACT.

    • ReadonlyFROM_PARENT_SUBJECT: "domain.parent.subject"

      Extract domain from the parent orchestration subject.

      Parses the parent subject to retrieve execution.domain. Falls back to LOCAL if subject is not a valid ArvoOrchestrationSubject.

    • ReadonlyFROM_SELF_CONTRACT: "domain.contract.self.inherit"

      Resolve domain from the handler's contract.

      Uses handlerSelfContract.domain for all emitted events.

    • ReadonlyFROM_TRIGGERING_EVENT: "domain.event.inherit"

      Resolve domain from the triggering event's domain field.

      Preserves the domain context of the incoming event.

    • ReadonlyLOCAL: null

      Stay in the current execution context (null domain).

      Event remains local without crossing domain boundaries.

    • ReadonlyORCHESTRATION_CONTEXT: "domain.orchestration.context"

      Resolve domain based on orchestration context.

      Routes responses and completions back through the orchestration chain:

      • For handlers: routes back to the orchestration's domain
      • For child orchestrations: routes to parent's domain if different, LOCAL if same
      • For root orchestrations: routes to own domain if cross-domain call, LOCAL otherwise

      This is the recommended default for maintaining domain coherence in orchestration workflows.