StellaOps.Workflow.Transport.Http

HTTP transports of the workflow engine: the http kind calls a configured target over HttpClient, and the endpoint kind resolves a service name, method and path to a configured base URL.

library
Component
Workflow
Licence
BUSL-1.1 (Workflow licence)
Target framework
net10.0
Latest release
1.0.1-20261118T121708Z

Install

dotnet add package StellaOps.Workflow.Transport.Http --version 1.0.1-20261118T121708Z

Namespaces

NamespaceTypes
StellaOps.Workflow.Transport.Http9

namespace StellaOps.Workflow.Transport.Http

TypeKindDescription
FailureTranslatingWorkflowEndpointTransportclassThe registered IWorkflowEndpointTransport: WorkflowEndpointTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable service or an open circuit breaker answered as a failed response.
FailureTranslatingWorkflowHttpTransportclassThe registered IWorkflowHttpTransport: WorkflowHttpTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.
HttpWorkflowTransportRoutineclassDependency-injection routine of the Http transport.
WorkflowEndpointTransportclassCalls the HTTP endpoint of a named service ("$type": "endpoint").
WorkflowEndpointTransportOptionsclassBase addresses of the services that endpoint calls name, bound from WorkflowEndpointTransportOptions.SectionName: WorkflowEndpointTransport:Services:<service name>:Url, with optional headers per service.
WorkflowHttpTargetOptionsclassOne HTTP target or service: its base URL and the headers every call sends.
WorkflowHttpTransportclassNo description.
WorkflowHttpTransportOptionsclassTargets and retries of http calls (WorkflowHttpTransport): WorkflowHttpTransport:Targets:<target>:Url, with optional headers per target.
WorkflowHttpTransportServiceCollectionExtensionsclassRegisters the HTTP and endpoint transports of the Workflow engine.

class FailureTranslatingWorkflowEndpointTransport

public sealed class FailureTranslatingWorkflowEndpointTransport : IWorkflowEndpointTransport

The registered IWorkflowEndpointTransport: WorkflowEndpointTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable service or an open circuit breaker answered as a failed response.

Members

MemberKindSummary
FailureTranslatingWorkflowEndpointTransport(WorkflowEndpointTransport, ILogger<FailureTranslatingWorkflowEndpointTransport>)constructorThe registered IWorkflowEndpointTransport: WorkflowEndpointTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable service or an open circuit breaker answered as a failed response.
ExecuteAsync(WorkflowEndpointRequest, CancellationToken)methodSends the request and returns the response.

constructor FailureTranslatingWorkflowEndpointTransport(WorkflowEndpointTransport, ILogger<FailureTranslatingWorkflowEndpointTransport>) #

public FailureTranslatingWorkflowEndpointTransport(WorkflowEndpointTransport inner, ILogger<FailureTranslatingWorkflowEndpointTransport> logger)

The registered IWorkflowEndpointTransport: WorkflowEndpointTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable service or an open circuit breaker answered as a failed response.

method ExecuteAsync(WorkflowEndpointRequest, CancellationToken) #

public Task<WorkflowEndpointResponse> ExecuteAsync(WorkflowEndpointRequest request, CancellationToken cancellationToken = default)

Sends the request and returns the response. A failure, such as a non-success status or a target that is not configured, is a response that did not succeed; a call that does not answer in time raises a TimeoutException.

Parameters

  • request: The endpoint request.
  • cancellationToken: Cancels the operation.

Returns

The response.

class FailureTranslatingWorkflowHttpTransport

public sealed class FailureTranslatingWorkflowHttpTransport : IWorkflowHttpTransport

The registered IWorkflowHttpTransport: WorkflowHttpTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.

Members

MemberKindSummary
FailureTranslatingWorkflowHttpTransport(WorkflowHttpTransport, ILogger<FailureTranslatingWorkflowHttpTransport>)constructorThe registered IWorkflowHttpTransport: WorkflowHttpTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.
ExecuteAsync(WorkflowHttpRequest, CancellationToken)methodSends the request and returns the response.

constructor FailureTranslatingWorkflowHttpTransport(WorkflowHttpTransport, ILogger<FailureTranslatingWorkflowHttpTransport>) #

public FailureTranslatingWorkflowHttpTransport(WorkflowHttpTransport inner, ILogger<FailureTranslatingWorkflowHttpTransport> logger)

