Edit

Typed workflow action interfaces

Namespace: Microsoft.Azure.Workflows.Sdk

Provides type-safe interfaces for workflow actions with strongly typed output contracts for body and structured output access. These interfaces extend IWorkflowAction so downstream actions can reference outputs through expression-friendly properties.

Usage

// IBodyWorkflowAction<T> - used with HTTP actions
IBodyWorkflowAction<JToken> httpAction = WorkflowActions.BuiltIn.HttpAction(
    uri: () => new Uri("https://api.example.com/data"),
    method: () => HttpMethod.Get).WithName("FetchData");

var compose = WorkflowActions.BuiltIn.Compose(inputs: () => $"Result: {httpAction.Body}").WithName("Format");

// IOutputWorkflowAction<T> - used with Compose actions
IOutputWorkflowAction<JToken> composeAction = WorkflowActions.BuiltIn.Compose(
    inputs: () => "Hello, World!").WithName("Greeting");

var response = WorkflowActions.BuiltIn.Response(
    responseBody: () => $"{composeAction.Output}").WithName("Reply");

IBodyWorkflowAction<T>

Represents a typed workflow action whose primary output is exposed through a strongly typed body property.

Properties

Name Description Type Required
Body Gets the strongly typed body output produced by the action. T No

Methods

This type implements Then() methods from IChainableNode. See that page for full documentation of all overloads.

IOutputWorkflowAction<T>

Represents a typed workflow action whose primary output is exposed as a strongly typed structured value.

Properties

Name Description Type Required
Output Gets the strongly typed structured output produced by the action. T No

Methods

This type implements Then() methods from IChainableNode. See that page for full documentation of all overloads.