Member Junction
    Preparing search index...

    Draft Workflow Draft a workflow's steps from a plain-English description. Returns a TaskGraphSpec and persists NOTHING — the draft goes to the canvas for the author to review, and only Workflow.Save commits it, which is what makes the front door's "nothing is saved until you approve it" promise true rather than merely stated. Constrained to agents that actually exist on the instance, because a workflow referencing an unknown agent cannot be saved and a draft that cannot be saved wastes the author's time. Validated with the SAME ValidateTaskGraphSpec the canvas and Workflow.Save run, so a draft that comes back cannot be rejected later for a reason drafting never checked. Implemented by WorkflowDraftServerOperation in @memberjunction/task-graph. GenerationType=Manual — the server body is supplied by a hand-authored subclass registered under 'Workflow.Draft'. This generated base provides the typed contract only (client-safe).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ContractFingerprint: "ro_fp_7a54f25b89c43fef"

    Optional structural contract fingerprint emitted by CodeGen (or set by a hand-authored operation). Automatically forwarded on Execute when the caller didn't override options.contractFingerprint, allowing the server resolver to detect stale client bundles.

    ExecutionMode: "Sync" = ...

    Whether this operation is a plain Sync request/response or a LongRunning run.

    ExposeAsAgentTool?: boolean

    When true, exposes this operation for automatic discovery by MJ AI Agent tool adapters.

    ExposeAsMCPTool?: boolean

    When true, exposes this operation for automatic discovery by MJ MCP server tool adapters.

    OperationKey: "Workflow.Draft"

    Stable registry key and wire token for this operation (e.g. RecordProcess.RunNow).

    RequiredScope: "workflow:read"

    Optional API-key scope string (e.g. recordprocess:execute) enforced for API-key / MCP callers by the server resolver. undefined means no scope gate; interactive users remain bounded by their entity permissions. Informational here — the server applies it.

    RequiresSystemUser: false

    When true, the server only permits the system user to invoke this operation.

    ToolDescription?: string

    Human/LLM-readable description when exposed as an Agent or MCP tool.

    ToolInputSchema?: Record<string, RemoteOpToolSchemaValue>

    Optional JSON-Schema object describing TInput when exposed as an Agent or MCP tool.

    Methods

    • Per-operation authorization hook, composed with (and applied after) the framework gates that the server resolver runs. Returns true by default. Override to enforce operation-specific rules against the input, acting user, and server transport context (e.g. context.requestOrigin).

      Parameters

      Returns Promise<boolean>

      True if the operation may proceed.