The registered IWorkflowHttpTransport: WorkflowHttpTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.

method ExecuteAsync(WorkflowHttpRequest, CancellationToken) #

public Task<WorkflowHttpResponse> ExecuteAsync(WorkflowHttpRequest request, CancellationToken cancellationToken = default)

Sends the request and returns the response. A failure, such as a non-success status or a target that is not configured, is a response that did not succeed; a call that does not answer in time raises a TimeoutException.

Parameters

  • request: The HTTP request.
  • cancellationToken: Cancels the operation.

Returns

The response.

class HttpWorkflowTransportRoutine

public sealed class HttpWorkflowTransportRoutine : IDependencyInjectionRoutine

Dependency-injection routine of the Http transport. A host that loads this assembly as a plug-in discovers the routine; it registers exactly what WorkflowHttpTransportServiceCollectionExtensions.AddWorkflowHttpTransport(IServiceCollection, IConfiguration)registers.

Members

MemberKindSummary
HttpWorkflowTransportRoutine()constructorCreates an instance of HttpWorkflowTransportRoutine.
Register(IServiceCollection, IConfiguration)methodRegisters what WorkflowHttpTransportServiceCollectionExtensions.AddWorkflowHttpTransport(IServiceCollection, IConfiguration)registers.

constructor HttpWorkflowTransportRoutine() #

public HttpWorkflowTransportRoutine()

Creates an instance of HttpWorkflowTransportRoutine.

method Register(IServiceCollection, IConfiguration) #

public IServiceCollection Register(IServiceCollection services, IConfiguration configuration)

Registers what WorkflowHttpTransportServiceCollectionExtensions.AddWorkflowHttpTransport(IServiceCollection, IConfiguration)registers.

Parameters

  • services: The service collection.
  • configuration: The host configuration.

Returns

The same service collection.

class WorkflowEndpointTransport

public sealed class WorkflowEndpointTransport : IWorkflowEndpointTransport

Calls the HTTP endpoint of a named service ("$type": "endpoint"). The service name resolves to a base address through WorkflowEndpointTransportOptions.Services; the request goes to that address joined with the path, with the declared method, over the same named HTTP client and resilience pipeline as WorkflowHttpTransport.

Members

MemberKindSummary
WorkflowEndpointTransport(IHttpClientFactory, IOptions<WorkflowEndpointTransportOptions>, ILogger<WorkflowEndpointTransport>)constructorCalls the HTTP endpoint of a named service ("$type": "endpoint").
ExecuteAsync(WorkflowEndpointRequest, CancellationToken)methodNo description.

constructor WorkflowEndpointTransport(IHttpClientFactory, IOptions<WorkflowEndpointTransportOptions>, ILogger<WorkflowEndpointTransport>) #

public WorkflowEndpointTransport(IHttpClientFactory httpClientFactory, IOptions<WorkflowEndpointTransportOptions> options, ILogger<WorkflowEndpointTransport> logger)

Calls the HTTP endpoint of a named service ("$type": "endpoint"). The service name resolves to a base address through WorkflowEndpointTransportOptions.Services; the request goes to that address joined with the path, with the declared method, over the same named HTTP client and resilience pipeline as WorkflowHttpTransport.

method ExecuteAsync(WorkflowEndpointRequest, CancellationToken) #

public Task<WorkflowEndpointResponse> ExecuteAsync(WorkflowEndpointRequest request, CancellationToken cancellationToken = default)

No description.

class WorkflowEndpointTransportOptions

public sealed class WorkflowEndpointTransportOptions

Base addresses of the services that endpoint calls name, bound from WorkflowEndpointTransportOptions.SectionName: WorkflowEndpointTransport:Services:<service name>:Url, with optional headers per service. A call that names a service not listed here is refused.

Members

MemberKindSummary
WorkflowEndpointTransportOptions()constructorCreates an instance of WorkflowEndpointTransportOptions.
SectionNameconstantThe configuration section the options bind from: WorkflowEndpointTransport.
ServicespropertyThe services that endpoint calls name, by name; names compare ignoring case.

constructor WorkflowEndpointTransportOptions() #

public WorkflowEndpointTransportOptions()

Creates an instance of WorkflowEndpointTransportOptions.

constant SectionName #

public const string SectionName = "WorkflowEndpointTransport"

The configuration section the options bind from: WorkflowEndpointTransport.

