arvo-event-handler
    Preparing search index...

    Function createArvoResumable

    • Creates a new ArvoResumable orchestrator instance.

      Factory function that constructs a resumable workflow handler with automatic resource locking determination and contract validation. Validates that service contracts have unique URIs and no circular dependencies exist.

      Type Parameters

      • TMemory extends Record<string, any> = Record<string, any>
      • TSelfContract extends ArvoOrchestratorContract = ArvoOrchestratorContract
      • TServiceContract extends Record<string, VersionedArvoContract<any, any>> = Record<string, VersionedArvoContract<any, any>>

      Parameters

      Returns ArvoResumable<TMemory, TSelfContract, TServiceContract>

      Configured ArvoResumable instance ready for event handling

      When service contracts have duplicate URIs

      When circular dependency detected (self contract registered as service)

      const resumable = createArvoResumable({
      contracts: {
      self: myOrchestratorContract,
      services: {
      userService: userContract.version('1.0.0'),
      paymentService: paymentContract.version('1.0.0') }
      },
      memory: new SimpleMachineMemory(),
      handler: {
      '1.0.0': async ({ input, service, context }) => {
      // Handler implementation
      }
      },
      });