# Class WorkflowOrchestratorAdapter

Adapter that wraps IWorkflowEngine with IOrchestrator interface.

This adapter bridges the workflow-specific interface to the canonical orchestrator interface, enabling workflow-based orchestration through the unified IOrchestrator contract.

#### Implements

- IOrchestrator

- Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:62

##### Index

### Constructors

constructor

### Properties

id
type

### Methods

execute
getStatus
cancel
getHistory

## Constructors

### constructor

- new WorkflowOrchestratorAdapter(
  engine: IWorkflowEngine,
  logger?: ILogger,
  ): WorkflowOrchestratorAdapter

  #### Parameters

  - engine: IWorkflowEngine
  - `Optional` logger: ILogger

  #### Returns WorkflowOrchestratorAdapter

  - Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:71

## Properties

### `Readonly` id

id: string

Unique orchestrator instance ID

Implementation of IOrchestrator.id

- Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:63

### `Readonly` type

type: OrchestratorType = 'workflow'

Orchestrator type

Implementation of IOrchestrator.type

- Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:64

## Methods

### execute

- execute(
  definition: OrchestratorDefinition,
  inputs: Record<string, unknown>,
  _options?: OrchestratorExecuteOptions,
  ): Promise<Result<OrchestratorResult, OrchestratorError>>

  Execute an orchestration.

  #### Parameters

  - definition: OrchestratorDefinition

    What to orchestrate (task, workflow, or policy)

  - inputs: Record<string, unknown>

    Input values for the orchestration

  - `Optional`_options: OrchestratorExecuteOptions

  #### Returns Promise<Result<OrchestratorResult, OrchestratorError>>

  Result with OrchestratorResult or OrchestratorError

  Implementation of IOrchestrator.execute

  - Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:77

### getStatus

- getStatus(executionId: string): ExecutionStatus

  Get status of an execution.

  #### Parameters

  - executionId: string

    Execution ID to check

  #### Returns ExecutionStatus

  Current execution status

  Implementation of IOrchestrator.getStatus

  - Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:176

### cancel

- cancel(
  executionId: string,
  reason?: string,
  ): Promise<Result<void, OrchestratorError>>

  Cancel a running execution.

  #### Parameters

  - executionId: string

    Execution ID to cancel

  - `Optional` reason: string

    Optional cancellation reason

  #### Returns Promise<Result<void, OrchestratorError>>

  Result with void or OrchestratorError

  Implementation of IOrchestrator.cancel

  - Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:180

### getHistory

- getHistory(limit?: number): OrchestratorResult[]

  Get execution history. Optional - for orchestrators that track history.

  #### Parameters

  - `Optional` limit: number

    Maximum number of executions to return

  #### Returns OrchestratorResult[]

  Array of past execution results

  Implementation of IOrchestrator.getHistory

  - Defined in packages/nexus-agents/src/orchestration/orchestrator-factory.ts:213