property Services #

public IDictionary<string, WorkflowHttpTargetOptions> Services { get; set; }

The services that endpoint calls name, by name; names compare ignoring case.

class WorkflowHttpTargetOptions

public sealed class WorkflowHttpTargetOptions

One HTTP target or service: its base URL and the headers every call sends.

Members

MemberKindSummary
WorkflowHttpTargetOptions()constructorCreates an instance of WorkflowHttpTargetOptions.
HeaderspropertyHeaders sent with every call to the target.
UrlpropertyThe base URL of the target.

constructor WorkflowHttpTargetOptions() #

public WorkflowHttpTargetOptions()

Creates an instance of WorkflowHttpTargetOptions.

property Headers #

public IDictionary<string, string> Headers { get; set; }

Headers sent with every call to the target.

property Url #

public string Url { get; set; }

The base URL of the target.

class WorkflowHttpTransport

public sealed class WorkflowHttpTransport : IWorkflowHttpTransport

No description.

Members

MemberKindSummary
WorkflowHttpTransport(IHttpClientFactory, IOptions<WorkflowHttpTransportOptions>, ILogger<WorkflowHttpTransport>)constructorNo description.
HttpClientNameconstantNo description.
ExecuteAsync(WorkflowHttpRequest, CancellationToken)methodNo description.

constructor WorkflowHttpTransport(IHttpClientFactory, IOptions<WorkflowHttpTransportOptions>, ILogger<WorkflowHttpTransport>) #

public WorkflowHttpTransport(IHttpClientFactory httpClientFactory, IOptions<WorkflowHttpTransportOptions> options, ILogger<WorkflowHttpTransport> logger)

No description.

constant HttpClientName #

public const string HttpClientName = "workflow-http-transport"

No description.

method ExecuteAsync(WorkflowHttpRequest, CancellationToken) #

public Task<WorkflowHttpResponse> ExecuteAsync(WorkflowHttpRequest request, CancellationToken cancellationToken = default)

No description.

class WorkflowHttpTransportOptions

public sealed class WorkflowHttpTransportOptions

Targets and retries of http calls (WorkflowHttpTransport): WorkflowHttpTransport:Targets:<target>:Url, with optional headers per target.

Members

MemberKindSummary
WorkflowHttpTransportOptions()constructorCreates an instance of WorkflowHttpTransportOptions.
SectionNameconstantThe configuration section the options bind from: WorkflowHttpTransport.
RetryCountpropertyRetries of a failed attempt in the resilience pipeline.
TargetspropertyThe targets that http calls name, by name; names compare ignoring case.
TimeoutSecondspropertyTransport-level timeout in seconds for HTTP calls.

constructor WorkflowHttpTransportOptions() #

public WorkflowHttpTransportOptions()

Creates an instance of WorkflowHttpTransportOptions.

constant SectionName #

public const string SectionName = "WorkflowHttpTransport"

The configuration section the options bind from: WorkflowHttpTransport.

property RetryCount #

public int RetryCount { get; set; }

Retries of a failed attempt in the resilience pipeline. The default is 3.

property Targets #

public IDictionary<string, WorkflowHttpTargetOptions> Targets { get; set; }

The targets that http calls name, by name; names compare ignoring case. A call to a target not listed here fails.

property TimeoutSeconds #

public int? TimeoutSeconds { get; set; }

Transport-level timeout in seconds for HTTP calls. Null means no transport-level override; per-step timeout or the engine default (1 hour) applies. When set, overrides the per-step default.

class WorkflowHttpTransportServiceCollectionExtensions

public static class WorkflowHttpTransportServiceCollectionExtensions

Registers the HTTP and endpoint transports of the Workflow engine.

Members

MemberKindSummary
AddWorkflowHttpTransport(IServiceCollection, IConfiguration)extension methodRegisters WorkflowHttpTransportas the IWorkflowHttpTransport, with its named HTTP client and resilience pipeline, from the {WorkflowHttpTransportOptions.SectionName} section.

extension method AddWorkflowHttpTransport(IServiceCollection, IConfiguration) #

public static IServiceCollection AddWorkflowHttpTransport(this IServiceCollection services, IConfiguration configuration)

Registers WorkflowHttpTransportas the IWorkflowHttpTransport, with its named HTTP client and resilience pipeline, from the {WorkflowHttpTransportOptions.SectionName} section.