StellaOps.Workflow.Engine
Workflow engine: definition deployment, instance lifecycle, signal-driven task transitions, dead-letter handling and retention. Install Installing Stella Ops packagesWorkflow downloads and signaturesnet10.01.0.1-20261118T121708Zdotnet add package StellaOps.
Namespaces
namespace StellaOps.Workflow.Engine.Authorization
| Type | Kind | Description |
|---|---|---|
WorkflowTaskAuthorizationService | class | Decides whether an actor may act on a task, through the registered assignment permission evaluator. |
class WorkflowTaskAuthorizationService
public sealed class WorkflowTaskAuthorizationService
Decides whether an actor may act on a task, through the registered assignment permission evaluator.
Parameters
permissionEvaluator: The evaluator.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowTaskAuthorizationService( | constructor | Decides whether an actor may act on a task, through the registered assignment permission evaluator. |
Evaluate( | method | Evaluates an assignment permission. |
constructor WorkflowTaskAuthorizationService(IWorkflowAssignmentPermissionEvaluator) #
WorkflowTaskAuthorizationService(IWorkflowAssignmentPermissionEvaluator) #public WorkflowTaskAuthorizationService(IWorkflowAssignmentPermissionEvaluator permissionEvaluator)
Decides whether an actor may act on a task, through the registered assignment permission evaluator.
Parameters
permissionEvaluator: The evaluator.
method Evaluate(WorkflowAssignmentPermissionContext) #
Evaluate(WorkflowAssignmentPermissionContext) #public WorkflowAssignmentPermissionDecision Evaluate(WorkflowAssignmentPermissionContext context)
Evaluates an assignment permission.
Parameters
context: The actor, the task and the action.
Returns
The decision.
namespace StellaOps.Workflow.Engine.Children
| Type | Kind | Description |
|---|---|---|
WorkflowChildExecutionService | class | Records child workflow links: their start and completion, each with an outbox message for the parent, and their cancellation. |
WorkflowChildLinkResult | record | The link between a parent step and its child. |
WorkflowCompleteChildRequest | record | A finished child workflow and its result. |
WorkflowStartChildRequest | record | A child workflow to start and link to its parent step. |
class WorkflowChildExecutionService
public sealed class WorkflowChildExecutionService
Records child workflow links: their start and completion, each with an outbox message for the parent, and their cancellation.
Parameters
store: The child link store.timeProvider: The clock.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowChildExecutionService( | constructor | Records child workflow links: their start and completion, each with an outbox message for the parent, and their cancellation. |
CancelAsync( | method | Cancels a link. |
CompleteAsync( | method | Records a child result, canonicalized, with a WORKFLOW_ outbox message. |
StartAsync( | method | Records a child start with a WORKFLOW_CHILD_START outbox message. |
constructor WorkflowChildExecutionService(IWorkflowChildLinkStore, TimeProvider) #
WorkflowChildExecutionService(IWorkflowChildLinkStore, TimeProvider) #public WorkflowChildExecutionService(IWorkflowChildLinkStore store, TimeProvider timeProvider)
Records child workflow links: their start and completion, each with an outbox message for the parent, and their cancellation.
Parameters
store: The child link store.timeProvider: The clock.
method CancelAsync(string, long, CancellationToken) #
CancelAsync(string, long, CancellationToken) #public Task<WorkflowChildLinkResult> CancelAsync(string linkId, long expectedVersion, CancellationToken cancellationToken = default)
Cancels a link. A completed or canceled link is returned as replayed.
Parameters
linkId: The link.expectedVersion: The link version the caller read.cancellationToken: Cancels the operation.
Returns
The link.
Exceptions
WorkflowStoreConcurrencyException: The link version differs.Invalid: The link does not exist.Operation Exception
method CompleteAsync(WorkflowCompleteChildRequest, CancellationToken) #
CompleteAsync(WorkflowCompleteChildRequest, CancellationToken) #public Task<WorkflowChildLinkResult> CompleteAsync(WorkflowCompleteChildRequest request, CancellationToken cancellationToken = default)
Records a child result, canonicalized, with a WORKFLOW_ outbox message. A repeated completion with the same result hash is returned as replayed.
Parameters
request: The child result.cancellationToken: Cancels the operation.
Returns
The link.
Exceptions
Invalid: The hash does not match the result, the link does not exist or names another child, a completed link has another result, or the link was canceled.Operation Exception
method StartAsync(WorkflowStartChildRequest, CancellationToken) #
StartAsync(WorkflowStartChildRequest, CancellationToken) #public Task<WorkflowChildLinkResult> StartAsync(WorkflowStartChildRequest request, CancellationToken cancellationToken = default)
Records a child start with a WORKFLOW_CHILD_START outbox message. A start already recorded under the link is returned as replayed when it names the same child and request hash.
Parameters
request: The child start.cancellationToken: Cancels the operation.
Returns
The link.
Exceptions
ArgumentException: An identifier is missing, or the request hash is not 64 hexadecimal characters.Invalid: A start recorded under the link names another child or request hash.Operation Exception
record WorkflowChildLinkResult
public sealed record WorkflowChildLinkResult
The link between a parent step and its child.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowChildLinkResult( | constructor | Creates an instance of Workflow. |
ChildWorkflowExecutionId | property | The child execution. |
LinkId | property | The link. |
Replayed | property | Whether the operation had already been applied and was returned as recorded. |
Status | property | The link status. |
constructor WorkflowChildLinkResult() #
WorkflowChildLinkResult() #public WorkflowChildLinkResult()
Creates an instance of Workflow.
property ChildWorkflowExecutionId #
ChildWorkflowExecutionId #public required string ChildWorkflowExecutionId { get; init; }
The child execution.
property LinkId #
LinkId #public required string LinkId { get; init; }
The link.
property Replayed #
Replayed #public required bool Replayed { get; init; }
Whether the operation had already been applied and was returned as recorded.
property Status #
Status #public required string Status { get; init; }
The link status.
record WorkflowCompleteChildRequest
public sealed record WorkflowCompleteChildRequest
A finished child workflow and its result.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowCompleteChildRequest( | constructor | Creates an instance of Workflow. |
ChildWorkflowExecutionId | property | The child execution. |
LinkId | property | The link. |
ResultDescriptorJson | property | The child result descriptor, as JSON. |
ResultSha256 | property | The SHA-256 of the result. |
constructor WorkflowCompleteChildRequest() #
WorkflowCompleteChildRequest() #public WorkflowCompleteChildRequest()
Creates an instance of Workflow.
property ChildWorkflowExecutionId #
ChildWorkflowExecutionId #public required string ChildWorkflowExecutionId { get; init; }
The child execution.
property LinkId #
LinkId #public required string LinkId { get; init; }
The link.
property ResultDescriptorJson #
ResultDescriptorJson #public required string ResultDescriptorJson { get; init; }
The child result descriptor, as JSON.
property ResultSha256 #
ResultSha256 #public required string ResultSha256 { get; init; }
The SHA-256 of the result.
record WorkflowStartChildRequest
public sealed record WorkflowStartChildRequest
A child workflow to start and link to its parent step.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStartChildRequest( | constructor | Creates an instance of Workflow. |
ChildDefinitionCode | property | The child workflow. |
ChildDefinitionVersion | property | The child workflow version. |
ChildWorkflowExecutionId | property | The child execution. |
LinkId | property | The link. |
ParentScopeExecutionId | property | The parent scope. |
ParentStepExecutionId | property | The parent step. |
ParentWorkflowExecutionId | property | The parent execution. |
StartRequestSha256 | property | The SHA-256 of the child start request. |
constructor WorkflowStartChildRequest() #
WorkflowStartChildRequest() #public WorkflowStartChildRequest()
Creates an instance of Workflow.
property ChildDefinitionCode #
ChildDefinitionCode #public required string ChildDefinitionCode { get; init; }
The child workflow.
property ChildDefinitionVersion #
ChildDefinitionVersion #public required string ChildDefinitionVersion { get; init; }
The child workflow version.
property ChildWorkflowExecutionId #
ChildWorkflowExecutionId #public required string ChildWorkflowExecutionId { get; init; }
The child execution.
property LinkId #
LinkId #public required string LinkId { get; init; }
The link.
property ParentScopeExecutionId #
ParentScopeExecutionId #public required string ParentScopeExecutionId { get; init; }
The parent scope.
property ParentStepExecutionId #
ParentStepExecutionId #public required string ParentStepExecutionId { get; init; }
The parent step.
property ParentWorkflowExecutionId #
ParentWorkflowExecutionId #public required string ParentWorkflowExecutionId { get; init; }
The parent execution.
property StartRequestSha256 #
StartRequestSha256 #public required string StartRequestSha256 { get; init; }
The SHA-256 of the child start request.
namespace StellaOps.Workflow.Engine.Constants
| Type | Kind | Description |
|---|---|---|
ConstantsClass | class | String values the engine stores and compares. |
ConstantsClass. | class | The fan-in and failure policies of a map step. |
ConstantsClass. | class | How the delay between retries grows. |
MessageKeys | class | The message ids of the engine’s business errors. |
WorkflowInstanceStatuses | class | The statuses of a workflow instance. |
WorkflowTaskEventTypes | class | The event types of a human task’s history. |
WorkflowTaskStatuses | class | The statuses of a human task. |
class ConstantsClass
public static class ConstantsClass
String values the engine stores and compares.
Members
| Member | Kind | Summary |
|---|---|---|
ChildCanceled | constant | Child link: the child was canceled. |
ChildCompleted | constant | Child link: the child completed and its result reached the parent. |
ChildStartPending | constant | Child link: the child start is queued. |
ChildWaiting | constant | A child link state that the engine sets on no link. |
CursorCompacted | constant | The timeline disposition when the requested events were compacted away. |
DefinitionNotReadyCode | constant | The refusal code of a start whose managed definition is not ready: not managed, another code, or no build and compatibility hashes. |
DefinitionOriginManaged | constant | The origin of a managed definition. |
DefinitionOriginOperator | constant | The origin of a definition an operator imported. |
DurableOutboxPublished | constant | Sent. |
DurableOutboxReady | constant | Appended, not yet sent. |
ExecutionIntegrityReconciliationSchedule | constant | The name of the execution integrity reconciliation schedule. |
OutboxInboxCompactionSchedule | constant | The name of the outbox and inbox compaction schedule. |
SafeProfile | constant | The execution console profile that shows only allowed state keys. |
ServiceName | constant | The service name of the engine. |
TechnicalProfile | constant | The execution console profile that shows more detail. |
constant ChildCanceled #
ChildCanceled #public const string ChildCanceled = "CANCELED"
Child link: the child was canceled.
constant ChildCompleted #
ChildCompleted #public const string ChildCompleted = "COMPLETED"
Child link: the child completed and its result reached the parent.
constant ChildStartPending #
ChildStartPending #public const string ChildStartPending = "START_PENDING"
Child link: the child start is queued.
constant ChildWaiting #
ChildWaiting #public const string ChildWaiting = "WAITING"
A child link state that the engine sets on no link.
constant CursorCompacted #
CursorCompacted #public const string CursorCompacted = "CURSOR_COMPACTED"
The timeline disposition when the requested events were compacted away.
constant DefinitionNotReadyCode #
DefinitionNotReadyCode #public const string DefinitionNotReadyCode = "DEFINITION_NOT_READY"
The refusal code of a start whose managed definition is not ready: not managed, another code, or no build and compatibility hashes.
constant DefinitionOriginManaged #
DefinitionOriginManaged #public const string DefinitionOriginManaged = "MANAGED_EMBEDDED"
The origin of a managed definition.
constant DefinitionOriginOperator #
DefinitionOriginOperator #public const string DefinitionOriginOperator = "OPERATOR_IMPORTED"
The origin of a definition an operator imported.
constant DurableOutboxPublished #
DurableOutboxPublished #public const string DurableOutboxPublished = "PUBLISHED"
Sent.
constant DurableOutboxReady #
DurableOutboxReady #public const string DurableOutboxReady = "READY"
Appended, not yet sent.
constant ExecutionIntegrityReconciliationSchedule #
ExecutionIntegrityReconciliationSchedule #public const string ExecutionIntegrityReconciliationSchedule = "STELLAOPS_EXECUTION_INTEGRITY_RECONCILIATION"
The name of the execution integrity reconciliation schedule.
constant OutboxInboxCompactionSchedule #
OutboxInboxCompactionSchedule #public const string OutboxInboxCompactionSchedule = "STELLAOPS_OUTBOX_INBOX_COMPACTION"
The name of the outbox and inbox compaction schedule.
constant SafeProfile #
SafeProfile #public const string SafeProfile = "SAFE"
The execution console profile that shows only allowed state keys.
constant ServiceName #
ServiceName #public const string ServiceName = "StellaOps.Workflow.Engine"
The service name of the engine.
constant TechnicalProfile #
TechnicalProfile #public const string TechnicalProfile = "TECHNICAL"
The execution console profile that shows more detail.
class ConstantsClass.MapPolicies
public static class MapPolicies
The fan-in and failure policies of a map step.
Members
| Member | Kind | Summary |
|---|---|---|
AllSucceeded | constant | Fan-in: the map completes when every item succeeded. |
CollectAll | constant | Fan-in: the map completes when every item finished, whatever the outcome. |
CollectPartial | constant | Failure: the map waits for every item, then applies its fan-in policy. |
FailFast | constant | Failure: the first failed item fails the map. |
MinimumSucceeded | constant | Fan-in: the map completes when at least the minimum number of items succeeded. |
RouteManual | constant | Failure: when every item finished and one failed, the map waits for manual handling (ConstantsClass.). |
constant AllSucceeded #
AllSucceeded #public const string AllSucceeded = "ALL_SUCCEEDED"
Fan-in: the map completes when every item succeeded.
constant CollectAll #
CollectAll #public const string CollectAll = "COLLECT_ALL"
Fan-in: the map completes when every item finished, whatever the outcome.
constant CollectPartial #
CollectPartial #public const string CollectPartial = "COLLECT_PARTIAL"
Failure: the map waits for every item, then applies its fan-in policy.
constant FailFast #
FailFast #public const string FailFast = "FAIL_FAST"
Failure: the first failed item fails the map.
constant MinimumSucceeded #
MinimumSucceeded #public const string MinimumSucceeded = "MIN_SUCCEEDED"
Fan-in: the map completes when at least the minimum number of items succeeded.
constant RouteManual #
RouteManual #public const string RouteManual = "ROUTE_MANUAL"
Failure: when every item finished and one failed, the map waits for manual handling (ConstantsClass.).
class ConstantsClass.RetryBackoffKinds
public static class RetryBackoffKinds
How the delay between retries grows. Every kind is capped by the maximum delay, when one is set, and varied by the jitter.
Members
| Member | Kind | Summary |
|---|---|---|
Exponential | constant | The delay starts at the initial delay and doubles with each retry. |
Fixed | constant | Every retry waits the initial delay. |
ProviderHint | constant | The delay the provider asks for, such as a retry-after value, capped by the provider-hint bound; the initial delay when the provider gives none. |
constant Exponential #
Exponential #public const string Exponential = "EXPONENTIAL"
The delay starts at the initial delay and doubles with each retry.
constant Fixed #
Fixed #public const string Fixed = "FIXED"
Every retry waits the initial delay.
constant ProviderHint #
ProviderHint #public const string ProviderHint = "PROVIDER_HINT"
The delay the provider asks for, such as a retry-after value, capped by the provider-hint bound; the initial delay when the provider gives none.
class MessageKeys
public static class MessageKeys
The message ids of the engine’s business errors. The HTTP endpoints map each to a status.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowArbitrarySignalNotAllowed | property | An arbitrary signal is not allowed. |
WorkflowBusinessIdMissing | property | A business id is missing. |
WorkflowDefinitionNotFound | property | The workflow definition does not exist (404). |
WorkflowInstanceNotFound | property | The workflow instance does not exist (404). |
WorkflowPayloadFieldMissing | property | A payload or state field a step reads is missing (400). |
WorkflowRuntimeFailed | property | The runtime failed. |
WorkflowServiceAudienceDenied | property | The calling service is not an allowed audience of the start (403). |
WorkflowSortColumnNotAllowed | property | The sort column is not one the list allows (400). |
WorkflowStartExactReplayConflict | property | A start replay conflicts with an earlier start. |
WorkflowStartNotReady | property | The start is not ready. |
WorkflowTaskActionDenied | property | The caller may not act on the task (403). |
WorkflowTaskAlreadyCompleted | property | The task is already completed (409). |
WorkflowTaskCancelled | property | The task was cancelled (409). |
WorkflowTaskExpired | property | The task has expired (409). |
WorkflowTaskNotFound | property | The task does not exist (404). |
WorkflowTransportFailed | property | A transport call failed and no failure branch handled it (502). |
property WorkflowArbitrarySignalNotAllowed #
WorkflowArbitrarySignalNotAllowed #public static string WorkflowArbitrarySignalNotAllowed { get; }
An arbitrary signal is not allowed. The endpoints answer it with 400; the engine does not raise it.
property WorkflowBusinessIdMissing #
WorkflowBusinessIdMissing #public static string WorkflowBusinessIdMissing { get; }
A business id is missing. The endpoints answer it with 400; the engine does not raise it.
property WorkflowDefinitionNotFound #
WorkflowDefinitionNotFound #public static string WorkflowDefinitionNotFound { get; }
The workflow definition does not exist (404).
property WorkflowInstanceNotFound #
WorkflowInstanceNotFound #public static string WorkflowInstanceNotFound { get; }
The workflow instance does not exist (404).
property WorkflowPayloadFieldMissing #
WorkflowPayloadFieldMissing #public static string WorkflowPayloadFieldMissing { get; }
A payload or state field a step reads is missing (400).
property WorkflowRuntimeFailed #
WorkflowRuntimeFailed #public static string WorkflowRuntimeFailed { get; }
The runtime failed. The endpoints answer it with 500; the engine does not raise it.
property WorkflowServiceAudienceDenied #
WorkflowServiceAudienceDenied #public static string WorkflowServiceAudienceDenied { get; }
The calling service is not an allowed audience of the start (403).
property WorkflowSortColumnNotAllowed #
WorkflowSortColumnNotAllowed #public static string WorkflowSortColumnNotAllowed { get; }
The sort column is not one the list allows (400).
property WorkflowStartExactReplayConflict #
WorkflowStartExactReplayConflict #public static string WorkflowStartExactReplayConflict { get; }
A start replay conflicts with an earlier start. The endpoints answer it with 409; the engine does not raise it.
property WorkflowStartNotReady #
WorkflowStartNotReady #public static string WorkflowStartNotReady { get; }
The start is not ready. The endpoints answer it with 409; the engine does not raise it.
property WorkflowTaskActionDenied #
WorkflowTaskActionDenied #public static string WorkflowTaskActionDenied { get; }
The caller may not act on the task (403).
property WorkflowTaskAlreadyCompleted #
WorkflowTaskAlreadyCompleted #public static string WorkflowTaskAlreadyCompleted { get; }
The task is already completed (409).
property WorkflowTaskCancelled #
WorkflowTaskCancelled #public static string WorkflowTaskCancelled { get; }
The task was cancelled (409).
property WorkflowTaskExpired #
WorkflowTaskExpired #public static string WorkflowTaskExpired { get; }
The task has expired (409).
property WorkflowTaskNotFound #
WorkflowTaskNotFound #public static string WorkflowTaskNotFound { get; }
The task does not exist (404).
property WorkflowTransportFailed #
WorkflowTransportFailed #public static string WorkflowTransportFailed { get; }
A transport call failed and no failure branch handled it (502).
class WorkflowInstanceStatuses
public static class WorkflowInstanceStatuses
The statuses of a workflow instance.
Members
| Member | Kind | Summary |
|---|---|---|
Completed | constant | Completed. |
Open | constant | Running. |
Stale | constant | Past its stale date without completing. |
constant Completed #
Completed #public const string Completed = "Completed"
Completed.
constant Open #
Open #public const string Open = "Open"
Running.
constant Stale #
Stale #public const string Stale = "Stale"
Past its stale date without completing.
class WorkflowTaskEventTypes
public static class WorkflowTaskEventTypes
The event types of a human task’s history.
Members
| Member | Kind | Summary |
|---|---|---|
Assigned | constant | The task was assigned. |
Cancelled | constant | The task was cancelled. |
Completed | constant | The task was completed. |
Created | constant | The task was opened. |
Expired | constant | The task expired. |
Reassigned | constant | The task was assigned again. |
Released | constant | The task was released. |
constant Assigned #
Assigned #public const string Assigned = "Assigned"
The task was assigned.
constant Cancelled #
Cancelled #public const string Cancelled = "Cancelled"
The task was cancelled.
constant Completed #
Completed #public const string Completed = "Completed"
The task was completed.
constant Created #
Created #public const string Created = "Created"
The task was opened.
constant Expired #
Expired #public const string Expired = "Expired"
The task expired.
constant Reassigned #
Reassigned #public const string Reassigned = "Reassigned"
The task was assigned again.
constant Released #
Released #public const string Released = "Released"
The task was released.
class WorkflowTaskStatuses
public static class WorkflowTaskStatuses
The statuses of a human task.
Members
| Member | Kind | Summary |
|---|---|---|
Assigned | constant | Assigned to a user or to roles. |
Cancelled | constant | Cancelled, for example when its fork ended or its instance was cancelled. |
Completed | constant | Completed. |
Expired | constant | Closed by its timeout. |
Open | constant | Open for any user with a matching role. |
Stale | constant | Past its stale date while open. |
constant Assigned #
Assigned #public const string Assigned = "Assigned"
Assigned to a user or to roles.
constant Cancelled #
Cancelled #public const string Cancelled = "Cancelled"
Cancelled, for example when its fork ended or its instance was cancelled.
constant Completed #
Completed #public const string Completed = "Completed"
Completed.
constant Expired #
Expired #public const string Expired = "Expired"
Closed by its timeout.
constant Open #
Open #public const string Open = "Open"
Open for any user with a matching role.
constant Stale #
Stale #public const string Stale = "Stale"
Past its stale date while open.
namespace StellaOps.Workflow.Engine.Definitions
| Type | Kind | Description |
|---|---|---|
WorkflowRuntimeDefinitionStore | class | Builds the runtime definitions of the registered workflows; a declarative workflow is compiled and validated, and one that fails raises an error naming its issues. |
WorkflowRuntimeExecutionHandlerFactory | class | Creates the execution handlers of runtime definitions. |
class WorkflowRuntimeDefinitionStore
public sealed class WorkflowRuntimeDefinitionStore : IWorkflowRuntimeDefinitionStore
Builds the runtime definitions of the registered workflows; a declarative workflow is compiled and validated, and one that fails raises an error naming its issues.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRuntimeDefinitionStore( | constructor | Creates the store. |
GetDefinition( | method | Finds a runtime definition. |
GetDefinitions( | method | Returns every runtime definition. |
GetRequiredDefinition( | method | Finds a runtime definition. |
constructor WorkflowRuntimeDefinitionStore(IWorkflowRegistrationCatalog, IWorkflowModuleCatalog, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) #
WorkflowRuntimeDefinitionStore(IWorkflowRegistrationCatalog, IWorkflowModuleCatalog, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) #public WorkflowRuntimeDefinitionStore(IWorkflowRegistrationCatalog workflowRegistrationCatalog, IWorkflowModuleCatalog workflowModuleCatalog, IWorkflowFunctionCatalog workflowFunctionCatalog, IWorkflowExternalActivityRegistry? externalActivityRegistry = null)
Creates the store.
Parameters
workflow: The registered workflows.Registration Catalog workflow: The installed function modules, for the module check.Module Catalog workflow: The function catalog, for compilation and validation.Function Catalog external: The external activity registry, for validation; none when not set.Activity Registry
method GetDefinition(string, string) #
GetDefinition(string, string) #public WorkflowRuntimeDefinition? GetDefinition(string workflowName, string? workflowVersion = null)
Finds a runtime definition.
Parameters
workflowName: The workflow name.workflowVersion: The version; the latest when not set.
Returns
The definition, or null.
method GetDefinitions() #
GetDefinitions() #public IReadOnlyCollection<WorkflowRuntimeDefinition> GetDefinitions()
Returns every runtime definition.
Returns
The definitions.
method GetRequiredDefinition(string, string) #
GetRequiredDefinition(string, string) #public WorkflowRuntimeDefinition GetRequiredDefinition(string workflowName, string? workflowVersion = null)
Finds a runtime definition.
Parameters
workflowName: The workflow name.workflowVersion: The version; the latest when not set.
Returns
The definition.
Exceptions
Invalid: No such definition is registered.Operation Exception
class WorkflowRuntimeExecutionHandlerFactory
public sealed class WorkflowRuntimeExecutionHandlerFactory : IWorkflowRuntimeExecutionHandlerFactory
Creates the execution handlers of runtime definitions.
Parameters
serviceProvider: Resolves custom handlers.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRuntimeExecutionHandlerFactory( | constructor | Creates the execution handlers of runtime definitions. |
TryCreateHandler( | method | Creates the handler: the custom handler of the registration, or the declarative handler; none for a definition-only workflow. |
constructor WorkflowRuntimeExecutionHandlerFactory(IServiceProvider) #
WorkflowRuntimeExecutionHandlerFactory(IServiceProvider) #public WorkflowRuntimeExecutionHandlerFactory(IServiceProvider serviceProvider)
Creates the execution handlers of runtime definitions.
Parameters
serviceProvider: Resolves custom handlers.
method TryCreateHandler(WorkflowRuntimeDefinition) #
TryCreateHandler(WorkflowRuntimeDefinition) #public IWorkflowExecutionHandler? TryCreateHandler(WorkflowRuntimeDefinition definition)
Creates the handler: the custom handler of the registration, or the declarative handler; none for a definition-only workflow.
Parameters
definition: The runtime definition.
Returns
The handler, or null.
namespace StellaOps.Workflow.Engine.Durability
| Type | Kind | Description |
|---|---|---|
IWorkflowDurableStartAdmissionPolicy | interface | Decides whether a durable start may run now. |
IWorkflowOutboxMessagePublisher | interface | Sends outbox messages over a transport. |
IWorkflowServiceAudienceResolver | interface | Maps an authenticated service subject to its service audience. |
WorkflowActivityCompletionMessageHandler | class | Handles WorkflowExternalActivityLanes.: records the completion and resumes the waiting step (or map item) when it can resume. |
WorkflowDefinitionStartAdmissionPolicy | class | Admits a durable start only for a permitted, managed and active definition whose content hash matches the request. |
WorkflowDeliveryDisposition | enum | What the engine decided about one delivered durable message. |
WorkflowDurableMaintenanceOptions | class | Options of the durable maintenance tasks, bound from WorkflowMaintenance. |
WorkflowDurableMaintenanceService | class | The engine’s periodic durable maintenance: the execution integrity check and the outbox/inbox compaction. |
WorkflowDurableMessageTypes | class | Message types of the durable start protocol; an integration transport publishes and consumes them by these names. |
WorkflowDurableMessagingServiceCollectionExtensions | class | Registers the durable messaging of the engine. |
WorkflowDurableOutboxMessage | record | A durable start message waiting in the outbox. |
WorkflowDurableRootContinuationService | class | Continues a durable start after its start decision committed: checks the stored receipt and the digest of the stored request, then runs the start. |
WorkflowDurableStartAudience | class | Who may call the durable start lane. |
WorkflowDurableStartOptions | class | The workflow definitions a service may start durably (WorkflowDurableStart). |
WorkflowDurableStartService | class | Decides durable starts and prestart terminal commands once, each in one change scope with its outbox messages. |
WorkflowExactReplayConflictException | class | Raised when a replay carries different content under an identity already recorded. |
WorkflowOutboxBatchResult | record | The counts of one outbox drain. |
WorkflowOutboxDelivery | record | One outbox row as a message: the lane (channel), its id, the canonical body and the contract headers. |
WorkflowOutboxDispatcher | class | Drains the ready outbox rows (activity dispatches, activity cancellations and the durable start messages) through IWorkflowOutboxMessagePublisherand records every delivery attempt; an unconfirmed message stays ready for an exact replay. |
WorkflowOutboxDispatcherHostedService | class | Runs WorkflowOutboxDispatchercontinuously: quickly while rows are ready, slowly when idle. |
WorkflowRegisteredSignalDisposition | enum | How a raised signal was handled. |
WorkflowRegisteredSignalOptions | class | The registered signals and the service audiences that may use them (Workflow). |
WorkflowRegisteredSignalRaiseRequest | record | A signal raised for a registered wait. |
WorkflowRegisteredSignalRaiseResponse | record | How a raised signal was handled. |
WorkflowRegisteredSignalService | class | Registered signal waits: a step waits for a signal from a registered service audience until a deadline, and the signal or the deadline wins, whichever is recorded first. |
WorkflowRegisteredSignalWaitRequest | record | A wait to register, with its deadline timer. |
WorkflowRegisteredSignalWaitResult | record | The state of a registered wait. |
WorkflowRegisteredWaitOutcome | enum | The state of a registered wait. |
WorkflowRootAlreadyStartedException | class | Raised when an execution already has a durable root. |
WorkflowRootContinuationMessageHandler | class | Handles WorkflowDurableMessageTypes.. |
WorkflowRootContinuationV1 | record | Continues a durable root after its start committed. |
WorkflowServiceAudienceResolver | class | Maps subjects to audiences with ServiceSubjects of the registered signal options. |
WorkflowStartAdmissionDecision | record | The admission decision on a durable start. |
WorkflowStartAdmissionDisposition | enum | Whether a durable start may run now. |
WorkflowStartExecutionMessageHandler | class | Handles WorkflowDurableMessageTypes.. |
WorkflowStartNotReadyException | class | Raised when a durable start cannot run yet; the start is retried. |
interface IWorkflowDurableStartAdmissionPolicy
public interface IWorkflowDurableStartAdmissionPolicy
Decides whether a durable start may run now.
Members
| Member | Kind | Summary |
|---|---|---|
EvaluateAsync( | method | Decides on a start request. |
method EvaluateAsync(StartWorkflowExecutionV1, CancellationToken) #
EvaluateAsync(StartWorkflowExecutionV1, CancellationToken) #Task<WorkflowStartAdmissionDecision> EvaluateAsync(StartWorkflowExecutionV1 request, CancellationToken cancellationToken = default)
Decides on a start request.
Parameters
request: The start request.cancellationToken: Cancels the operation.
Returns
The decision.
interface IWorkflowOutboxMessagePublisher
public interface IWorkflowOutboxMessagePublisher
Sends outbox messages over a transport. Returns true only when the transport confirmed the message.
Members
| Member | Kind | Summary |
|---|---|---|
PublishAsync( | method | Sends a message. |
method PublishAsync(WorkflowOutboxDelivery, CancellationToken) #
PublishAsync(WorkflowOutboxDelivery, CancellationToken) #Task<bool> PublishAsync(WorkflowOutboxDelivery message, CancellationToken cancellationToken)
Sends a message.
Parameters
message: The message.cancellationToken: Cancels the operation.
Returns
Whether the transport confirmed it.
interface IWorkflowServiceAudienceResolver
public interface IWorkflowServiceAudienceResolver
Maps an authenticated service subject to its service audience.
Members
| Member | Kind | Summary |
|---|---|---|
ResolveAudience( | method | Returns the audience of a subject. |
method ResolveAudience(string) #
ResolveAudience(string) #string? ResolveAudience(string? authenticatedSubject)
Returns the audience of a subject.
Parameters
authenticatedSubject: The authenticated subject.
Returns
The audience, or null when the subject has none.
class WorkflowActivityCompletionMessageHandler
public sealed class WorkflowActivityCompletionMessageHandler
Handles WorkflowExternalActivityLanes.: records the completion and resumes the waiting step (or map item) when it can resume.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityCompletionMessageHandler( | constructor | Handles WorkflowExternalActivityLanes.: records the completion and resumes the waiting step (or map item) when it can resume. |
HandleAsync( | method | Decodes an activity completion, records it and resumes the waiting step or map item. |
constructor WorkflowActivityCompletionMessageHandler(IServiceScopeFactory) #
WorkflowActivityCompletionMessageHandler(IServiceScopeFactory) #public WorkflowActivityCompletionMessageHandler(IServiceScopeFactory scopeFactory)
Handles WorkflowExternalActivityLanes.: records the completion and resumes the waiting step (or map item) when it can resume.
method HandleAsync(ReadOnlyMemory<byte>, CancellationToken) #
HandleAsync(ReadOnlyMemory<byte>, CancellationToken) #public Task<WorkflowDeliveryDisposition> HandleAsync(ReadOnlyMemory<byte> body, CancellationToken cancellationToken)
Decodes an activity completion, records it and resumes the waiting step or map item.
Parameters
body: The message body.cancellationToken: Cancels the operation.
Returns
The disposition of the completion; RetryableFailure on a version conflict or when the resume did not apply; Poison when the body does not decode or validate; Rejected when the completion conflicts with its binding.
class WorkflowDefinitionStartAdmissionPolicy
public sealed class WorkflowDefinitionStartAdmissionPolicy : IWorkflowDurableStartAdmissionPolicy
Admits a durable start only for a permitted, managed and active definition whose content hash matches the request.
Parameters
definitionStore: The definition store.options: The durable start options; theirDefinitionsname the permitted definitions.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDefinitionStartAdmissionPolicy( | constructor | Admits a durable start only for a permitted, managed and active definition whose content hash matches the request. |
EvaluateAsync( | method | Decides on a start request. |
constructor WorkflowDefinitionStartAdmissionPolicy(IWorkflowDefinitionStore, IOptions<WorkflowDurableStartOptions>) #
WorkflowDefinitionStartAdmissionPolicy(IWorkflowDefinitionStore, IOptions<WorkflowDurableStartOptions>) #public WorkflowDefinitionStartAdmissionPolicy(IWorkflowDefinitionStore definitionStore, IOptions<WorkflowDurableStartOptions> options)
Admits a durable start only for a permitted, managed and active definition whose content hash matches the request.
Parameters
definitionStore: The definition store.options: The durable start options; theirDefinitionsname the permitted definitions.
method EvaluateAsync(StartWorkflowExecutionV1, CancellationToken) #
EvaluateAsync(StartWorkflowExecutionV1, CancellationToken) #public Task<WorkflowStartAdmissionDecision> EvaluateAsync(StartWorkflowExecutionV1 request, CancellationToken cancellationToken = default)
Decides on a start request. A definition the options do not name, or whose hash differs, is rejected permanently (DEFINITION_, DEFINITION_); a definition that is missing, not managed, without build digests or inactive is not ready yet.
Parameters
request: The start request.cancellationToken: Cancels the operation.
Returns
The decision.
enum WorkflowDeliveryDisposition
public enum WorkflowDeliveryDisposition
What the engine decided about one delivered durable message. A transport adapter maps it onto its own acknowledgement (ack, retry, park, reject).
class WorkflowDurableMaintenanceOptions
public sealed class WorkflowDurableMaintenanceOptions
Options of the durable maintenance tasks, bound from WorkflowMaintenance.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableMaintenanceOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowMaintenance. |
CompactionRetentionDays | property | Days a delivered outbox or inbox row is kept before compaction; clamped to 7–3650. |
constructor WorkflowDurableMaintenanceOptions() #
WorkflowDurableMaintenanceOptions() #public WorkflowDurableMaintenanceOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowMaintenance"
The configuration section the options bind from: WorkflowMaintenance.
property CompactionRetentionDays #
CompactionRetentionDays #public int CompactionRetentionDays { get; set; }
Days a delivered outbox or inbox row is kept before compaction; clamped to 7–3650.
class WorkflowDurableMaintenanceService
public sealed class WorkflowDurableMaintenanceService
The engine’s periodic durable maintenance: the execution integrity check and the outbox/inbox compaction. A host runs them from its own scheduler.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableMaintenanceService( | constructor | The engine’s periodic durable maintenance: the execution integrity check and the outbox/inbox compaction. |
CompactOutboxAsync( | method | Deletes delivered outbox and inbox rows older than the retention. |
VerifyIntegrityAsync( | method | Fails with WORKFLOW_ when a step attempt lost its execution. |
constructor WorkflowDurableMaintenanceService(IWorkflowDurableMaintenanceStore, IWorkflowOutboxStore, IOptions<WorkflowDurableMaintenanceOptions>, TimeProvider) #
WorkflowDurableMaintenanceService(IWorkflowDurableMaintenanceStore, IWorkflowOutboxStore, IOptions<WorkflowDurableMaintenanceOptions>, TimeProvider) #public WorkflowDurableMaintenanceService(IWorkflowDurableMaintenanceStore maintenanceStore, IWorkflowOutboxStore outboxStore, IOptions<WorkflowDurableMaintenanceOptions> options, TimeProvider timeProvider)
The engine’s periodic durable maintenance: the execution integrity check and the outbox/inbox compaction. A host runs them from its own scheduler.
method CompactOutboxAsync(CancellationToken) #
CompactOutboxAsync(CancellationToken) #public Task CompactOutboxAsync(CancellationToken cancellationToken)
Deletes delivered outbox and inbox rows older than the retention.
method VerifyIntegrityAsync(CancellationToken) #
VerifyIntegrityAsync(CancellationToken) #public Task VerifyIntegrityAsync(CancellationToken cancellationToken)
Fails with WORKFLOW_ when a step attempt lost its execution.
class WorkflowDurableMessageTypes
public static class WorkflowDurableMessageTypes
Message types of the durable start protocol; an integration transport publishes and consumes them by these names.
Members
| Member | Kind | Summary |
|---|---|---|
PrestartTerminalAck | constant | The lane of prestart terminal acknowledgements. |
RootContinuation | constant | The lane of root continuations. |
StartExecution | constant | The lane of durable start requests. |
StartExecutionResult | constant | The lane of durable start results. |
RequiredLanes | property | Every lane the engine publishes to or consumes from; a transport must provide each one. |
constant PrestartTerminalAck #
PrestartTerminalAck #public const string PrestartTerminalAck = "workflow.prestart-terminal-ack.v1"
The lane of prestart terminal acknowledgements.
constant RootContinuation #
RootContinuation #public const string RootContinuation = "workflow.root-continuation.v1"
The lane of root continuations.
constant StartExecution #
StartExecution #public const string StartExecution = "workflow.start-execution.v1"
The lane of durable start requests.
constant StartExecutionResult #
StartExecutionResult #public const string StartExecutionResult = "workflow.start-execution-result.v1"
The lane of durable start results.
property RequiredLanes #
RequiredLanes #public static IReadOnlyList<string> RequiredLanes { get; }
Every lane the engine publishes to or consumes from; a transport must provide each one.
class WorkflowDurableMessagingServiceCollectionExtensions
public static class WorkflowDurableMessagingServiceCollectionExtensions
Registers the durable messaging of the engine.
Members
| Member | Kind | Summary |
|---|---|---|
AddWorkflowDurableMessaging( | extension method | Registers the durable lane handlers and the outbox dispatcher with its hosted service. |
extension method AddWorkflowDurableMessaging(IServiceCollection) #
AddWorkflowDurableMessaging(IServiceCollection) #public static IServiceCollection AddWorkflowDurableMessaging(this IServiceCollection services)
Registers the durable lane handlers and the outbox dispatcher with its hosted service. The host registers an IWorkflowOutboxMessagePublisherfor its transport and feeds the handlers from its consumers.
record WorkflowDurableOutboxMessage
public sealed record WorkflowDurableOutboxMessage
A durable start message waiting in the outbox.
Parameters
EventId: The message.MessageType: The message type.AggregateId: The aggregate the message belongs to.PayloadSha256: The SHA-256 of the payload.PayloadJson: The payload, as JSON.DeliveryAttempts: The delivery attempts so far.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableOutboxMessage( | constructor | A durable start message waiting in the outbox. |
AggregateId | property | The aggregate the message belongs to. |
DeliveryAttempts | property | The delivery attempts so far. |
EventId | property | The message. |
MessageType | property | The message type. |
PayloadJson | property | The payload, as JSON. |
PayloadSha256 | property | The SHA-256 of the payload. |
constructor WorkflowDurableOutboxMessage(string, string, string, string, string, int) #
WorkflowDurableOutboxMessage(string, string, string, string, string, int) #public WorkflowDurableOutboxMessage(string EventId, string MessageType, string AggregateId, string PayloadSha256, string PayloadJson, int DeliveryAttempts)
A durable start message waiting in the outbox.
Parameters
EventId: The message.MessageType: The message type.AggregateId: The aggregate the message belongs to.PayloadSha256: The SHA-256 of the payload.PayloadJson: The payload, as JSON.DeliveryAttempts: The delivery attempts so far.
property AggregateId #
AggregateId #public string AggregateId { get; init; }
The aggregate the message belongs to.
property DeliveryAttempts #
DeliveryAttempts #public int DeliveryAttempts { get; init; }
The delivery attempts so far.
property EventId #
EventId #public string EventId { get; init; }
The message.
property MessageType #
MessageType #public string MessageType { get; init; }
The message type.
property PayloadJson #
PayloadJson #public string PayloadJson { get; init; }
The payload, as JSON.
property PayloadSha256 #
PayloadSha256 #public string PayloadSha256 { get; init; }
The SHA-256 of the payload.
class WorkflowDurableRootContinuationService
public sealed class WorkflowDurableRootContinuationService
Continues a durable start after its start decision committed: checks the stored receipt and the digest of the stored request, then runs the start.
Parameters
store: The durable start store.runtimeService: Runs the start.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableRootContinuationService( | constructor | Continues a durable start after its start decision committed: checks the stored receipt and the digest of the stored request, then runs the start. |
ContinueAsync( | method | Runs the start of the durable root a continuation names. |
constructor WorkflowDurableRootContinuationService(IWorkflowDurableStartStore, WorkflowRuntimeService) #
WorkflowDurableRootContinuationService(IWorkflowDurableStartStore, WorkflowRuntimeService) #public WorkflowDurableRootContinuationService(IWorkflowDurableStartStore store, WorkflowRuntimeService runtimeService)
Continues a durable start after its start decision committed: checks the stored receipt and the digest of the stored request, then runs the start.
Parameters
store: The durable start store.runtimeService: Runs the start.
method ContinueAsync(WorkflowRootContinuationV1, CancellationToken) #
ContinueAsync(WorkflowRootContinuationV1, CancellationToken) #public Task<bool> ContinueAsync(WorkflowRootContinuationV1 continuation, CancellationToken cancellationToken = default)
Runs the start of the durable root a continuation names.
Parameters
continuation: The continuation.cancellationToken: Cancels the operation.
Returns
true when the start ran; false when the execution already moved past the expected version.
Exceptions
WorkflowStartNotReadyException: The receipt or its stored request does not exist yet.WorkflowExactReplayConflictException: The continuation or the stored request does not match the receipt.
class WorkflowDurableStartAudience
public static class WorkflowDurableStartAudience
Who may call the durable start lane.
Members
| Member | Kind | Summary |
|---|---|---|
EnsureAllowed( | method | Only a configured start audience may call the lane: a definition configured for another audience is denied, an unconfigured definition (or none, for a pre-start terminal) is allowed to any configured audience and then meets admission. |
method EnsureAllowed(IWorkflowServiceAudienceResolver, WorkflowDurableStartOptions, string, string) #
EnsureAllowed(IWorkflowServiceAudienceResolver, WorkflowDurableStartOptions, string, string) #public static void EnsureAllowed(IWorkflowServiceAudienceResolver audienceResolver, WorkflowDurableStartOptions options, string? callerSubject, string? definitionCode)
Only a configured start audience may call the lane: a definition configured for another audience is denied, an unconfigured definition (or none, for a pre-start terminal) is allowed to any configured audience and then meets admission. Throws MessageKeys.otherwise.
class WorkflowDurableStartOptions
public sealed class WorkflowDurableStartOptions
The workflow definitions a service may start durably (WorkflowDurableStart).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableStartOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowDurableStart. |
Definitions | property | Maps a definition code to the service audience allowed to start it durably and to fence its start. |
constructor WorkflowDurableStartOptions() #
WorkflowDurableStartOptions() #public WorkflowDurableStartOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowDurableStart"
The configuration section the options bind from: WorkflowDurableStart.
property Definitions #
Definitions #public Dictionary<string, string> Definitions { get; set; }
Maps a definition code to the service audience allowed to start it durably and to fence its start. A durable start of a definition missing here is refused with DEFINITION_.
class WorkflowDurableStartService
public sealed class WorkflowDurableStartService
Decides durable starts and prestart terminal commands once, each in one change scope with its outbox messages.
Parameters
store: The durable start store.outboxStore: The outbox store.mutationCoordinator: Begins the change scopes.admissionPolicy: Admits the starts.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDurableStartService( | constructor | Decides durable starts and prestart terminal commands once, each in one change scope with its outbox messages. |
GetPendingOutboxAsync( | method | Returns the durable outbox messages ready to publish. |
MarkOutboxPublishedAsync( | method | Marks a ready durable outbox message published. |
ProcessPrestartTerminalAsync( | method | Records a terminal command that arrives before its start: fences the start request, so the start is not created, and acknowledges the command. |
ProcessStartAsync( | method | Decides a start request once. |
constructor WorkflowDurableStartService(IWorkflowDurableStartStore, IWorkflowOutboxStore, IWorkflowMutationCoordinator, IWorkflowDurableStartAdmissionPolicy) #
WorkflowDurableStartService(IWorkflowDurableStartStore, IWorkflowOutboxStore, IWorkflowMutationCoordinator, IWorkflowDurableStartAdmissionPolicy) #public WorkflowDurableStartService(IWorkflowDurableStartStore store, IWorkflowOutboxStore outboxStore, IWorkflowMutationCoordinator mutationCoordinator, IWorkflowDurableStartAdmissionPolicy admissionPolicy)
Decides durable starts and prestart terminal commands once, each in one change scope with its outbox messages.
Parameters
store: The durable start store.outboxStore: The outbox store.mutationCoordinator: Begins the change scopes.admissionPolicy: Admits the starts.
method GetPendingOutboxAsync(int, CancellationToken) #
GetPendingOutboxAsync(int, CancellationToken) #public Task<IReadOnlyCollection<WorkflowDurableOutboxMessage>> GetPendingOutboxAsync(int limit, CancellationToken cancellationToken = default)
Returns the durable outbox messages ready to publish.
Parameters
limit: The most messages to return, from 1 to 500.cancellationToken: Cancels the operation.
Returns
The messages.
Exceptions
Argument: The limit is outside 1 to 500.Out Of Range Exception
method MarkOutboxPublishedAsync(string, CancellationToken) #
MarkOutboxPublishedAsync(string, CancellationToken) #public Task<bool> MarkOutboxPublishedAsync(string eventId, CancellationToken cancellationToken = default)
Marks a ready durable outbox message published.
Parameters
eventId: The message.cancellationToken: Cancels the operation.
Returns
false when the message is not ready: already published or missing.
method ProcessPrestartTerminalAsync(WorkflowPrestartTerminalCommandV1, CancellationToken) #
ProcessPrestartTerminalAsync(WorkflowPrestartTerminalCommandV1, CancellationToken) #public Task<WorkflowPrestartTerminalAckV1> ProcessPrestartTerminalAsync(WorkflowPrestartTerminalCommandV1 command, CancellationToken cancellationToken = default)
Records a terminal command that arrives before its start: fences the start request, so the start is not created, and acknowledges the command. A command already recorded under its event id returns the recorded acknowledgement.
Parameters
command: The terminal command.cancellationToken: Cancels the operation.
Returns
The acknowledgement.
Exceptions
WorkflowRootAlreadyStartedException: The root already started.WorkflowExactReplayConflictException: A recorded command or receipt does not match.
method ProcessStartAsync(StartWorkflowExecutionV1, CancellationToken) #
ProcessStartAsync(StartWorkflowExecutionV1, CancellationToken) #public Task<StartWorkflowExecutionResultV1> ProcessStartAsync(StartWorkflowExecutionV1 request, CancellationToken cancellationToken = default)
Decides a start request once. A request already decided returns its recorded result; a fenced request is FENCED_NOT_CREATED; a rejected definition, or an open execution of the definition with the same business reference, is REJECTED_NOT_CREATED; otherwise the root is created, STARTED, with a root continuation message.
Parameters
request: The start request.cancellationToken: Cancels the operation.
Returns
The start result.
Exceptions
WorkflowStartNotReadyException: The admission policy reports that the definition is not ready yet.WorkflowExactReplayConflictException: A decision recorded under the request id does not match the request.
class WorkflowExactReplayConflictException
public sealed class WorkflowExactReplayConflictException : InvalidOperationException
Raised when a replay carries different content under an identity already recorded.
Parameters
identity: The identity.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExactReplayConflictException( | constructor | Raised when a replay carries different content under an identity already recorded. |
Identity | property | The identity. |
constructor WorkflowExactReplayConflictException(string) #
WorkflowExactReplayConflictException(string) #public WorkflowExactReplayConflictException(string identity)
Raised when a replay carries different content under an identity already recorded.
Parameters
identity: The identity.
property Identity #
Identity #public string Identity { get; }
The identity.
record WorkflowOutboxBatchResult
public sealed record WorkflowOutboxBatchResult
The counts of one outbox drain.
Parameters
Attempted: The messages tried.Published: The messages the transport confirmed.Deferred: The messages left ready for a later drain.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowOutboxBatchResult( | constructor | The counts of one outbox drain. |
Attempted | property | The messages tried. |
Deferred | property | The messages left ready for a later drain. |
Published | property | The messages the transport confirmed. |
constructor WorkflowOutboxBatchResult(int, int, int) #
WorkflowOutboxBatchResult(int, int, int) #public WorkflowOutboxBatchResult(int Attempted, int Published, int Deferred)
The counts of one outbox drain.
Parameters
Attempted: The messages tried.Published: The messages the transport confirmed.Deferred: The messages left ready for a later drain.
property Attempted #
Attempted #public int Attempted { get; init; }
The messages tried.
property Deferred #
Deferred #public int Deferred { get; init; }
The messages left ready for a later drain.
property Published #
Published #public int Published { get; init; }
The messages the transport confirmed.
record WorkflowOutboxDelivery
public sealed record WorkflowOutboxDelivery
One outbox row as a message: the lane (channel), its id, the canonical body and the contract headers.
Parameters
Channel: The lane.MessageId: The message id.Body: The canonical body.ContentType: The media type of the body.Headers: The contract headers.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowOutboxDelivery( | constructor | One outbox row as a message: the lane (channel), its id, the canonical body and the contract headers. |
Body | property | The canonical body. |
Channel | property | The lane. |
ContentType | property | The media type of the body. |
Headers | property | The contract headers. |
MessageId | property | The message id. |
constructor WorkflowOutboxDelivery(string, string, ReadOnlyMemory<byte>, string, IReadOnlyDictionary<string, object>) #
WorkflowOutboxDelivery(string, string, ReadOnlyMemory<byte>, string, IReadOnlyDictionary<string, object>) #public WorkflowOutboxDelivery(string Channel, string MessageId, ReadOnlyMemory<byte> Body, string ContentType, IReadOnlyDictionary<string, object> Headers)
One outbox row as a message: the lane (channel), its id, the canonical body and the contract headers.
Parameters
Channel: The lane.MessageId: The message id.Body: The canonical body.ContentType: The media type of the body.Headers: The contract headers.
property Body #
Body #public ReadOnlyMemory<byte> Body { get; init; }
The canonical body.
property Channel #
Channel #public string Channel { get; init; }
The lane.
property ContentType #
ContentType #public string ContentType { get; init; }
The media type of the body.
property Headers #
Headers #public IReadOnlyDictionary<string, object> Headers { get; init; }
The contract headers.
property MessageId #
MessageId #public string MessageId { get; init; }
The message id.
class WorkflowOutboxDispatcher
public sealed class WorkflowOutboxDispatcher
Drains the ready outbox rows (activity dispatches, activity cancellations and the durable start messages) through IWorkflowOutboxMessagePublisherand records every delivery attempt; an unconfirmed message stays ready for an exact replay.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowOutboxDispatcher( | constructor | Drains the ready outbox rows (activity dispatches, activity cancellations and the durable start messages) through IWorkflowOutboxMessagePublisherand records every delivery attempt; an unconfirmed message stays ready for an exact replay. |
PublishBatchAsync( | method | Drains one batch of ready outbox messages. |
constructor WorkflowOutboxDispatcher(IServiceScopeFactory, IWorkflowOutboxMessagePublisher, TimeProvider) #
WorkflowOutboxDispatcher(IServiceScopeFactory, IWorkflowOutboxMessagePublisher, TimeProvider) #public WorkflowOutboxDispatcher(IServiceScopeFactory scopeFactory, IWorkflowOutboxMessagePublisher publisher, TimeProvider timeProvider)
Drains the ready outbox rows (activity dispatches, activity cancellations and the durable start messages) through IWorkflowOutboxMessagePublisherand records every delivery attempt; an unconfirmed message stays ready for an exact replay.
method PublishBatchAsync(CancellationToken) #
PublishBatchAsync(CancellationToken) #public Task<WorkflowOutboxBatchResult> PublishBatchAsync(CancellationToken cancellationToken = default)
Drains one batch of ready outbox messages.
Parameters
cancellationToken: Cancels the operation.
Returns
The counts.
class WorkflowOutboxDispatcherHostedService
public sealed class WorkflowOutboxDispatcherHostedService : BackgroundService
Runs WorkflowOutboxDispatchercontinuously: quickly while rows are ready, slowly when idle.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowOutboxDispatcherHostedService( | constructor | Runs WorkflowOutboxDispatchercontinuously: quickly while rows are ready, slowly when idle. |
constructor WorkflowOutboxDispatcherHostedService(WorkflowOutboxDispatcher, ILogger<WorkflowOutboxDispatcherHostedService>) #
WorkflowOutboxDispatcherHostedService(WorkflowOutboxDispatcher, ILogger<WorkflowOutboxDispatcherHostedService>) #public WorkflowOutboxDispatcherHostedService(WorkflowOutboxDispatcher dispatcher, ILogger<WorkflowOutboxDispatcherHostedService> logger)
Runs WorkflowOutboxDispatchercontinuously: quickly while rows are ready, slowly when idle.
enum WorkflowRegisteredSignalDisposition
public enum WorkflowRegisteredSignalDisposition
How a raised signal was handled.
class WorkflowRegisteredSignalOptions
public sealed class WorkflowRegisteredSignalOptions
The registered signals and the service audiences that may use them (Workflow).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegisteredSignalOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: Workflow. |
ServiceSubjects | property | Maps an authenticated service subject to the service audience it acts as. |
Signals | property | Maps a registered signal code to the only service audience that may wait for it and raise it. |
constructor WorkflowRegisteredSignalOptions() #
WorkflowRegisteredSignalOptions() #public WorkflowRegisteredSignalOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowRegisteredSignals"
The configuration section the options bind from: Workflow.
property ServiceSubjects #
ServiceSubjects #public Dictionary<string, string> ServiceSubjects { get; set; }
Maps an authenticated service subject to the service audience it acts as. Subjects compare ignoring case.
property Signals #
Signals #public Dictionary<string, string> Signals { get; set; }
Maps a registered signal code to the only service audience that may wait for it and raise it.
record WorkflowRegisteredSignalRaiseRequest
public sealed record WorkflowRegisteredSignalRaiseRequest
A signal raised for a registered wait.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegisteredSignalRaiseRequest( | constructor | Creates an instance of Workflow. |
OccurredAt | property | When the signal was raised. |
PayloadJson | property | The payload, as JSON. |
PayloadSha256 | property | The SHA-256 of the payload. |
SignalCode | property | The signal code. |
SignalEventId | property | The signal event. |
SignalKey | property | The signal key. |
SignalRegistrationId | property | The wait, when the caller names one. |
WorkflowExecutionId | property | The execution. |
constructor WorkflowRegisteredSignalRaiseRequest() #
WorkflowRegisteredSignalRaiseRequest() #public WorkflowRegisteredSignalRaiseRequest()
Creates an instance of Workflow.
property OccurredAt #
OccurredAt #public required DateTimeOffset OccurredAt { get; init; }
When the signal was raised.
property PayloadJson #
PayloadJson #public required string PayloadJson { get; init; }
The payload, as JSON.
property PayloadSha256 #
PayloadSha256 #public required string PayloadSha256 { get; init; }
The SHA-256 of the payload.
property SignalCode #
SignalCode #public required string SignalCode { get; init; }
The signal code.
property SignalEventId #
SignalEventId #public required string SignalEventId { get; init; }
The signal event.
property SignalKey #
SignalKey #public required string SignalKey { get; init; }
The signal key.
property SignalRegistrationId #
SignalRegistrationId #public string? SignalRegistrationId { get; init; }
The wait, when the caller names one.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution.
record WorkflowRegisteredSignalRaiseResponse
public sealed record WorkflowRegisteredSignalRaiseResponse
How a raised signal was handled.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegisteredSignalRaiseResponse( | constructor | Creates an instance of Workflow. |
Disposition | property | How it was handled. |
SafeCode | property | The safe code of a refusal or a lost race. |
SignalEventId | property | The signal event. |
SignalRegistrationId | property | The wait the signal reached. |
WorkflowExecutionId | property | The execution. |
constructor WorkflowRegisteredSignalRaiseResponse() #
WorkflowRegisteredSignalRaiseResponse() #public WorkflowRegisteredSignalRaiseResponse()
Creates an instance of Workflow.
property Disposition #
Disposition #public required WorkflowRegisteredSignalDisposition Disposition { get; init; }
How it was handled.
property SafeCode #
SafeCode #public string? SafeCode { get; init; }
The safe code of a refusal or a lost race.
property SignalEventId #
SignalEventId #public required string SignalEventId { get; init; }
The signal event.
property SignalRegistrationId #
SignalRegistrationId #public string? SignalRegistrationId { get; init; }
The wait the signal reached.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution.
class WorkflowRegisteredSignalService
public sealed class WorkflowRegisteredSignalService
Registered signal waits: a step waits for a signal from a registered service audience until a deadline, and the signal or the deadline wins, whichever is recorded first.
Parameters
store: The registered signal store.mutationCoordinator: Begins the change scopes.options: The registered signals: each signal code with the service audience allowed to raise it.
Members
constructor WorkflowRegisteredSignalService(IWorkflowRegisteredSignalStore, IWorkflowMutationCoordinator, IOptions<WorkflowRegisteredSignalOptions>) #
WorkflowRegisteredSignalService(IWorkflowRegisteredSignalStore, IWorkflowMutationCoordinator, IOptions<WorkflowRegisteredSignalOptions>) #public WorkflowRegisteredSignalService(IWorkflowRegisteredSignalStore store, IWorkflowMutationCoordinator mutationCoordinator, IOptions<WorkflowRegisteredSignalOptions> options)
Registered signal waits: a step waits for a signal from a registered service audience until a deadline, and the signal or the deadline wins, whichever is recorded first.
Parameters
store: The registered signal store.mutationCoordinator: Begins the change scopes.options: The registered signals: each signal code with the service audience allowed to raise it.
method FireDeadlineAsync(string, DateTimeOffset, CancellationToken) #
FireDeadlineAsync(string, DateTimeOffset, CancellationToken) #public Task<WorkflowRegisteredSignalWaitResult> FireDeadlineAsync(string timerId, DateTimeOffset now, CancellationToken cancellationToken = default)
Fires a deadline timer: the deadline wins a wait that is still open, at the version the timer armed, once the time is due. A timer that lost is marked lost.
Parameters
timerId: The timer.now: The current time.cancellationToken: Cancels the operation.
Returns
The wait and its outcome.
Exceptions
KeyNotFoundException: The timer does not exist.
method RaiseByIdAsync(WorkflowRegisteredSignalRaiseRequest, string, CancellationToken) #
RaiseByIdAsync(WorkflowRegisteredSignalRaiseRequest, string, CancellationToken) #public Task<WorkflowRegisteredSignalRaiseResponse> RaiseByIdAsync(WorkflowRegisteredSignalRaiseRequest request, string? authenticatedServiceAudience, CancellationToken cancellationToken = default)
Raises a signal for the wait the request’s registration id names; see WorkflowRegisteredSignalService.. A request without a registration id is rejected.
Parameters
request: The signal.authenticated: The service audience of the authenticated caller.Service Audience cancellationToken: Cancels the operation.
Returns
The disposition.
method RaiseByKeyAsync(WorkflowRegisteredSignalRaiseRequest, string, CancellationToken) #
RaiseByKeyAsync(WorkflowRegisteredSignalRaiseRequest, string, CancellationToken) #public Task<WorkflowRegisteredSignalRaiseResponse> RaiseByKeyAsync(WorkflowRegisteredSignalRaiseRequest request, string? authenticatedServiceAudience, CancellationToken cancellationToken = default)
Raises a signal for the wait of the execution, signal code and signal key. The signal is rejected when it lacks an identity, its code is not registered, the caller’s audience is not the registered one, its payload is empty or over 65,536 characters, its time is not UTC or its payload hash does not match. With no wait yet, the signal is kept (WAIT_NOT_READY); a resolved wait gives ALREADY_RESOLVED; otherwise the signal wins the wait (CORRELATED). A signal event already received returns its recorded disposition.
Parameters
request: The signal.authenticated: The service audience of the authenticated caller.Service Audience cancellationToken: Cancels the operation.
Returns
The disposition.
method RegisterWaitAsync(WorkflowRegisteredSignalWaitRequest, CancellationToken) #
RegisterWaitAsync(WorkflowRegisteredSignalWaitRequest, CancellationToken) #public Task<WorkflowRegisteredSignalWaitResult> RegisterWaitAsync(WorkflowRegisteredSignalWaitRequest request, CancellationToken cancellationToken = default)
Registers a wait and arms its deadline timer. A signal already received for the wait wins at once. A wait already registered under its id is returned as recorded.
Parameters
request: The wait.cancellationToken: Cancels the operation.
Returns
The wait and its outcome.
Exceptions
ArgumentException: The expected version is below 1, the deadline is not a UTC time after the epoch, or the signal code and audience are not registered.WorkflowExactReplayConflictException: A wait registered under the id differs.
record WorkflowRegisteredSignalWaitRequest
public sealed record WorkflowRegisteredSignalWaitRequest
A wait to register, with its deadline timer.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegisteredSignalWaitRequest( | constructor | Creates an instance of Workflow. |
DeadlineAt | property | The deadline. |
ExpectedExecutionVersion | property | The execution version the wait is registered at. |
ServiceAudience | property | The service audience allowed to raise it. |
SignalCode | property | The signal code. |
SignalKey | property | The signal key. |
SignalRegistrationId | property | The wait. |
TimerId | property | The deadline timer. |
WorkflowExecutionId | property | The execution. |
constructor WorkflowRegisteredSignalWaitRequest() #
WorkflowRegisteredSignalWaitRequest() #public WorkflowRegisteredSignalWaitRequest()
Creates an instance of Workflow.
property DeadlineAt #
DeadlineAt #public required DateTimeOffset DeadlineAt { get; init; }
The deadline.
property ExpectedExecutionVersion #
ExpectedExecutionVersion #public required long ExpectedExecutionVersion { get; init; }
The execution version the wait is registered at.
property ServiceAudience #
ServiceAudience #public required string ServiceAudience { get; init; }
The service audience allowed to raise it.
property SignalCode #
SignalCode #public required string SignalCode { get; init; }
The signal code.
property SignalKey #
SignalKey #public required string SignalKey { get; init; }
The signal key.
property SignalRegistrationId #
SignalRegistrationId #public required string SignalRegistrationId { get; init; }
The wait.
property TimerId #
TimerId #public required string TimerId { get; init; }
The deadline timer.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution.
record WorkflowRegisteredSignalWaitResult
public sealed record WorkflowRegisteredSignalWaitResult
The state of a registered wait.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegisteredSignalWaitResult( | constructor | Creates an instance of Workflow. |
Outcome | property | The state of the wait. |
PayloadJson | property | The signal payload, as JSON. |
PayloadSha256 | property | The SHA-256 of the signal payload. |
SignalRegistrationId | property | The wait. |
WaitVersion | property | The wait version. |
WinnerId | property | The signal event or timer that resolved it. |
constructor WorkflowRegisteredSignalWaitResult() #
WorkflowRegisteredSignalWaitResult() #public WorkflowRegisteredSignalWaitResult()
Creates an instance of Workflow.
property Outcome #
Outcome #public required WorkflowRegisteredWaitOutcome Outcome { get; init; }
The state of the wait.
property PayloadJson #
PayloadJson #public string? PayloadJson { get; init; }
The signal payload, as JSON.
property PayloadSha256 #
PayloadSha256 #public string? PayloadSha256 { get; init; }
The SHA-256 of the signal payload.
property SignalRegistrationId #
SignalRegistrationId #public required string SignalRegistrationId { get; init; }
The wait.
property WaitVersion #
WaitVersion #public required long WaitVersion { get; init; }
The wait version.
property WinnerId #
WinnerId #public string? WinnerId { get; init; }
The signal event or timer that resolved it.
enum WorkflowRegisteredWaitOutcome
public enum WorkflowRegisteredWaitOutcome
The state of a registered wait.
| Value | Description |
|---|---|
WAITING = 0 | The wait is open. |
SIGNAL_WON = 1 | A signal resolved the wait. |
DEADLINE_WON = 2 | The deadline timer resolved the wait. |
class WorkflowRootAlreadyStartedException
public sealed class WorkflowRootAlreadyStartedException : InvalidOperationException
Raised when an execution already has a durable root.
Parameters
workflowExecutionId: The execution.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRootAlreadyStartedException( | constructor | Raised when an execution already has a durable root. |
WorkflowExecutionId | property | The execution. |
constructor WorkflowRootAlreadyStartedException(string) #
WorkflowRootAlreadyStartedException(string) #public WorkflowRootAlreadyStartedException(string workflowExecutionId)
Raised when an execution already has a durable root.
Parameters
workflowExecutionId: The execution.
property WorkflowExecutionId #
WorkflowExecutionId #public string WorkflowExecutionId { get; }
The execution.
class WorkflowRootContinuationMessageHandler
public sealed class WorkflowRootContinuationMessageHandler
Handles WorkflowDurableMessageTypes..
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRootContinuationMessageHandler( | constructor | Handles WorkflowDurableMessageTypes.. |
HandleAsync( | method | Decodes a root continuation and runs it. |
constructor WorkflowRootContinuationMessageHandler(IServiceScopeFactory, ILogger<WorkflowRootContinuationMessageHandler>) #
WorkflowRootContinuationMessageHandler(IServiceScopeFactory, ILogger<WorkflowRootContinuationMessageHandler>) #public WorkflowRootContinuationMessageHandler(IServiceScopeFactory scopeFactory, ILogger<WorkflowRootContinuationMessageHandler> logger)
method HandleAsync(ReadOnlyMemory<byte>, string, CancellationToken) #
HandleAsync(ReadOnlyMemory<byte>, string, CancellationToken) #public Task<WorkflowDeliveryDisposition> HandleAsync(ReadOnlyMemory<byte> body, string? messageId, CancellationToken cancellationToken)
Decodes a root continuation and runs it.
Parameters
body: The message body.messageId: The transport message id, for the log.cancellationToken: Cancels the operation.
Returns
Applied or AlreadyApplied; WaitNotReady when the start is not ready yet; Rejected on a replay conflict; RetryableFailure on a version conflict; Poison when the body does not decode or validate.
record WorkflowRootContinuationV1
public sealed record WorkflowRootContinuationV1 : IContractValidatable
Continues a durable root after its start committed.
Parameters
StartRequestId: The start request.WorkflowExecutionId: The execution.RootScopeExecutionId: The root scope.Expected: The execution version the continuation expects.Execution Version
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRootContinuationV1( | constructor | Continues a durable root after its start committed. |
ExpectedExecutionVersion | property | The execution version the continuation expects. |
RootScopeExecutionId | property | The root scope. |
StartRequestId | property | The start request. |
WorkflowExecutionId | property | The execution. |
Validate( | method | Checks the fields. |
constructor WorkflowRootContinuationV1(string, string, string, long) #
WorkflowRootContinuationV1(string, string, string, long) #public WorkflowRootContinuationV1(string StartRequestId, string WorkflowExecutionId, string RootScopeExecutionId, long ExpectedExecutionVersion)
Continues a durable root after its start committed.
Parameters
StartRequestId: The start request.WorkflowExecutionId: The execution.RootScopeExecutionId: The root scope.Expected: The execution version the continuation expects.Execution Version
property ExpectedExecutionVersion #
ExpectedExecutionVersion #public long ExpectedExecutionVersion { get; init; }
The execution version the continuation expects.
property RootScopeExecutionId #
RootScopeExecutionId #public string RootScopeExecutionId { get; init; }
The root scope.
property StartRequestId #
StartRequestId #public string StartRequestId { get; init; }
The start request.
property WorkflowExecutionId #
WorkflowExecutionId #public string WorkflowExecutionId { get; init; }
The execution.
method Validate() #
Validate() #public void Validate()
Checks the fields.
Exceptions
ContractValidationException: A field breaks its rule.
class WorkflowServiceAudienceResolver
public sealed class WorkflowServiceAudienceResolver : IWorkflowServiceAudienceResolver
Maps subjects to audiences with ServiceSubjects of the registered signal options.
Parameters
options: The registered signal options.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowServiceAudienceResolver( | constructor | Maps subjects to audiences with ServiceSubjects of the registered signal options. |
ResolveAudience( | method | Returns the audience of a subject. |
constructor WorkflowServiceAudienceResolver(IOptions<WorkflowRegisteredSignalOptions>) #
WorkflowServiceAudienceResolver(IOptions<WorkflowRegisteredSignalOptions>) #public WorkflowServiceAudienceResolver(IOptions<WorkflowRegisteredSignalOptions> options)
Maps subjects to audiences with ServiceSubjects of the registered signal options.
Parameters
options: The registered signal options.
method ResolveAudience(string) #
ResolveAudience(string) #public string? ResolveAudience(string? authenticatedSubject)
Returns the audience of a subject.
Parameters
authenticatedSubject: The authenticated subject.
Returns
The audience, or null when the subject has none.
record WorkflowStartAdmissionDecision
public sealed record WorkflowStartAdmissionDecision
The admission decision on a durable start.
Parameters
Disposition: The decision.SafeCode: The safe code of a refusal or a delay.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStartAdmissionDecision( | constructor | The admission decision on a durable start. |
Disposition | property | The decision. |
Ready | property | The decision that the start may run. |
SafeCode | property | The safe code of a refusal or a delay. |
constructor WorkflowStartAdmissionDecision(WorkflowStartAdmissionDisposition, string) #
WorkflowStartAdmissionDecision(WorkflowStartAdmissionDisposition, string) #public WorkflowStartAdmissionDecision(WorkflowStartAdmissionDisposition Disposition, string? SafeCode = null)
The admission decision on a durable start.
Parameters
Disposition: The decision.SafeCode: The safe code of a refusal or a delay.
property Disposition #
Disposition #public WorkflowStartAdmissionDisposition Disposition { get; init; }
The decision.
property Ready #
Ready #public static WorkflowStartAdmissionDecision Ready { get; }
The decision that the start may run.
property SafeCode #
SafeCode #public string? SafeCode { get; init; }
The safe code of a refusal or a delay.
enum WorkflowStartAdmissionDisposition
public enum WorkflowStartAdmissionDisposition
Whether a durable start may run now.
| Value | Description |
|---|---|
Ready = 0 | The start may run. |
Transient | The start cannot run yet; retry later. |
PermanentReject = 2 | The start is refused. |
class WorkflowStartExecutionMessageHandler
public sealed class WorkflowStartExecutionMessageHandler
Handles WorkflowDurableMessageTypes..
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStartExecutionMessageHandler( | constructor | Handles WorkflowDurableMessageTypes.. |
HandleAsync( | method | Decodes a start message and runs the start. |
constructor WorkflowStartExecutionMessageHandler(IServiceScopeFactory) #
WorkflowStartExecutionMessageHandler(IServiceScopeFactory) #public WorkflowStartExecutionMessageHandler(IServiceScopeFactory scopeFactory)
method HandleAsync(ReadOnlyMemory<byte>, CancellationToken) #
HandleAsync(ReadOnlyMemory<byte>, CancellationToken) #public Task<WorkflowDeliveryDisposition> HandleAsync(ReadOnlyMemory<byte> body, CancellationToken cancellationToken)
Decodes a start message and runs the start.
Parameters
body: The message body.cancellationToken: Cancels the operation.
Returns
Terminal when the start ran; WaitNotReady when it is not ready yet; Rejected on a replay conflict; Poison when the body does not decode or validate.
class WorkflowStartNotReadyException
public sealed class WorkflowStartNotReadyException : InvalidOperationException
Raised when a durable start cannot run yet; the start is retried.
Parameters
safeCode: The safe code.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStartNotReadyException( | constructor | Raised when a durable start cannot run yet; the start is retried. |
SafeCode | property | The safe code. |
constructor WorkflowStartNotReadyException(string) #
WorkflowStartNotReadyException(string) #public WorkflowStartNotReadyException(string safeCode)
Raised when a durable start cannot run yet; the start is retried.
Parameters
safeCode: The safe code.
property SafeCode #
SafeCode #public string SafeCode { get; }
The safe code.
namespace StellaOps.Workflow.Engine.Exceptions
| Type | Kind | Description |
|---|---|---|
WorkflowEngineError | record | A business error of the engine. |
WorkflowEngineErrors | class | Creates the engine’s business errors. |
WorkflowEngineException | class | The engine’s business-result exception: a message key, optional interpolation arguments and a status code. |
record WorkflowEngineError
public sealed record WorkflowEngineError
A business error of the engine.
Parameters
Code: The HTTP status.MessageId: The message id; seeMessageKeys.Arguments: The interpolation arguments.InnerException: The cause, when there is one.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowEngineError( | constructor | A business error of the engine. |
Arguments | property | The interpolation arguments. |
Code | property | The HTTP status. |
InnerException | property | The cause, when there is one. |
MessageId | property | The message id; see MessageKeys. |
constructor WorkflowEngineError(int, string, object[], Exception) #
WorkflowEngineError(int, string, object[], Exception) #public WorkflowEngineError(int Code, string MessageId, object[] Arguments, Exception? InnerException)
A business error of the engine.
Parameters
Code: The HTTP status.MessageId: The message id; seeMessageKeys.Arguments: The interpolation arguments.InnerException: The cause, when there is one.
property Arguments #
Arguments #public object[] Arguments { get; init; }
The interpolation arguments.
property Code #
Code #public int Code { get; init; }
The HTTP status.
property InnerException #
InnerException #public Exception? InnerException { get; init; }
The cause, when there is one.
property MessageId #
MessageId #public string MessageId { get; init; }
The message id; see MessageKeys.
class WorkflowEngineErrors
public static class WorkflowEngineErrors
Creates the engine’s business errors. A host whose error pipeline expects its own exception type installs WorkflowEngineErrors.once at startup; the default creates WorkflowEngineException.
Members
| Member | Kind | Summary |
|---|---|---|
DefaultCode | constant | The default HTTP status: 400. |
Factory | property | Creates the exception of an error; WorkflowEngineErrors.by default. |
Create( | method | Creates the exception of an error with status 400. |
Create( | method | Creates the exception of an error. |
Create( | method | Creates the exception of an error with status 400. |
DefaultFactory( | method | Creates a WorkflowEngineException. |
constant DefaultCode #
DefaultCode #public const int DefaultCode = 400
The default HTTP status: 400.
property Factory #
Factory #public static Func<WorkflowEngineError, Exception> Factory { get; set; }
Creates the exception of an error; WorkflowEngineErrors.by default.
method Create(Exception, string, params object[]) #
Create(Exception, string, params object[]) #public static Exception Create(Exception innerException, string messageId, params object[] args)
Creates the exception of an error with status 400.
Parameters
innerException: The cause.messageId: The message id; seeMessageKeys.args: The interpolation arguments.
Returns
The exception to throw.
method Create(int, string, params object[]) #
Create(int, string, params object[]) #public static Exception Create(int code, string messageId, params object[] args)
Creates the exception of an error.
Parameters
code: The HTTP status.messageId: The message id; seeMessageKeys.args: The interpolation arguments.
Returns
The exception to throw.
method Create(string, params object[]) #
Create(string, params object[]) #public static Exception Create(string messageId, params object[] args)
Creates the exception of an error with status 400.
Parameters
messageId: The message id; seeMessageKeys.args: The interpolation arguments.
Returns
The exception to throw.
method DefaultFactory(WorkflowEngineError) #
DefaultFactory(WorkflowEngineError) #public static Exception DefaultFactory(WorkflowEngineError error)
Creates a WorkflowEngineException.
Parameters
error: The error.
Returns
The exception.
class WorkflowEngineException
public class WorkflowEngineException : Exception
The engine’s business-result exception: a message key, optional interpolation arguments and a status code. The engine raises it through WorkflowEngineErrors, so a host can substitute its own type.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowEngineException( | constructor | Creates the exception with status 400. |
WorkflowEngineException( | constructor | Creates the exception with status 400. |
WorkflowEngineException( | constructor | Creates the exception. |
WorkflowEngineException( | constructor | Creates the exception. |
WorkflowEngineException( | constructor | Creates the exception with status 400. |
WorkflowEngineException( | constructor | Creates the exception with status 400. |
Code | property | The HTTP status the endpoints answer with; 400 by default. |
MessageId | property | The message id. |
MessageInterpolationArguments | property | The interpolation arguments of the message. |
constructor WorkflowEngineException(Exception, string) #
WorkflowEngineException(Exception, string) #public WorkflowEngineException(Exception innerException, string messageId)
Creates the exception with status 400.
Parameters
innerException: The cause.messageId: The message id; seeMessageKeys.
constructor WorkflowEngineException(Exception, string, params object[]) #
WorkflowEngineException(Exception, string, params object[]) #public WorkflowEngineException(Exception innerException, string messageId, params object[] args)
Creates the exception with status 400.
Parameters
innerException: The cause.messageId: The message id; seeMessageKeys.args: The interpolation arguments.
constructor WorkflowEngineException(int, string) #
WorkflowEngineException(int, string) #public WorkflowEngineException(int code, string messageId)
Creates the exception.
Parameters
code: The HTTP status.messageId: The message id; seeMessageKeys.
constructor WorkflowEngineException(int, string, params object[]) #
WorkflowEngineException(int, string, params object[]) #public WorkflowEngineException(int code, string messageId, params object[] args)
Creates the exception.
Parameters
code: The HTTP status.messageId: The message id; seeMessageKeys.args: The interpolation arguments.
constructor WorkflowEngineException(string) #
WorkflowEngineException(string) #public WorkflowEngineException(string messageId)
Creates the exception with status 400.
Parameters
messageId: The message id; seeMessageKeys.
constructor WorkflowEngineException(string, params object[]) #
WorkflowEngineException(string, params object[]) #public WorkflowEngineException(string messageId, params object[] args)
Creates the exception with status 400.
Parameters
messageId: The message id; seeMessageKeys.args: The interpolation arguments.
property Code #
Code #public int Code { get; set; }
The HTTP status the endpoints answer with; 400 by default.
property MessageId #
MessageId #public string MessageId { get; set; }
The message id.
property MessageInterpolationArguments #
MessageInterpolationArguments #public IReadOnlyList<object?> MessageInterpolationArguments { get; set; }
The interpolation arguments of the message.
namespace StellaOps.Workflow.Engine.Execution
| Type | Kind | Description |
|---|---|---|
CanonicalWorkflowExecutionHandler | class | Runs a workflow from its canonical runtime definition: starts, task completions, signal resumes and map items. |
ConfiguredWorkflowRuntimeOrchestrator | class | Sends starts and task completions to the configured default runtime provider (Stella.Engine when not set), and resumes to the provider that holds the instance. |
WorkflowEngineRuntimeProvider | class | The Stella.Engine runtime: runs a definition through its execution handler and records the runtime state as an engine snapshot. |
class CanonicalWorkflowExecutionHandler
public sealed class CanonicalWorkflowExecutionHandler : IWorkflowExecutionHandler, IWorkflowSignalResumableExecutionHandler, IWorkflowMapItemExecutionHandler
Runs a workflow from its canonical runtime definition: starts, task completions, signal resumes and map items.
Parameters
runtimeDefinition: The runtime definition.endpointTransport: The endpoint transport.rabbitTransport: The RabbitMQ transport.graphqlTransport: The GraphQL transport.httpTransport: The HTTP transport.workflow: Evaluates the expression functions.Function Runtime workflow: The registered workflows, for child workflows.Registration Catalog workflow: The runtime definitions, for child and parent workflows.Runtime Definition Store workflow: Creates the handlers of child and parent workflows.Runtime Execution Handler Factory
Members
| Member | Kind | Summary |
|---|---|---|
CanonicalWorkflowExecutionHandler( | constructor | Runs a workflow from its canonical runtime definition: starts, task completions, signal resumes and map items. |
CompleteTaskAsync( | method | Plans the completion of a task. |
ExecuteMapItemAsync( | method | Runs the item until it waits or ends. |
StartAsync( | method | Plans the start of an instance. |
constructor CanonicalWorkflowExecutionHandler(WorkflowRuntimeDefinition, IWorkflowEndpointTransport, IWorkflowRabbitTransport, IWorkflowGraphqlTransport, IWorkflowHttpTransport, IWorkflowFunctionRuntime, IWorkflowRegistrationCatalog, IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #
CanonicalWorkflowExecutionHandler(WorkflowRuntimeDefinition, IWorkflowEndpointTransport, IWorkflowRabbitTransport, IWorkflowGraphqlTransport, IWorkflowHttpTransport, IWorkflowFunctionRuntime, IWorkflowRegistrationCatalog, IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #public CanonicalWorkflowExecutionHandler(WorkflowRuntimeDefinition runtimeDefinition, IWorkflowEndpointTransport endpointTransport, IWorkflowRabbitTransport rabbitTransport, IWorkflowGraphqlTransport graphqlTransport, IWorkflowHttpTransport httpTransport, IWorkflowFunctionRuntime workflowFunctionRuntime, IWorkflowRegistrationCatalog workflowRegistrationCatalog, IWorkflowRuntimeDefinitionStore workflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory workflowRuntimeExecutionHandlerFactory)
Runs a workflow from its canonical runtime definition: starts, task completions, signal resumes and map items.
Parameters
runtimeDefinition: The runtime definition.endpointTransport: The endpoint transport.rabbitTransport: The RabbitMQ transport.graphqlTransport: The GraphQL transport.httpTransport: The HTTP transport.workflow: Evaluates the expression functions.Function Runtime workflow: The registered workflows, for child workflows.Registration Catalog workflow: The runtime definitions, for child and parent workflows.Runtime Definition Store workflow: Creates the handlers of child and parent workflows.Runtime Execution Handler Factory
method CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) #
CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) #public Task<WorkflowTaskCompletionPlan> CompleteTaskAsync(WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)
Plans the completion of a task.
Parameters
context: The task context.cancellationToken: Cancels the operation.
Returns
The plan.
method ExecuteMapItemAsync(WorkflowMapItemExecutionRequest, CancellationToken) #
ExecuteMapItemAsync(WorkflowMapItemExecutionRequest, CancellationToken) #public Task<WorkflowMapItemExecutionDecision> ExecuteMapItemAsync(WorkflowMapItemExecutionRequest request, CancellationToken cancellationToken = default)
Runs the item until it waits or ends.
Parameters
request: The item.cancellationToken: Cancels the operation.
Returns
What happens next.
method StartAsync(WorkflowStartExecutionContext, CancellationToken) #
StartAsync(WorkflowStartExecutionContext, CancellationToken) #public Task<WorkflowStartExecutionPlan> StartAsync(WorkflowStartExecutionContext context, CancellationToken cancellationToken = default)
Plans the start of an instance.
Parameters
context: The start context.cancellationToken: Cancels the operation.
Returns
The plan.
class ConfiguredWorkflowRuntimeOrchestrator
public sealed class ConfiguredWorkflowRuntimeOrchestrator : IWorkflowRuntimeOrchestrator
Sends starts and task completions to the configured default runtime provider (Stella.Engine when not set), and resumes to the provider that holds the instance. A provider must be registered and, when the enabled list is not empty, enabled.
Parameters
runtimeProviders: The registered providers; names compare ignoring case, and for a repeated name the last one wins.runtimeOptions: The runtime options: the default provider and the enabled providers.
Members
| Member | Kind | Summary |
|---|---|---|
ConfiguredWorkflowRuntimeOrchestrator( | constructor | Sends starts and task completions to the configured default runtime provider (Stella.Engine when not set), and resumes to the provider that holds the instance. |
CompleteAsync( | method | Completes a task. |
ResumeAsync( | method | Resumes an instance with a signal. |
StartAsync( | method | Starts an instance. |
constructor ConfiguredWorkflowRuntimeOrchestrator(IEnumerable<IWorkflowRuntimeProvider>, IOptions<WorkflowRuntimeOptions>) #
ConfiguredWorkflowRuntimeOrchestrator(IEnumerable<IWorkflowRuntimeProvider>, IOptions<WorkflowRuntimeOptions>) #public ConfiguredWorkflowRuntimeOrchestrator(IEnumerable<IWorkflowRuntimeProvider> runtimeProviders, IOptions<WorkflowRuntimeOptions> runtimeOptions)
Sends starts and task completions to the configured default runtime provider (Stella.Engine when not set), and resumes to the provider that holds the instance. A provider must be registered and, when the enabled list is not empty, enabled.
Parameters
runtimeProviders: The registered providers; names compare ignoring case, and for a repeated name the last one wins.runtimeOptions: The runtime options: the default provider and the enabled providers.
method CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #
CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> CompleteAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)
Completes a task.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The task context.cancellationToken: Cancels the operation.
Returns
The outcome.
method ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #
ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> ResumeAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowSignalExecutionContext context, CancellationToken cancellationToken = default)
Resumes an instance with a signal.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The signal context.cancellationToken: Cancels the operation.
Returns
The outcome.
method StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #
StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> StartAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowBusinessReference? businessReference, StartWorkflowRequest request, object startRequest, CancellationToken cancellationToken = default)
Starts an instance.
Parameters
registration: The workflow registration.definition: The definition descriptor.businessReference: The business reference.request: The start request.startRequest: The typed start request.cancellationToken: Cancels the operation.
Returns
The outcome.
class WorkflowEngineRuntimeProvider
public sealed class WorkflowEngineRuntimeProvider : IWorkflowRuntimeProvider
The Stella.Engine runtime: runs a definition through its execution handler and records the runtime state as an engine snapshot.
Parameters
workflow: The runtime definitions.Runtime Definition Store workflow: Creates the execution handlers.Runtime Execution Handler Factory
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowEngineRuntimeProvider( | constructor | The Stella.Engine runtime: runs a definition through its execution handler and records the runtime state as an engine snapshot. |
ProviderName | property | The provider name. |
CompleteAsync( | method | Completes a task. |
ResumeAsync( | method | Resumes an instance with a signal. |
StartAsync( | method | Starts an instance. |
constructor WorkflowEngineRuntimeProvider(IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #
WorkflowEngineRuntimeProvider(IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #public WorkflowEngineRuntimeProvider(IWorkflowRuntimeDefinitionStore workflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory workflowRuntimeExecutionHandlerFactory)
The Stella.Engine runtime: runs a definition through its execution handler and records the runtime state as an engine snapshot.
Parameters
workflow: The runtime definitions.Runtime Definition Store workflow: Creates the execution handlers.Runtime Execution Handler Factory
property ProviderName #
ProviderName #public string ProviderName { get; }
The provider name.
method CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #
CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> CompleteAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)
Completes a task.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The task context.cancellationToken: Cancels the operation.
Returns
The outcome.
method ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #
ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> ResumeAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowSignalExecutionContext context, CancellationToken cancellationToken = default)
Resumes an instance with a signal.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The signal context.cancellationToken: Cancels the operation.
Returns
The outcome.
method StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #
StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> StartAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowBusinessReference? businessReference, StartWorkflowRequest request, object startRequest, CancellationToken cancellationToken = default)
Starts an instance.
Parameters
registration: The workflow registration.definition: The definition descriptor.businessReference: The business reference.request: The start request.startRequest: The typed start request.cancellationToken: Cancels the operation.
Returns
The outcome.
namespace StellaOps.Workflow.Engine.ExternalActivities
| Type | Kind | Description |
|---|---|---|
ConstantsClass | class | The states, dispositions, event types and stop values of external activities. |
WorkflowActivityCancelOutboxMessage | record | A cancel request to publish on a cancel lane. |
WorkflowActivityControlService | class | Controls external activity steps: classifies failures for retry, retries steps, records continuations, reprocesses scopes, stops activities and publishes their cancel messages. |
WorkflowActivityFailureRequest | record | A failed attempt to decide a retry for. |
WorkflowActivityReprocessScopeRequest | record | An operator request to run a scope again. |
WorkflowActivityReprocessScopeResult | record | The new occurrence of a reprocessed scope. |
WorkflowActivityRetryDecision | record | Whether and when a failed step is retried. |
WorkflowActivityRetryStepRequest | record | An operator request to retry a step now. |
WorkflowActivityStopRequest | record | A request to stop the activities of a target: a cancel or a deadline. |
WorkflowActivityStopResult | record | The outcome of a stop. |
WorkflowContinuationRegistrationRequest | record | A continuation an attempt reported, to register for the next attempt. |
WorkflowExternalActivityCompletionDecision | record | The outcome of a completion: the delivery disposition, and the signal that resumes the waiting step when there is one. |
WorkflowExternalActivityCompletionRequest | record | A completion received on the completed lane. |
WorkflowExternalActivityCompletionResult | record | How a completion was handled. |
WorkflowExternalActivityCompletionService | class | Records a completion from the completed lane and, when the step can resume, builds the signal that resumes it, with the result (or the outcome and the failure) as payload. |
WorkflowExternalActivityContractKinds | class | The contract kinds of external activities. |
WorkflowExternalActivityDispatchRequest | record | An attempt to dispatch. |
WorkflowExternalActivityDispatchResult | record | A recorded dispatch. |
WorkflowExternalActivityDispatchService | class | Turns an external activity wait into a durable dispatch; the step’s evaluated request travels inline. |
WorkflowExternalActivityLanes | class | The default lanes of external activities. |
WorkflowExternalActivityOutboxMessage | record | A request to publish on an execute lane. |
WorkflowExternalActivityRegistry | class | The external activity registry of the host’s signed manifest. |
WorkflowExternalActivityRegistryEntry | record | An external activity of the manifest. |
WorkflowExternalActivityRegistryException | class | Raised when the registry manifest cannot be loaded. |
WorkflowExternalActivityRegistryHealthCheck | class | Healthy once the signed external activity registry is verified; unhealthy, with the readiness failure code, until then. |
WorkflowExternalActivityRegistryManifest | record | The signed registry manifest of a host. |
WorkflowExternalActivityRegistryOptions | class | The signed manifest of the external activities the host may run (Workflow). |
WorkflowExternalActivityService | class | Records external activity dispatches and completions once, with their outbox entries. |
WorkflowExternalActivitySignalDispatcher | class | Dispatches an external activity step durably (DurableDispatch pending signal). |
class ConstantsClass
public static class ConstantsClass
The states, dispositions, event types and stop values of external activities.
Members
| Member | Kind | Summary |
|---|---|---|
AttemptApplied | constant | Attempt: its completion was applied. |
AttemptCanceled | constant | Attempt: canceled. |
AttemptDeadlineLost | constant | Attempt: its deadline passed first. |
AttemptDispatched | constant | Attempt: dispatched, waiting for its completion. |
AttemptFailed | constant | Attempt: failed. |
CancelPublished | constant | Cancel: sent. |
CancelReady | constant | Cancel: waiting in the outbox. |
CompletionApplied | constant | Completion: applied. |
CompletionCanceled | constant | Completion: arrived after a cancel. |
CompletionDeadlineLost | constant | Completion: arrived after the deadline. |
CompletionDuplicate | constant | Completion: a duplicate of one already applied. |
CompletionLate | constant | Completion: arrived after the attempt ended. |
CompletionReconciliation | constant | Completion: kept for reconciliation. |
CompletionRejected | constant | Completion: refused. |
ContinuationConsumed | constant | Continuation: resumed by an attempt. |
ContinuationReady | constant | Continuation: waiting for the next attempt. |
ContinuationRevoked | constant | Continuation: revoked by a cancel. |
DispatchPublished | constant | Dispatch: sent. |
DispatchReady | constant | Dispatch: waiting in the outbox. |
DispatchRevoked | constant | Dispatch: revoked before it was sent. |
EventActivityCanceled | constant | History event: an activity was canceled. |
EventActivityCompleted | constant | History event: an activity completed. |
EventActivityDeadlineWon | constant | History event: the deadline ended an activity first. |
EventActivityDispatched | constant | History event: an activity was dispatched. |
EventActivityFailed | constant | History event: an activity failed. |
FailureActivityDeadline | constant | Failure category of an activity that reached its deadline. |
ReprocessRequested | constant | Scope reprocess: requested. |
StepCanceled | constant | Step: canceled. |
StepCompleted | constant | Step: completed. |
StepDeadlineFailure | constant | Step: failed at its deadline; cleanup is pending. |
StepDeadlinePendingReconciliation | constant | Step: its deadline passed; reconciliation is pending. |
StepRetryExhausted | constant | Step: no retry is left. |
StepRetryPending | constant | Step: a retry is pending. |
StepWaiting | constant | Step: waiting for its attempt. |
StopModeCancel | constant | Stop mode: a cancel. |
StopModeDeadline | constant | Stop mode: a deadline. |
StopTargetExecution | constant | Stop target: a whole execution. |
StopTargetMap | constant | Stop target: a map. |
StopTargetScope | constant | Stop target: a scope. |
StopTargetStep | constant | Stop target: one step. |
constant AttemptApplied #
AttemptApplied #public const string AttemptApplied = "APPLIED"
Attempt: its completion was applied.
constant AttemptCanceled #
AttemptCanceled #public const string AttemptCanceled = "CANCELED"
Attempt: canceled.
constant AttemptDeadlineLost #
AttemptDeadlineLost #public const string AttemptDeadlineLost = "DEADLINE_LOST"
Attempt: its deadline passed first.
constant AttemptDispatched #
AttemptDispatched #public const string AttemptDispatched = "DISPATCHED"
Attempt: dispatched, waiting for its completion.
constant AttemptFailed #
AttemptFailed #public const string AttemptFailed = "FAILED"
Attempt: failed.
constant CancelPublished #
CancelPublished #public const string CancelPublished = "PUBLISHED"
Cancel: sent.
constant CancelReady #
CancelReady #public const string CancelReady = "READY"
Cancel: waiting in the outbox.
constant CompletionApplied #
CompletionApplied #public const string CompletionApplied = "APPLIED"
Completion: applied.
constant CompletionCanceled #
CompletionCanceled #public const string CompletionCanceled = "CANCELED"
Completion: arrived after a cancel.
constant CompletionDeadlineLost #
CompletionDeadlineLost #public const string CompletionDeadlineLost = "DEADLINE_LOST"
Completion: arrived after the deadline.
constant CompletionDuplicate #
CompletionDuplicate #public const string CompletionDuplicate = "DUPLICATE"
Completion: a duplicate of one already applied.
constant CompletionLate #
CompletionLate #public const string CompletionLate = "LATE"
Completion: arrived after the attempt ended.
constant CompletionReconciliation #
CompletionReconciliation #public const string CompletionReconciliation = "RECONCILING"
Completion: kept for reconciliation.
constant CompletionRejected #
CompletionRejected #public const string CompletionRejected = "REJECTED"
Completion: refused.
constant ContinuationConsumed #
ContinuationConsumed #public const string ContinuationConsumed = "CONSUMED"
Continuation: resumed by an attempt.
constant ContinuationReady #
ContinuationReady #public const string ContinuationReady = "READY"
Continuation: waiting for the next attempt.
constant ContinuationRevoked #
ContinuationRevoked #public const string ContinuationRevoked = "REVOKED"
Continuation: revoked by a cancel.
constant DispatchPublished #
DispatchPublished #public const string DispatchPublished = "PUBLISHED"
Dispatch: sent.
constant DispatchReady #
DispatchReady #public const string DispatchReady = "READY"
Dispatch: waiting in the outbox.
constant DispatchRevoked #
DispatchRevoked #public const string DispatchRevoked = "REVOKED"
Dispatch: revoked before it was sent.
constant EventActivityCanceled #
EventActivityCanceled #public const string EventActivityCanceled = "EXTERNAL_ACTIVITY_CANCELED"
History event: an activity was canceled.
constant EventActivityCompleted #
EventActivityCompleted #public const string EventActivityCompleted = "EXTERNAL_ACTIVITY_COMPLETED"
History event: an activity completed.
constant EventActivityDeadlineWon #
EventActivityDeadlineWon #public const string EventActivityDeadlineWon = "EXTERNAL_ACTIVITY_DEADLINE_WON"
History event: the deadline ended an activity first.
constant EventActivityDispatched #
EventActivityDispatched #public const string EventActivityDispatched = "EXTERNAL_ACTIVITY_DISPATCHED"
History event: an activity was dispatched.
constant EventActivityFailed #
EventActivityFailed #public const string EventActivityFailed = "EXTERNAL_ACTIVITY_FAILED"
History event: an activity failed.
constant FailureActivityDeadline #
FailureActivityDeadline #public const string FailureActivityDeadline = "ACTIVITY_DEADLINE"
Failure category of an activity that reached its deadline.
constant ReprocessRequested #
ReprocessRequested #public const string ReprocessRequested = "REQUESTED"
Scope reprocess: requested.
constant StepCanceled #
StepCanceled #public const string StepCanceled = "CANCELED"
Step: canceled.
constant StepCompleted #
StepCompleted #public const string StepCompleted = "COMPLETED"
Step: completed.
constant StepDeadlineFailure #
StepDeadlineFailure #public const string StepDeadlineFailure = "TECHNICAL_FAILURE_CLEANUP_PENDING"
Step: failed at its deadline; cleanup is pending.
constant StepDeadlinePendingReconciliation #
StepDeadlinePendingReconciliation #public const string StepDeadlinePendingReconciliation = "DEADLINE_PENDING_RECONCILIATION"
Step: its deadline passed; reconciliation is pending.
constant StepRetryExhausted #
StepRetryExhausted #public const string StepRetryExhausted = "RETRY_EXHAUSTED"
Step: no retry is left.
constant StepRetryPending #
StepRetryPending #public const string StepRetryPending = "RETRY_PENDING"
Step: a retry is pending.
constant StepWaiting #
StepWaiting #public const string StepWaiting = "WAITING"
Step: waiting for its attempt.
constant StopModeCancel #
StopModeCancel #public const string StopModeCancel = "CANCEL"
Stop mode: a cancel.
constant StopModeDeadline #
StopModeDeadline #public const string StopModeDeadline = "DEADLINE"
Stop mode: a deadline.
constant StopTargetExecution #
StopTargetExecution #public const string StopTargetExecution = "EXECUTION"
Stop target: a whole execution.
constant StopTargetMap #
StopTargetMap #public const string StopTargetMap = "MAP"
Stop target: a map.
constant StopTargetScope #
StopTargetScope #public const string StopTargetScope = "SCOPE"
Stop target: a scope.
constant StopTargetStep #
StopTargetStep #public const string StopTargetStep = "STEP"
Stop target: one step.
record WorkflowActivityCancelOutboxMessage
public sealed record WorkflowActivityCancelOutboxMessage
A cancel request to publish on a cancel lane.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityCancelOutboxMessage( | constructor | Creates an instance of Workflow. |
AttemptId | property | The attempt. |
CancelFenceVersion | property | The cancel fence of the request. |
CancelId | property | The cancel request. |
CancelLane | property | The lane the cancel goes to. |
CanonicalPayloadJson | property | The canonical payload, as JSON. |
EventId | property | The cancel event. |
PayloadSha256 | property | The SHA-256 of the payload. |
constructor WorkflowActivityCancelOutboxMessage() #
WorkflowActivityCancelOutboxMessage() #public WorkflowActivityCancelOutboxMessage()
Creates an instance of Workflow.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property CancelFenceVersion #
CancelFenceVersion #public required long CancelFenceVersion { get; init; }
The cancel fence of the request.
property CancelId #
CancelId #public required string CancelId { get; init; }
The cancel request.
property CancelLane #
CancelLane #public required string CancelLane { get; init; }
The lane the cancel goes to.
property CanonicalPayloadJson #
CanonicalPayloadJson #public required string CanonicalPayloadJson { get; init; }
The canonical payload, as JSON.
property EventId #
EventId #public required string EventId { get; init; }
The cancel event.
property PayloadSha256 #
PayloadSha256 #public required string PayloadSha256 { get; init; }
The SHA-256 of the payload.
class WorkflowActivityControlService
public sealed class WorkflowActivityControlService
Controls external activity steps: classifies failures for retry, retries steps, records continuations, reprocesses scopes, stops activities and publishes their cancel messages.
Parameters
store: The external activity store.mutationCoordinator: Begins the change scopes.registry: The external activity registry; it names the cancel lanes.timeProvider: The clock.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityControlService( | constructor | Controls external activity steps: classifies failures for retry, retries steps, records continuations, reprocesses scopes, stops activities and publishes their cancel messages. |
ClassifyFailureAsync( | method | Records a step failure and decides on a retry: the step waits for a retry after the policy’s delay, or its retries are exhausted when no attempt is left, the category is not retryable or the absolute deadline has passed. |
GetReadyCancelsAsync( | method | Returns the cancel messages ready to publish. |
MarkCancelPublishedAsync( | method | Marks a cancel message published. |
RegisterContinuationAsync( | method | Records the continuation of an attempt, for the next attempt. |
ReprocessScopeAsync( | method | Records a request to reprocess a scope. |
RetryStepAsync( | method | Dispatches the next attempt of a step that waits for a retry, once its delay has passed; marks the retries exhausted when no attempt is left. |
StopAsync( | method | Stops the activities of a target in one change scope: open steps are canceled, or fail with a deadline in deadline mode; their ready dispatches are revoked and cancel messages are queued. |
constructor WorkflowActivityControlService(IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, IWorkflowExternalActivityRegistry, TimeProvider) #
WorkflowActivityControlService(IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, IWorkflowExternalActivityRegistry, TimeProvider) #public WorkflowActivityControlService(IWorkflowExternalActivityStore store, IWorkflowMutationCoordinator mutationCoordinator, IWorkflowExternalActivityRegistry registry, TimeProvider timeProvider)
Controls external activity steps: classifies failures for retry, retries steps, records continuations, reprocesses scopes, stops activities and publishes their cancel messages.
Parameters
store: The external activity store.mutationCoordinator: Begins the change scopes.registry: The external activity registry; it names the cancel lanes.timeProvider: The clock.
method ClassifyFailureAsync(WorkflowActivityFailureRequest, CancellationToken) #
ClassifyFailureAsync(WorkflowActivityFailureRequest, CancellationToken) #public Task<WorkflowActivityRetryDecision> ClassifyFailureAsync(WorkflowActivityFailureRequest request, CancellationToken cancellationToken = default)
Records a step failure and decides on a retry: the step waits for a retry after the policy’s delay, or its retries are exhausted when no attempt is left, the category is not retryable or the absolute deadline has passed.
Parameters
request: The failure.cancellationToken: Cancels the operation.
Returns
The retry decision.
method GetReadyCancelsAsync(int, CancellationToken) #
GetReadyCancelsAsync(int, CancellationToken) #public Task<IReadOnlyList<WorkflowActivityCancelOutboxMessage>> GetReadyCancelsAsync(int maxCount, CancellationToken cancellationToken = default)
Returns the cancel messages ready to publish.
Parameters
maxCount: The most messages to return, from 1 to 1,000.cancellationToken: Cancels the operation.
Returns
The messages.
Exceptions
Argument: The count is outside 1 to 1,000.Out Of Range Exception
method MarkCancelPublishedAsync(string, DateTimeOffset, CancellationToken) #
MarkCancelPublishedAsync(string, DateTimeOffset, CancellationToken) #public Task MarkCancelPublishedAsync(string cancelId, DateTimeOffset publishedAt, CancellationToken cancellationToken = default)
Marks a cancel message published.
Parameters
cancelId: The cancel message.publishedAt: When it was published.cancellationToken: Cancels the operation.
Returns
A task that completes when the message is marked.
method RegisterContinuationAsync(WorkflowContinuationRegistrationRequest, CancellationToken) #
RegisterContinuationAsync(WorkflowContinuationRegistrationRequest, CancellationToken) #public Task<WorkflowContinuationLineage> RegisterContinuationAsync(WorkflowContinuationRegistrationRequest request, CancellationToken cancellationToken = default)
Records the continuation of an attempt, for the next attempt. A continuation already recorded under its lineage id is returned when its hash matches.
Parameters
request: The continuation.cancellationToken: Cancels the operation.
Returns
The continuation lineage.
Exceptions
Argument: The generation is not positive.Out Of Range Exception Invalid: The attempt does not exist or names another execution, scope, step or completion, or a recorded continuation has another hash.Operation Exception
method ReprocessScopeAsync(WorkflowActivityReprocessScopeRequest, CancellationToken) #
ReprocessScopeAsync(WorkflowActivityReprocessScopeRequest, CancellationToken) #public Task<WorkflowActivityReprocessScopeResult> ReprocessScopeAsync(WorkflowActivityReprocessScopeRequest request, CancellationToken cancellationToken = default)
Records a request to reprocess a scope. The successor scope id is the source scope id followed by :r and the occurrence number.
Parameters
request: The reprocess request.cancellationToken: Cancels the operation.
Returns
The reprocess and its successor scope.
method RetryStepAsync(WorkflowActivityRetryStepRequest, CancellationToken) #
RetryStepAsync(WorkflowActivityRetryStepRequest, CancellationToken) #public Task<WorkflowActivityRetryDecision> RetryStepAsync(WorkflowActivityRetryStepRequest request, CancellationToken cancellationToken = default)
Dispatches the next attempt of a step that waits for a retry, once its delay has passed; marks the retries exhausted when no attempt is left.
Parameters
request: The retry.cancellationToken: Cancels the operation.
Returns
The retry decision, with the dispatch.
Exceptions
WorkflowStoreConcurrencyException: The cancel fence version differs.Invalid: The step does not wait for a retry, its delay has not passed, or its prior attempt cannot be retried by an operator.Operation Exception
method StopAsync(WorkflowActivityStopRequest, CancellationToken) #
StopAsync(WorkflowActivityStopRequest, CancellationToken) #public Task<WorkflowActivityStopResult> StopAsync(WorkflowActivityStopRequest request, CancellationToken cancellationToken = default)
Stops the activities of a target in one change scope: open steps are canceled, or fail with a deadline in deadline mode; their ready dispatches are revoked and cancel messages are queued.
Parameters
request: The stop request.cancellationToken: Cancels the operation.
Returns
The counts of the stop.
Exceptions
Invalid: The cancel lane of a workflow activity is not registered.Operation Exception
record WorkflowActivityFailureRequest
public sealed record WorkflowActivityFailureRequest
A failed attempt to decide a retry for.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityFailureRequest( | constructor | Creates an instance of Workflow. |
DeterministicJitterSeed | property | The seed of the deterministic jitter. |
FailureCategory | property | The failure category. |
ProviderRetryAfterSeconds | property | The delay the provider asked for, in seconds. |
RetryPolicy | property | The retry policy. |
StepExecutionId | property | The step execution. |
constructor WorkflowActivityFailureRequest() #
WorkflowActivityFailureRequest() #public WorkflowActivityFailureRequest()
Creates an instance of Workflow.
property DeterministicJitterSeed #
DeterministicJitterSeed #public int DeterministicJitterSeed { get; init; }
The seed of the deterministic jitter.
property FailureCategory #
FailureCategory #public required string FailureCategory { get; init; }
The failure category.
property ProviderRetryAfterSeconds #
ProviderRetryAfterSeconds #public int? ProviderRetryAfterSeconds { get; init; }
The delay the provider asked for, in seconds.
property RetryPolicy #
RetryPolicy #public required WorkflowRetryPolicyDeclaration RetryPolicy { get; init; }
The retry policy.
property StepExecutionId #
StepExecutionId #public required string StepExecutionId { get; init; }
The step execution.
record WorkflowActivityReprocessScopeRequest
public sealed record WorkflowActivityReprocessScopeRequest
An operator request to run a scope again.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityReprocessScopeRequest( | constructor | Creates an instance of Workflow. |
ReasonCode | property | Why. |
RequestedBy | property | Who requested it. |
SourceScopeExecutionId | property | The scope to run again. |
WorkflowExecutionId | property | The execution (workflow instance). |
constructor WorkflowActivityReprocessScopeRequest() #
WorkflowActivityReprocessScopeRequest() #public WorkflowActivityReprocessScopeRequest()
Creates an instance of Workflow.
property ReasonCode #
ReasonCode #public required string ReasonCode { get; init; }
Why.
property RequestedBy #
RequestedBy #public required string RequestedBy { get; init; }
Who requested it.
property SourceScopeExecutionId #
SourceScopeExecutionId #public required string SourceScopeExecutionId { get; init; }
The scope to run again.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution (workflow instance).
record WorkflowActivityReprocessScopeResult
public sealed record WorkflowActivityReprocessScopeResult
The new occurrence of a reprocessed scope.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityReprocessScopeResult( | constructor | Creates an instance of Workflow. |
OccurrenceNumber | property | The occurrence number. |
ReprocessId | property | The reprocess request. |
Status | property | The status. |
SuccessorScopeExecutionId | property | The new scope occurrence. |
constructor WorkflowActivityReprocessScopeResult() #
WorkflowActivityReprocessScopeResult() #public WorkflowActivityReprocessScopeResult()
Creates an instance of Workflow.
property OccurrenceNumber #
OccurrenceNumber #public required int OccurrenceNumber { get; init; }
The occurrence number.
property ReprocessId #
ReprocessId #public required string ReprocessId { get; init; }
The reprocess request.
property Status #
Status #public required string Status { get; init; }
The status.
property SuccessorScopeExecutionId #
SuccessorScopeExecutionId #public required string SuccessorScopeExecutionId { get; init; }
The new scope occurrence.
record WorkflowActivityRetryDecision
public sealed record WorkflowActivityRetryDecision
Whether and when a failed step is retried.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityRetryDecision( | constructor | Creates an instance of Workflow. |
CompletedSemanticAttempts | property | The attempts made. |
Dispatch | property | The dispatch of the retry, when it was sent at once. |
Disposition | property | How it was handled. |
NextSemanticAttempt | property | The number of the next attempt. |
NotBeforeUtc | property | The earliest time of the retry, in UTC. |
RetryAllowed | property | Whether a retry is allowed. |
ReuseBinding | property | Whether the retry keeps the binding of the previous attempt. |
StepExecutionId | property | The step execution. |
constructor WorkflowActivityRetryDecision() #
WorkflowActivityRetryDecision() #public WorkflowActivityRetryDecision()
Creates an instance of Workflow.
property CompletedSemanticAttempts #
CompletedSemanticAttempts #public required int CompletedSemanticAttempts { get; init; }
The attempts made.
property Dispatch #
Dispatch #public WorkflowExternalActivityDispatchResult? Dispatch { get; init; }
The dispatch of the retry, when it was sent at once.
property Disposition #
Disposition #public required string Disposition { get; init; }
How it was handled.
property NextSemanticAttempt #
NextSemanticAttempt #public int? NextSemanticAttempt { get; init; }
The number of the next attempt.
property NotBeforeUtc #
NotBeforeUtc #public DateTime? NotBeforeUtc { get; init; }
The earliest time of the retry, in UTC.
property RetryAllowed #
RetryAllowed #public required bool RetryAllowed { get; init; }
Whether a retry is allowed.
property ReuseBinding #
ReuseBinding #public required bool ReuseBinding { get; init; }
Whether the retry keeps the binding of the previous attempt.
property StepExecutionId #
StepExecutionId #public required string StepExecutionId { get; init; }
The step execution.
record WorkflowActivityRetryStepRequest
public sealed record WorkflowActivityRetryStepRequest
An operator request to retry a step now.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityRetryStepRequest( | constructor | Creates an instance of Workflow. |
AttemptId | property | The attempt. |
DispatchId | property | The dispatch. |
ExpectedCancelFenceVersion | property | The cancel fence the step must still have. |
RequestedBy | property | Who requested it. |
StepExecutionId | property | The step execution. |
constructor WorkflowActivityRetryStepRequest() #
WorkflowActivityRetryStepRequest() #public WorkflowActivityRetryStepRequest()
Creates an instance of Workflow.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property DispatchId #
DispatchId #public required string DispatchId { get; init; }
The dispatch.
property ExpectedCancelFenceVersion #
ExpectedCancelFenceVersion #public long ExpectedCancelFenceVersion { get; init; }
The cancel fence the step must still have.
property RequestedBy #
RequestedBy #public required string RequestedBy { get; init; }
Who requested it.
property StepExecutionId #
StepExecutionId #public required string StepExecutionId { get; init; }
The step execution.
record WorkflowActivityStopRequest
public sealed record WorkflowActivityStopRequest
A request to stop the activities of a target: a cancel or a deadline.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityStopRequest( | constructor | Creates an instance of Workflow. |
DeadlineAt | property | The deadline, for a deadline stop. |
Mode | property | CANCEL or DEADLINE. |
ReasonCode | property | Why. |
TargetId | property | The target. |
TargetKind | property | The kind of the target. |
constructor WorkflowActivityStopRequest() #
WorkflowActivityStopRequest() #public WorkflowActivityStopRequest()
Creates an instance of Workflow.
property DeadlineAt #
DeadlineAt #public DateTimeOffset? DeadlineAt { get; init; }
The deadline, for a deadline stop.
property Mode #
Mode #public required string Mode { get; init; }
CANCEL or DEADLINE.
property ReasonCode #
ReasonCode #public required string ReasonCode { get; init; }
Why.
property TargetId #
TargetId #public required string TargetId { get; init; }
The target.
property TargetKind #
TargetKind #public required string TargetKind { get; init; }
The kind of the target.
record WorkflowActivityStopResult
public sealed record WorkflowActivityStopResult
The outcome of a stop.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivityStopResult( | constructor | Creates an instance of Workflow. |
AlreadyTerminalCount | property | The steps that had already ended. |
CancelMessagesQueued | property | The cancel requests queued. |
ReconciliationCount | property | The steps left for reconciliation. |
TargetId | property | The target. |
TargetKind | property | The kind of the target. |
WonCount | property | The steps the stop ended. |
constructor WorkflowActivityStopResult() #
WorkflowActivityStopResult() #public WorkflowActivityStopResult()
Creates an instance of Workflow.
property AlreadyTerminalCount #
AlreadyTerminalCount #public required int AlreadyTerminalCount { get; init; }
The steps that had already ended.
property CancelMessagesQueued #
CancelMessagesQueued #public required int CancelMessagesQueued { get; init; }
The cancel requests queued.
property ReconciliationCount #
ReconciliationCount #public required int ReconciliationCount { get; init; }
The steps left for reconciliation.
property TargetId #
TargetId #public required string TargetId { get; init; }
The target.
property TargetKind #
TargetKind #public required string TargetKind { get; init; }
The kind of the target.
property WonCount #
WonCount #public required int WonCount { get; init; }
The steps the stop ended.
record WorkflowContinuationRegistrationRequest
public sealed record WorkflowContinuationRegistrationRequest
A continuation an attempt reported, to register for the next attempt.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowContinuationRegistrationRequest( | constructor | Creates an instance of Workflow. |
ContinuationRef | property | The provider’s continuation reference. |
ContinuationSha256 | property | The SHA-256 of the continuation. |
Generation | property | The continuation generation. |
LineageId | property | The lineage. |
ScopeExecutionId | property | The scope of the step. |
SourceAttemptId | property | The attempt that left the continuation. |
SourceCompletionEventId | property | The completion that carried it. |
StepExecutionId | property | The step execution. |
WorkflowExecutionId | property | The execution (workflow instance). |
constructor WorkflowContinuationRegistrationRequest() #
WorkflowContinuationRegistrationRequest() #public WorkflowContinuationRegistrationRequest()
Creates an instance of Workflow.
property ContinuationRef #
ContinuationRef #public required string ContinuationRef { get; init; }
The provider’s continuation reference.
property ContinuationSha256 #
ContinuationSha256 #public required string ContinuationSha256 { get; init; }
The SHA-256 of the continuation.
property Generation #
Generation #public long Generation { get; init; }
The continuation generation.
property LineageId #
LineageId #public required string LineageId { get; init; }
The lineage.
property ScopeExecutionId #
ScopeExecutionId #public required string ScopeExecutionId { get; init; }
The scope of the step.
property SourceAttemptId #
SourceAttemptId #public required string SourceAttemptId { get; init; }
The attempt that left the continuation.
property SourceCompletionEventId #
SourceCompletionEventId #public required string SourceCompletionEventId { get; init; }
The completion that carried it.
property StepExecutionId #
StepExecutionId #public required string StepExecutionId { get; init; }
The step execution.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution (workflow instance).
record WorkflowExternalActivityCompletionDecision
public sealed record WorkflowExternalActivityCompletionDecision
The outcome of a completion: the delivery disposition, and the signal that resumes the waiting step when there is one.
Parameters
Disposition: The delivery disposition.ResumeSignal: The signal that resumes the waiting step or map item;nullwhen nothing resumes.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityCompletionDecision( | constructor | The outcome of a completion: the delivery disposition, and the signal that resumes the waiting step when there is one. |
Disposition | property | The delivery disposition. |
ResumeSignal | property | The signal that resumes the waiting step or map item; null when nothing resumes. |
constructor WorkflowExternalActivityCompletionDecision(WorkflowDeliveryDisposition, WorkflowSignalEnvelope) #
WorkflowExternalActivityCompletionDecision(WorkflowDeliveryDisposition, WorkflowSignalEnvelope) #public WorkflowExternalActivityCompletionDecision(WorkflowDeliveryDisposition Disposition, WorkflowSignalEnvelope? ResumeSignal)
The outcome of a completion: the delivery disposition, and the signal that resumes the waiting step when there is one.
Parameters
Disposition: The delivery disposition.ResumeSignal: The signal that resumes the waiting step or map item;nullwhen nothing resumes.
property Disposition #
Disposition #public WorkflowDeliveryDisposition Disposition { get; init; }
The delivery disposition.
property ResumeSignal #
ResumeSignal #public WorkflowSignalEnvelope? ResumeSignal { get; init; }
The signal that resumes the waiting step or map item; null when nothing resumes.
record WorkflowExternalActivityCompletionRequest
public sealed record WorkflowExternalActivityCompletionRequest
A completion received on the completed lane.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityCompletionRequest( | constructor | Creates an instance of Workflow. |
AttemptId | property | The attempt. |
CanonicalCompletionJson | property | The canonical completion, as JSON. |
EventId | property | The completion event. |
ReceivedAt | property | When the completion was received; now when not set. |
constructor WorkflowExternalActivityCompletionRequest() #
WorkflowExternalActivityCompletionRequest() #public WorkflowExternalActivityCompletionRequest()
Creates an instance of Workflow.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property CanonicalCompletionJson #
CanonicalCompletionJson #public required string CanonicalCompletionJson { get; init; }
The canonical completion, as JSON.
property EventId #
EventId #public required string EventId { get; init; }
The completion event.
property ReceivedAt #
ReceivedAt #public DateTimeOffset? ReceivedAt { get; init; }
When the completion was received; now when not set.
record WorkflowExternalActivityCompletionResult
public sealed record WorkflowExternalActivityCompletionResult
How a completion was handled.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityCompletionResult( | constructor | Creates an instance of Workflow. |
AcknowledgedAfterCommit | property | Whether the completion may be acknowledged: its handling committed. |
AttemptId | property | The attempt. |
Disposition | property | How it was handled. |
EventId | property | The completion event. |
ExecutionVersion | property | The execution version after the operation. |
SafeCode | property | The safe code of a refusal. |
constructor WorkflowExternalActivityCompletionResult() #
WorkflowExternalActivityCompletionResult() #public WorkflowExternalActivityCompletionResult()
Creates an instance of Workflow.
property AcknowledgedAfterCommit #
AcknowledgedAfterCommit #public required bool AcknowledgedAfterCommit { get; init; }
Whether the completion may be acknowledged: its handling committed.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property Disposition #
Disposition #public required string Disposition { get; init; }
How it was handled.
property EventId #
EventId #public required string EventId { get; init; }
The completion event.
property ExecutionVersion #
ExecutionVersion #public long? ExecutionVersion { get; init; }
The execution version after the operation.
property SafeCode #
SafeCode #public string? SafeCode { get; init; }
The safe code of a refusal.
class WorkflowExternalActivityCompletionService
public sealed class WorkflowExternalActivityCompletionService
Records a completion from the completed lane and, when the step can resume, builds the signal that resumes it, with the result (or the outcome and the failure) as payload.
Parameters
store: The external activity store.activityService: Records the completion.mutationCoordinator: Begins the change scope; none when not set.mapCoordinator: Advances map items; needed for the completions of map items.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityCompletionService( | constructor | Records a completion from the completed lane and, when the step can resume, builds the signal that resumes it, with the result (or the outcome and the failure) as payload. |
CompleteAsync( | method | Records a completion and decides how to acknowledge it. |
constructor WorkflowExternalActivityCompletionService(IWorkflowExternalActivityStore, WorkflowExternalActivityService, IWorkflowMutationCoordinator, WorkflowMapCoordinator) #
WorkflowExternalActivityCompletionService(IWorkflowExternalActivityStore, WorkflowExternalActivityService, IWorkflowMutationCoordinator, WorkflowMapCoordinator) #public WorkflowExternalActivityCompletionService(IWorkflowExternalActivityStore store, WorkflowExternalActivityService activityService, IWorkflowMutationCoordinator? mutationCoordinator = null, WorkflowMapCoordinator? mapCoordinator = null)
Records a completion from the completed lane and, when the step can resume, builds the signal that resumes it, with the result (or the outcome and the failure) as payload.
Parameters
store: The external activity store.activityService: Records the completion.mutationCoordinator: Begins the change scope; none when not set.mapCoordinator: Advances map items; needed for the completions of map items.
method CompleteAsync(WorkflowActivityCompletionV1, string, CancellationToken) #
CompleteAsync(WorkflowActivityCompletionV1, string, CancellationToken) #public Task<WorkflowExternalActivityCompletionDecision> CompleteAsync(WorkflowActivityCompletionV1 completion, string canonicalCompletionJson, CancellationToken cancellationToken)
Records a completion and decides how to acknowledge it.
Parameters
completion: The completion.canonical: The completion, as canonical JSON.Completion Json cancellationToken: Cancels the operation.
Returns
The disposition and the resume signal.
Exceptions
Invalid: A step, an execution or a map binding the completion needs does not exist, or the step cannot resume.Operation Exception
class WorkflowExternalActivityContractKinds
public static class WorkflowExternalActivityContractKinds
The contract kinds of external activities.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowActivity | constant | The workflow activity contract, version 1. |
constant WorkflowActivity #
WorkflowActivity #public const string WorkflowActivity = "WORKFLOW_ACTIVITY_V1"
The workflow activity contract, version 1.
record WorkflowExternalActivityDispatchRequest
public sealed record WorkflowExternalActivityDispatchRequest
An attempt to dispatch.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityDispatchRequest( | constructor | Creates an instance of Workflow. |
AbsoluteDeadlineAt | property | The deadline over all attempts. |
AttemptId | property | The attempt. |
AttemptNumber | property | The attempt number, from 1. |
CanonicalRequestJson | property | The canonical request, as JSON. |
ContractVersion | property | The contract version of the activity. |
CreatedAt | property | When the dispatch was created; now when not set. |
DeadlineAt | property | The deadline of the attempt. |
DestinationCode | property | The destination of the activity. |
DispatchId | property | The dispatch. |
ExpectedExecutionVersion | property | The execution version the dispatch expects. |
LogicalStepKey | property | The step in the definition. |
MapItemId | property | The map item the step runs for, when it runs in a map. |
OperationCode | property | The operation of the activity. |
RetryPolicy | property | The retry policy of the step. |
ScopeExecutionId | property | The scope of the step. |
StepExecutionId | property | The step execution. |
WorkflowExecutionId | property | The execution (workflow instance). |
constructor WorkflowExternalActivityDispatchRequest() #
WorkflowExternalActivityDispatchRequest() #public WorkflowExternalActivityDispatchRequest()
Creates an instance of Workflow.
property AbsoluteDeadlineAt #
AbsoluteDeadlineAt #public DateTimeOffset? AbsoluteDeadlineAt { get; init; }
The deadline over all attempts.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property AttemptNumber #
AttemptNumber #public required int AttemptNumber { get; init; }
The attempt number, from 1.
property CanonicalRequestJson #
CanonicalRequestJson #public required string CanonicalRequestJson { get; init; }
The canonical request, as JSON.
property ContractVersion #
ContractVersion #public required string ContractVersion { get; init; }
The contract version of the activity.
property CreatedAt #
CreatedAt #public DateTimeOffset? CreatedAt { get; init; }
When the dispatch was created; now when not set.
property DeadlineAt #
DeadlineAt #public required DateTimeOffset DeadlineAt { get; init; }
The deadline of the attempt.
property DestinationCode #
DestinationCode #public required string DestinationCode { get; init; }
The destination of the activity.
property DispatchId #
DispatchId #public required string DispatchId { get; init; }
The dispatch.
property ExpectedExecutionVersion #
ExpectedExecutionVersion #public required long ExpectedExecutionVersion { get; init; }
The execution version the dispatch expects.
property LogicalStepKey #
LogicalStepKey #public required string LogicalStepKey { get; init; }
The step in the definition.
property MapItemId #
MapItemId #public string? MapItemId { get; init; }
The map item the step runs for, when it runs in a map.
property OperationCode #
OperationCode #public required string OperationCode { get; init; }
The operation of the activity.
property RetryPolicy #
RetryPolicy #public WorkflowRetryPolicyDeclaration? RetryPolicy { get; init; }
The retry policy of the step.
property ScopeExecutionId #
ScopeExecutionId #public required string ScopeExecutionId { get; init; }
The scope of the step.
property StepExecutionId #
StepExecutionId #public required string StepExecutionId { get; init; }
The step execution.
property WorkflowExecutionId #
WorkflowExecutionId #public required string WorkflowExecutionId { get; init; }
The execution (workflow instance).
record WorkflowExternalActivityDispatchResult
public sealed record WorkflowExternalActivityDispatchResult
A recorded dispatch.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityDispatchResult( | constructor | Creates an instance of Workflow. |
AttemptId | property | The attempt. |
DispatchId | property | The dispatch. |
ExecuteLane | property | The lane the request goes to. |
ExecutionVersion | property | The execution version after the operation. |
Replayed | property | Whether the dispatch already existed and was returned as recorded. |
RequestSha256 | property | The SHA-256 of the request. |
constructor WorkflowExternalActivityDispatchResult() #
WorkflowExternalActivityDispatchResult() #public WorkflowExternalActivityDispatchResult()
Creates an instance of Workflow.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property DispatchId #
DispatchId #public required string DispatchId { get; init; }
The dispatch.
property ExecuteLane #
ExecuteLane #public required string ExecuteLane { get; init; }
The lane the request goes to.
property ExecutionVersion #
ExecutionVersion #public required long ExecutionVersion { get; init; }
The execution version after the operation.
property Replayed #
Replayed #public required bool Replayed { get; init; }
Whether the dispatch already existed and was returned as recorded.
property RequestSha256 #
RequestSha256 #public required string RequestSha256 { get; init; }
The SHA-256 of the request.
class WorkflowExternalActivityDispatchService
public sealed class WorkflowExternalActivityDispatchService
Turns an external activity wait into a durable dispatch; the step’s evaluated request travels inline.
Parameters
store: The external activity store.registry: The external activity registry; its request schema describes the request.activityService: Records the dispatch.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityDispatchService( | constructor | Turns an external activity wait into a durable dispatch; the step’s evaluated request travels inline. |
DispatchAsync( | method | Dispatches the activity a pending signal plan waits for. |
DispatchMapItemAsync( | method | Dispatches the activity of a map item. |
constructor WorkflowExternalActivityDispatchService(IWorkflowExternalActivityStore, IWorkflowExternalActivityRegistry, WorkflowExternalActivityService) #
WorkflowExternalActivityDispatchService(IWorkflowExternalActivityStore, IWorkflowExternalActivityRegistry, WorkflowExternalActivityService) #public WorkflowExternalActivityDispatchService(IWorkflowExternalActivityStore store, IWorkflowExternalActivityRegistry registry, WorkflowExternalActivityService activityService)
Turns an external activity wait into a durable dispatch; the step’s evaluated request travels inline.
Parameters
store: The external activity store.registry: The external activity registry; its request schema describes the request.activityService: Records the dispatch.
method DispatchAsync(string, WorkflowPendingSignalPlan, CancellationToken) #
DispatchAsync(string, WorkflowPendingSignalPlan, CancellationToken) #public Task<WorkflowExternalActivityDispatchResult> DispatchAsync(string workflowExecutionId, WorkflowPendingSignalPlan pendingSignal, CancellationToken cancellationToken)
Dispatches the activity a pending signal plan waits for.
Parameters
workflowExecutionId: The execution.pendingSignal: The durable external activity plan.cancellationToken: Cancels the operation.
Returns
The dispatch.
Exceptions
Invalid: The plan is not a durable external activity dispatch, or lacks the destination, the operation or the contract version.Operation Exception
method DispatchMapItemAsync(string, WorkflowPendingSignalPlan, string, WorkflowRetryPolicyDeclaration, DateTime?, CancellationToken) #
DispatchMapItemAsync(string, WorkflowPendingSignalPlan, string, WorkflowRetryPolicyDeclaration, DateTime?, CancellationToken) #public Task<WorkflowExternalActivityDispatchResult> DispatchMapItemAsync(string workflowExecutionId, WorkflowPendingSignalPlan pendingSignal, string mapItemId, WorkflowRetryPolicyDeclaration retryPolicy, DateTime? absoluteDeadlineAtUtc, CancellationToken cancellationToken)
Dispatches the activity of a map item.
Parameters
workflowExecutionId: The execution.pendingSignal: The durable external activity plan.mapItemId: The map item.retryPolicy: The retry policy of the item.absolute: The deadline after which no retry runs, in UTC; none when not set.Deadline At Utc cancellationToken: Cancels the operation.
Returns
The dispatch.
class WorkflowExternalActivityLanes
public static class WorkflowExternalActivityLanes
The default lanes of external activities.
Members
| Member | Kind | Summary |
|---|---|---|
Cancel | constant | The cancel lane. |
Completed | constant | The completed lane. |
Execute | constant | The execute lane. |
constant Cancel #
Cancel #public const string Cancel = "workflow.activity.cancel.v1"
The cancel lane.
constant Completed #
Completed #public const string Completed = "workflow.activity.completed.v1"
The completed lane.
constant Execute #
Execute #public const string Execute = "workflow.activity.execute.v1"
The execute lane.
record WorkflowExternalActivityOutboxMessage
public sealed record WorkflowExternalActivityOutboxMessage
A request to publish on an execute lane.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityOutboxMessage( | constructor | Creates an instance of Workflow. |
AttemptId | property | The attempt. |
CanonicalRequestJson | property | The canonical request, as JSON. |
DispatchId | property | The dispatch. |
ExecuteLane | property | The lane the request goes to. |
RequestSha256 | property | The SHA-256 of the request. |
constructor WorkflowExternalActivityOutboxMessage() #
WorkflowExternalActivityOutboxMessage() #public WorkflowExternalActivityOutboxMessage()
Creates an instance of Workflow.
property AttemptId #
AttemptId #public required string AttemptId { get; init; }
The attempt.
property CanonicalRequestJson #
CanonicalRequestJson #public required string CanonicalRequestJson { get; init; }
The canonical request, as JSON.
property DispatchId #
DispatchId #public required string DispatchId { get; init; }
The dispatch.
property ExecuteLane #
ExecuteLane #public required string ExecuteLane { get; init; }
The lane the request goes to.
property RequestSha256 #
RequestSha256 #public required string RequestSha256 { get; init; }
The SHA-256 of the request.
class WorkflowExternalActivityRegistry
public sealed class WorkflowExternalActivityRegistry : IWorkflowExternalActivityRegistry
The external activity registry of the host’s signed manifest.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistry( | constructor | Loads the manifest; a manifest that fails to load leaves the registry not ready, with the failure code. |
IsReady | property | Whether the manifest loaded; a registry that is not ready resolves nothing. |
ReadinessFailureCode | property | Why the manifest did not load. |
IsExternalTransportAddress( | method | Whether a transport address targets a lane of the registry: a RabbitMQ routing key or an endpoint path that an activity uses. |
TryResolve( | method | Finds an activity by destination, operation and contract version. |
constructor WorkflowExternalActivityRegistry(IOptions<WorkflowExternalActivityRegistryOptions>) #
WorkflowExternalActivityRegistry(IOptions<WorkflowExternalActivityRegistryOptions>) #public WorkflowExternalActivityRegistry(IOptions<WorkflowExternalActivityRegistryOptions> options)
Loads the manifest; a manifest that fails to load leaves the registry not ready, with the failure code.
Parameters
options: The manifest location and signature settings.
property IsReady #
IsReady #public bool IsReady { get; }
Whether the manifest loaded; a registry that is not ready resolves nothing.
property ReadinessFailureCode #
ReadinessFailureCode #public string? ReadinessFailureCode { get; }
Why the manifest did not load.
method IsExternalTransportAddress(WorkflowTransportAddressDeclaration) #
IsExternalTransportAddress(WorkflowTransportAddressDeclaration) #public bool IsExternalTransportAddress(WorkflowTransportAddressDeclaration address)
Whether a transport address targets a lane of the registry: a RabbitMQ routing key or an endpoint path that an activity uses.
Parameters
address: The address.
Returns
Whether it does.
method TryResolve(string, string, string, out WorkflowExternalActivityRegistration) #
TryResolve(string, string, string, out WorkflowExternalActivityRegistration) #public bool TryResolve(string destinationCode, string operationCode, string contractVersion, out WorkflowExternalActivityRegistration registration)
Finds an activity by destination, operation and contract version.
Parameters
destinationCode: The destination.operationCode: The operation.contractVersion: The contract version.registration: The activity, when found.
Returns
Whether the registry is ready and has the activity.
record WorkflowExternalActivityRegistryEntry
public sealed record WorkflowExternalActivityRegistryEntry
An external activity of the manifest.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistryEntry( | constructor | Creates an instance of Workflow. |
CancelLane | property | The lane the cancels go to, when there is one. |
CompletionLane | property | The lane the completions come back on, when it differs. |
ContractKind | property | The contract kind. |
ContractVersion | property | The contract version. |
DestinationCode | property | The destination. |
ExecuteLane | property | The lane the requests go to. |
HandlerBuildSha256 | property | The SHA-256 of the handler build. |
OperationCode | property | The operation. |
RequestSchemaId | property | The schema of the request. |
RequestSchemaVersion | property | The version of the request schema. |
ResultSchemaId | property | The schema of the result, when there is one. |
ResultSchemaVersion | property | The version of the result schema. |
constructor WorkflowExternalActivityRegistryEntry() #
WorkflowExternalActivityRegistryEntry() #public WorkflowExternalActivityRegistryEntry()
Creates an instance of Workflow.
property CancelLane #
CancelLane #public string? CancelLane { get; init; }
The lane the cancels go to, when there is one.
property CompletionLane #
CompletionLane #public string? CompletionLane { get; init; }
The lane the completions come back on, when it differs.
property ContractKind #
ContractKind #public required string ContractKind { get; init; }
The contract kind.
property ContractVersion #
ContractVersion #public required string ContractVersion { get; init; }
The contract version.
property DestinationCode #
DestinationCode #public required string DestinationCode { get; init; }
The destination.
property ExecuteLane #
ExecuteLane #public required string ExecuteLane { get; init; }
The lane the requests go to.
property HandlerBuildSha256 #
HandlerBuildSha256 #public required string HandlerBuildSha256 { get; init; }
The SHA-256 of the handler build.
property OperationCode #
OperationCode #public required string OperationCode { get; init; }
The operation.
property RequestSchemaId #
RequestSchemaId #public required string RequestSchemaId { get; init; }
The schema of the request.
property RequestSchemaVersion #
RequestSchemaVersion #public required int RequestSchemaVersion { get; init; }
The version of the request schema.
property ResultSchemaId #
ResultSchemaId #public string? ResultSchemaId { get; init; }
The schema of the result, when there is one.
property ResultSchemaVersion #
ResultSchemaVersion #public int? ResultSchemaVersion { get; init; }
The version of the result schema.
class WorkflowExternalActivityRegistryException
public sealed class WorkflowExternalActivityRegistryException : Exception
Raised when the registry manifest cannot be loaded.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistryException( | constructor | Creates the exception. |
WorkflowExternalActivityRegistryException( | constructor | Creates the exception with its cause. |
Code | property | The failure code. |
constructor WorkflowExternalActivityRegistryException(string) #
WorkflowExternalActivityRegistryException(string) #public WorkflowExternalActivityRegistryException(string code)
Creates the exception.
Parameters
code: The failure code.
constructor WorkflowExternalActivityRegistryException(string, Exception) #
WorkflowExternalActivityRegistryException(string, Exception) #public WorkflowExternalActivityRegistryException(string code, Exception innerException)
Creates the exception with its cause.
Parameters
code: The failure code.innerException: The cause.
property Code #
Code #public string Code { get; }
The failure code.
class WorkflowExternalActivityRegistryHealthCheck
public sealed class WorkflowExternalActivityRegistryHealthCheck : IHealthCheck
Healthy once the signed external activity registry is verified; unhealthy, with the readiness failure code, until then.
Parameters
registry: The registry.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistryHealthCheck( | constructor | Healthy once the signed external activity registry is verified; unhealthy, with the readiness failure code, until then. |
CheckHealthAsync( | method | See IHealth. |
constructor WorkflowExternalActivityRegistryHealthCheck(WorkflowExternalActivityRegistry) #
WorkflowExternalActivityRegistryHealthCheck(WorkflowExternalActivityRegistry) #public WorkflowExternalActivityRegistryHealthCheck(WorkflowExternalActivityRegistry registry)
Healthy once the signed external activity registry is verified; unhealthy, with the readiness failure code, until then.
Parameters
registry: The registry.
method CheckHealthAsync(HealthCheckContext, CancellationToken) #
CheckHealthAsync(HealthCheckContext, CancellationToken) #public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
See IHealth.
record WorkflowExternalActivityRegistryManifest
public sealed record WorkflowExternalActivityRegistryManifest
The signed registry manifest of a host.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistryManifest( | constructor | Creates an instance of Workflow. |
ContractVersion | property | The manifest contract version. |
Entries | property | The activities. |
constructor WorkflowExternalActivityRegistryManifest() #
WorkflowExternalActivityRegistryManifest() #public WorkflowExternalActivityRegistryManifest()
Creates an instance of Workflow.
property ContractVersion #
ContractVersion #public required int ContractVersion { get; init; }
The manifest contract version.
property Entries #
Entries #public required IReadOnlyList<WorkflowExternalActivityRegistryEntry> Entries { get; init; }
The activities.
class WorkflowExternalActivityRegistryOptions
public sealed class WorkflowExternalActivityRegistryOptions
The signed manifest of the external activities the host may run (Workflow). Without a manifest the host runs no external activity, and definition validation rejects an external activity step. With one, the SHA-256 of the canonical manifest must equal WorkflowExternalActivityRegistryOptions.and its RSA signature must verify with the public key, or loading the registry fails.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityRegistryOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: Workflow. |
ManifestJson | property | The manifest as inline JSON; takes precedence over WorkflowExternalActivityRegistryOptions.. |
ManifestPath | property | The manifest file; WorkflowExternalActivityRegistryOptions.takes precedence when set. |
ManifestSha256 | property | The expected SHA-256 of the canonical manifest JSON. |
PublicKeyPath | property | The PEM file of the RSA public key that verifies the signature; WorkflowExternalActivityRegistryOptions.takes precedence when set. |
PublicKeyPem | property | The RSA public key in PEM form; takes precedence over WorkflowExternalActivityRegistryOptions.. |
SignatureBase64 | property | The base64 RSA signature (SHA-256, PKCS #1 v1.5) of the canonical manifest bytes; takes precedence over WorkflowExternalActivityRegistryOptions.. |
SignaturePath | property | The file that holds the base64 signature; WorkflowExternalActivityRegistryOptions.takes precedence when set. |
constructor WorkflowExternalActivityRegistryOptions() #
WorkflowExternalActivityRegistryOptions() #public WorkflowExternalActivityRegistryOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowExternalActivityRegistry"
The configuration section the options bind from: Workflow.
property ManifestJson #
ManifestJson #public string? ManifestJson { get; set; }
The manifest as inline JSON; takes precedence over WorkflowExternalActivityRegistryOptions..
property ManifestPath #
ManifestPath #public string? ManifestPath { get; set; }
The manifest file; WorkflowExternalActivityRegistryOptions.takes precedence when set.
property ManifestSha256 #
ManifestSha256 #public string? ManifestSha256 { get; set; }
The expected SHA-256 of the canonical manifest JSON. Required with a manifest.
property PublicKeyPath #
PublicKeyPath #public string? PublicKeyPath { get; set; }
The PEM file of the RSA public key that verifies the signature; WorkflowExternalActivityRegistryOptions.takes precedence when set.
property PublicKeyPem #
PublicKeyPem #public string? PublicKeyPem { get; set; }
The RSA public key in PEM form; takes precedence over WorkflowExternalActivityRegistryOptions..
property SignatureBase64 #
SignatureBase64 #public string? SignatureBase64 { get; set; }
The base64 RSA signature (SHA-256, PKCS #1 v1.5) of the canonical manifest bytes; takes precedence over WorkflowExternalActivityRegistryOptions..
property SignaturePath #
SignaturePath #public string? SignaturePath { get; set; }
The file that holds the base64 signature; WorkflowExternalActivityRegistryOptions.takes precedence when set.
class WorkflowExternalActivityService
public sealed class WorkflowExternalActivityService
Records external activity dispatches and completions once, with their outbox entries.
Parameters
store: The external activity store.mutationCoordinator: Begins the change scopes.registry: The external activity registry; it validates the typed requests and names the lanes.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivityService( | constructor | Records external activity dispatches and completions once, with their outbox entries. |
CompleteAsync( | method | Records an activity completion, canonicalized, and decides whether it applies to its attempt. |
DispatchAsync( | method | Records the dispatch of an activity attempt for its execute lane. |
GetReadyDispatchesAsync( | method | Returns the dispatch messages ready to publish. |
MarkPublishedAsync( | method | Marks a dispatch message published. |
constructor WorkflowExternalActivityService(IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, IWorkflowExternalActivityRegistry) #
WorkflowExternalActivityService(IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, IWorkflowExternalActivityRegistry) #public WorkflowExternalActivityService(IWorkflowExternalActivityStore store, IWorkflowMutationCoordinator mutationCoordinator, IWorkflowExternalActivityRegistry registry)
Records external activity dispatches and completions once, with their outbox entries.
Parameters
store: The external activity store.mutationCoordinator: Begins the change scopes.registry: The external activity registry; it validates the typed requests and names the lanes.
method CompleteAsync(WorkflowExternalActivityCompletionRequest, CancellationToken) #
CompleteAsync(WorkflowExternalActivityCompletionRequest, CancellationToken) #public Task<WorkflowExternalActivityCompletionResult> CompleteAsync(WorkflowExternalActivityCompletionRequest request, CancellationToken cancellationToken = default)
Records an activity completion, canonicalized, and decides whether it applies to its attempt. A completion already recorded under its event id is returned as a duplicate when it names the same attempt and has the same hash.
Parameters
request: The completion.cancellationToken: Cancels the operation.
Returns
The completion and its disposition.
Exceptions
Invalid: A completion recorded under the event id names another attempt or has another hash.Operation Exception
method DispatchAsync(WorkflowExternalActivityDispatchRequest, CancellationToken) #
DispatchAsync(WorkflowExternalActivityDispatchRequest, CancellationToken) #public Task<WorkflowExternalActivityDispatchResult> DispatchAsync(WorkflowExternalActivityDispatchRequest request, CancellationToken cancellationToken = default)
Records the dispatch of an activity attempt for its execute lane. A dispatch already recorded under the attempt id is returned as replayed when it has the same dispatch id and request hash.
Parameters
request: The dispatch.cancellationToken: Cancels the operation.
Returns
The dispatch.
Exceptions
Invalid: A dispatch recorded for the attempt has another dispatch id or request hash.Operation Exception
method GetReadyDispatchesAsync(int, CancellationToken) #
GetReadyDispatchesAsync(int, CancellationToken) #public Task<IReadOnlyList<WorkflowExternalActivityOutboxMessage>> GetReadyDispatchesAsync(int maxCount, CancellationToken cancellationToken = default)
Returns the dispatch messages ready to publish.
Parameters
maxCount: The most messages to return, from 1 to 1,000.cancellationToken: Cancels the operation.
Returns
The messages.
Exceptions
Argument: The count is outside 1 to 1,000.Out Of Range Exception
method MarkPublishedAsync(string, DateTimeOffset, CancellationToken) #
MarkPublishedAsync(string, DateTimeOffset, CancellationToken) #public Task MarkPublishedAsync(string dispatchId, DateTimeOffset publishedAt, CancellationToken cancellationToken = default)
Marks a dispatch message published.
Parameters
dispatchId: The dispatch.publishedAt: When it was published.cancellationToken: Cancels the operation.
Returns
A task that completes when the message is marked.
class WorkflowExternalActivitySignalDispatcher
public sealed class WorkflowExternalActivitySignalDispatcher : IWorkflowPendingSignalDispatcher
Dispatches an external activity step durably (DurableDispatch pending signal).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExternalActivitySignalDispatcher( | constructor | Dispatches an external activity step durably (DurableDispatch pending signal). |
CanDispatch( | method | Whether this dispatcher sends a pending signal. |
DispatchAsync( | method | Dispatches the signal and returns the execution version the next signal must expect. |
constructor WorkflowExternalActivitySignalDispatcher(WorkflowExternalActivityDispatchService) #
WorkflowExternalActivitySignalDispatcher(WorkflowExternalActivityDispatchService) #public WorkflowExternalActivitySignalDispatcher(WorkflowExternalActivityDispatchService dispatchService)
Dispatches an external activity step durably (DurableDispatch pending signal).
method CanDispatch(WorkflowPendingSignalPlan) #
CanDispatch(WorkflowPendingSignalPlan) #public bool CanDispatch(WorkflowPendingSignalPlan pendingSignal)
Whether this dispatcher sends a pending signal.
Parameters
pendingSignal: The signal.
Returns
Whether it does.
method DispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #
DispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #public Task<long> DispatchAsync(string workflowInstanceId, WorkflowPendingSignalPlan pendingSignal, WorkflowRuntimeStateRecord runtimeState, CancellationToken cancellationToken = default)
Dispatches the signal and returns the execution version the next signal must expect.
namespace StellaOps.Workflow.Engine.History
| Type | Kind | Description |
|---|---|---|
WorkflowHistoryPage | record | A page of the history events of an execution. |
WorkflowHistoryService | class | Reads and compacts the history events of executions. |
record WorkflowHistoryPage
public sealed record WorkflowHistoryPage
A page of the history events of an execution.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowHistoryPage( | constructor | Creates an instance of WorkflowHistoryPage. |
Disposition | property | OK, or CURSOR_COMPACTED when the events after the requested sequence were compacted away; the page is then empty. |
Events | property | The events. |
HistoryFloorSequence | property | The first history sequence still kept. |
SnapshotSequence | property | The last history sequence when the page was read. |
constructor WorkflowHistoryPage() #
WorkflowHistoryPage() #public WorkflowHistoryPage()
Creates an instance of WorkflowHistoryPage.
property Disposition #
Disposition #public required string Disposition { get; init; }
OK, or CURSOR_COMPACTED when the events after the requested sequence were compacted away; the page is then empty.
property Events #
Events #public required IReadOnlyList<WorkflowHistoryEvent> Events { get; init; }
The events.
property HistoryFloorSequence #
HistoryFloorSequence #public required long HistoryFloorSequence { get; init; }
The first history sequence still kept.
property SnapshotSequence #
SnapshotSequence #public required long SnapshotSequence { get; init; }
The last history sequence when the page was read.
class WorkflowHistoryService
public sealed class WorkflowHistoryService
Reads and compacts the history events of executions.
Parameters
store: The history store.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowHistoryService( | constructor | Reads and compacts the history events of executions. |
CompactPrefixAsync( | method | Deletes the events up to a sequence, unless the execution is under a legal hold or the HOLD_ALL retention policy. |
GetEventsAsync( | method | Reads the events after a sequence. |
constructor WorkflowHistoryService(IWorkflowHistoryStore) #
WorkflowHistoryService(IWorkflowHistoryStore) #public WorkflowHistoryService(IWorkflowHistoryStore store)
Reads and compacts the history events of executions.
Parameters
store: The history store.
method CompactPrefixAsync(string, long, int, CancellationToken) #
CompactPrefixAsync(string, long, int, CancellationToken) #public Task<WorkflowHistoryCompactionResult> CompactPrefixAsync(string workflowExecutionId, long throughSequence, int maxCount, CancellationToken cancellationToken = default)
Deletes the events up to a sequence, unless the execution is under a legal hold or the HOLD_ALL retention policy.
Parameters
workflowExecutionId: The execution (workflow instance).throughSequence: The last sequence to delete.maxCount: The most events to delete.cancellationToken: Cancels the operation.
Returns
The events deleted and the new history floor.
method GetEventsAsync(string, long, int, CancellationToken) #
GetEventsAsync(string, long, int, CancellationToken) #public Task<WorkflowHistoryPage> GetEventsAsync(string workflowExecutionId, long afterSequence, int maxCount, CancellationToken cancellationToken = default)
Reads the events after a sequence.
Parameters
workflowExecutionId: The execution (workflow instance).afterSequence: The sequence after which events are read.maxCount: The most events, from 1 to 1000.cancellationToken: Cancels the operation.
Returns
The page.
Exceptions
Argument:Out Of Range Exception maxCountis outside 1 to 1000.
namespace StellaOps.Workflow.Engine.HostedServices
| Type | Kind | Description |
|---|---|---|
WorkflowRetentionHostedService | class | Runs the instance retention at the configured interval when it is enabled, on one service instance at a time (it takes the hosted job lock). |
WorkflowSignalDeliveryAttemptTracker | class | Per-process tracker that records how many times the signal pump worker has dispatched a given signal envelope to the processor in the current host lifetime. |
WorkflowSignalPumpHostedService | class | Runs Workflow signal pump workers (at least one) until the host stops. |
WorkflowSignalPumpWorker | class | Moves signals from the signal bus to the signal processor, one at a time. |
class WorkflowRetentionHostedService
public sealed class WorkflowRetentionHostedService : BackgroundService
Runs the instance retention at the configured interval when it is enabled, on one service instance at a time (it takes the hosted job lock).
Parameters
serviceScopeFactory: Creates the scope of each run.options: Whether the job runs, and its interval.logger: Receives the diagnostics.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRetentionHostedService( | constructor | Runs the instance retention at the configured interval when it is enabled, on one service instance at a time (it takes the hosted job lock). |
constructor WorkflowRetentionHostedService(IServiceScopeFactory, IOptions<WorkflowRetentionHostedJobOptions>, ILogger<WorkflowRetentionHostedService>) #
WorkflowRetentionHostedService(IServiceScopeFactory, IOptions<WorkflowRetentionHostedJobOptions>, ILogger<WorkflowRetentionHostedService>) #public WorkflowRetentionHostedService(IServiceScopeFactory serviceScopeFactory, IOptions<WorkflowRetentionHostedJobOptions> options, ILogger<WorkflowRetentionHostedService> logger)
Runs the instance retention at the configured interval when it is enabled, on one service instance at a time (it takes the hosted job lock).
Parameters
serviceScopeFactory: Creates the scope of each run.options: Whether the job runs, and its interval.logger: Receives the diagnostics.
class WorkflowSignalDeliveryAttemptTracker
public sealed class WorkflowSignalDeliveryAttemptTracker
Per-process tracker that records how many times the signal pump worker has dispatched a given signal envelope to the processor in the current host lifetime. The worker counts a delivery as the larger of this count and the transport-reported IWorkflowSignalLease.: the PostgreSQL and MongoDB stores keep that count with the signal, so it holds across nodes and restarts, and this tracker is the floor for a transport that reports fewer deliveries than it made.
Remarks
The tracker lives for the host lifetime: counts reset on host restart. A transport whose delivery count does not survive a restart needs its own queue-side retry limit to move a poison message that survives a worker restart to a dead-letter queue.
To bound memory under high cardinality the tracker is capped; the oldest entries are evicted FIFO when the cap is reached. The cap is large enough to cover real-world fan-out (~16K concurrent failing signals) but small enough to ensure a runaway tracker cannot exhaust process memory.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalDeliveryAttemptTracker( | constructor | Creates an instance of Workflow. |
Forget( | method | Forget the tracking state for signalId. |
Peek( | method | Returns the current attempt count for signalId without mutating the tracker. |
RegisterAttempt( | method | Record that the worker is about to dispatch signalId and return the resulting attempt count (1 for the first dispatch, 2 for the next, etc.). |
constructor WorkflowSignalDeliveryAttemptTracker() #
WorkflowSignalDeliveryAttemptTracker() #public WorkflowSignalDeliveryAttemptTracker()
Creates an instance of Workflow.
method Forget(string) #
Forget(string) #public void Forget(string signalId)
Forget the tracking state for signalId. Called when the signal is acknowledged (processed, concurrency-skipped, or dead-lettered) so the tracker does not leak across distinct lifecycles of the same signal id.
method Peek(string) #
Peek(string) #public int Peek(string signalId)
Returns the current attempt count for signalId without mutating the tracker. Returns 0 when the signal is not tracked.
method RegisterAttempt(string) #
RegisterAttempt(string) #public int RegisterAttempt(string signalId)
Record that the worker is about to dispatch signalId and return the resulting attempt count (1 for the first dispatch, 2 for the next, etc.).
class WorkflowSignalPumpHostedService
public sealed class WorkflowSignalPumpHostedService : BackgroundService
Runs Workflow signal pump workers (at least one) until the host stops.
Parameters
worker: Processes one signal per call.aqOptions: The signal queue options.engineOptions: The worker count and the graceful shutdown timeout.logger: Receives the diagnostics.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalPumpHostedService( | constructor | Runs Workflow signal pump workers (at least one) until the host stops. |
StopAsync( | method | Stops the workers and waits for them up to Workflow. |
constructor WorkflowSignalPumpHostedService(WorkflowSignalPumpWorker, IOptions<WorkflowAqOptions>, IOptions<WorkflowEngineOptions>, ILogger<WorkflowSignalPumpHostedService>) #
WorkflowSignalPumpHostedService(WorkflowSignalPumpWorker, IOptions<WorkflowAqOptions>, IOptions<WorkflowEngineOptions>, ILogger<WorkflowSignalPumpHostedService>) #public WorkflowSignalPumpHostedService(WorkflowSignalPumpWorker worker, IOptions<WorkflowAqOptions> aqOptions, IOptions<WorkflowEngineOptions> engineOptions, ILogger<WorkflowSignalPumpHostedService> logger)
Runs Workflow signal pump workers (at least one) until the host stops.
Parameters
worker: Processes one signal per call.aqOptions: The signal queue options.engineOptions: The worker count and the graceful shutdown timeout.logger: Receives the diagnostics.
method StopAsync(CancellationToken) #
StopAsync(CancellationToken) #public override Task StopAsync(CancellationToken cancellationToken)
Stops the workers and waits for them up to Workflow.
Parameters
cancellationToken: Cancels the operation.
Returns
A task that completes when the workers stopped or the timeout passed.
class WorkflowSignalPumpWorker
public sealed class WorkflowSignalPumpWorker
Moves signals from the signal bus to the signal processor, one at a time.
Parameters
serviceScopeFactory: Creates a scope for each signal.aqOptions: The signal options;MaxDeliveryAttemptssets the delivery budget.telemetryService: Counts the pump’s work.delivery: Counts this process’s deliveries of each signal.Attempt Tracker logger: The logger.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalPumpWorker( | constructor | Moves signals from the signal bus to the signal processor, one at a time. |
RunOnceAsync( | method | Receives one signal and processes it: completed when processed, put back after a failure, and dead-lettered at the last delivery attempt. |
constructor WorkflowSignalPumpWorker(IServiceScopeFactory, IOptions<WorkflowAqOptions>, WorkflowSignalPumpTelemetryService, WorkflowSignalDeliveryAttemptTracker, ILogger<WorkflowSignalPumpWorker>) #
WorkflowSignalPumpWorker(IServiceScopeFactory, IOptions<WorkflowAqOptions>, WorkflowSignalPumpTelemetryService, WorkflowSignalDeliveryAttemptTracker, ILogger<WorkflowSignalPumpWorker>) #public WorkflowSignalPumpWorker(IServiceScopeFactory serviceScopeFactory, IOptions<WorkflowAqOptions> aqOptions, WorkflowSignalPumpTelemetryService telemetryService, WorkflowSignalDeliveryAttemptTracker deliveryAttemptTracker, ILogger<WorkflowSignalPumpWorker> logger)
Moves signals from the signal bus to the signal processor, one at a time.
Parameters
serviceScopeFactory: Creates a scope for each signal.aqOptions: The signal options;MaxDeliveryAttemptssets the delivery budget.telemetryService: Counts the pump’s work.delivery: Counts this process’s deliveries of each signal.Attempt Tracker logger: The logger.
method RunOnceAsync(string, CancellationToken) #
RunOnceAsync(string, CancellationToken) #public Task<bool> RunOnceAsync(string consumerName, CancellationToken cancellationToken)
Receives one signal and processes it: completed when processed, put back after a failure, and dead-lettered at the last delivery attempt.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
true when a signal was received; false after an empty poll.
namespace StellaOps.Workflow.Engine.Hosting
| Type | Kind | Description |
|---|---|---|
WorkflowAqOptions | class | Signal pump and queue settings (WorkflowAq). |
WorkflowEngineOptions | class | Engine-wide execution settings (WorkflowEngine). |
WorkflowRuntimeOptions | class | The runtime provider of new instances and the limits of map steps (WorkflowRuntime). |
class WorkflowAqOptions
public sealed class WorkflowAqOptions
Signal pump and queue settings (WorkflowAq). The signal pump reads WorkflowAqOptions.and WorkflowAqOptions.whatever the signalling transport. The queue owner, the queue names and the blocking dequeue time are read only by a database queue transport that is not available in this release; the released signalling transports ignore them.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowAqOptions( | constructor | Creates an instance of WorkflowAqOptions. |
SectionName | constant | The configuration section the options bind from: WorkflowAq. |
BlockingDequeueSeconds | property | How long one blocking dequeue waits for a message, in seconds. |
ConsumerName | property | The consumer name of the signal pump. |
DeadLetterQueueName | property | The queue of undeliverable signals. |
MaxDeliveryAttempts | property | How many times the signal pump delivers a signal before it moves the signal to the dead-letter queue; a value below 1 counts as 1. |
QueueOwner | property | The database schema that owns the queues. |
ScheduleQueueName | property | The queue of scheduled signals. |
SignalQueueName | property | The queue of workflow signals. |
constructor WorkflowAqOptions() #
WorkflowAqOptions() #public WorkflowAqOptions()
Creates an instance of WorkflowAqOptions.
constant SectionName #
SectionName #public const string SectionName = "WorkflowAq"
The configuration section the options bind from: WorkflowAq.
property BlockingDequeueSeconds #
BlockingDequeueSeconds #public int BlockingDequeueSeconds { get; set; }
How long one blocking dequeue waits for a message, in seconds. The default is 30. Not read by the released signalling transports.
property ConsumerName #
ConsumerName #public string ConsumerName { get; set; }
The consumer name of the signal pump. With several signal handlers, each worker adds its number, for example WORKFLOW_SERVICE-2. The default is WORKFLOW_SERVICE.
property DeadLetterQueueName #
DeadLetterQueueName #public string DeadLetterQueueName { get; set; }
The queue of undeliverable signals. The default is WF_DLQ_Q. Not read by the released signalling transports.
property MaxDeliveryAttempts #
MaxDeliveryAttempts #public int MaxDeliveryAttempts { get; set; }
How many times the signal pump delivers a signal before it moves the signal to the dead-letter queue; a value below 1 counts as 1. The default is 10.
property QueueOwner #
QueueOwner #public string QueueOwner { get; set; }
The database schema that owns the queues. Not read by the released signalling transports.
property ScheduleQueueName #
ScheduleQueueName #public string ScheduleQueueName { get; set; }
The queue of scheduled signals. The default is WF_SCHEDULE_Q. Not read by the released signalling transports.
property SignalQueueName #
SignalQueueName #public string SignalQueueName { get; set; }
The queue of workflow signals. The default is WF_SIGNAL_Q. Not read by the released signalling transports.
class WorkflowEngineOptions
public sealed class WorkflowEngineOptions
Engine-wide execution settings (WorkflowEngine).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowEngineOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowEngine. |
ExecutionTimeoutSeconds | property | Maximum time in seconds for a single workflow execution operation (start, complete, resume). |
GracefulShutdownTimeoutSeconds | property | How long the signal pump waits at shutdown for its workers to finish, in seconds; a value below 1 counts as 1. |
MaxConcurrentSignalHandlers | property | The number of signal pump workers that handle signals in parallel; a value below 1 counts as 1. |
MaxInlineWaitSeconds | property | Maximum seconds to block a task-complete/start-workflow response waiting for the signal pump to create the next user task. |
constructor WorkflowEngineOptions() #
WorkflowEngineOptions() #public WorkflowEngineOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowEngine"
The configuration section the options bind from: WorkflowEngine.
property ExecutionTimeoutSeconds #
ExecutionTimeoutSeconds #public int? ExecutionTimeoutSeconds { get; set; }
Maximum time in seconds for a single workflow execution operation (start, complete, resume). Null means no engine-wide timeout (recommended for long-running business processes). Default: null (disabled).
property GracefulShutdownTimeoutSeconds #
GracefulShutdownTimeoutSeconds #public int GracefulShutdownTimeoutSeconds { get; set; }
How long the signal pump waits at shutdown for its workers to finish, in seconds; a value below 1 counts as 1. The default is 30.
property MaxConcurrentSignalHandlers #
MaxConcurrentSignalHandlers #public int MaxConcurrentSignalHandlers { get; set; }
The number of signal pump workers that handle signals in parallel; a value below 1 counts as 1. The default is the processor count.
property MaxInlineWaitSeconds #
MaxInlineWaitSeconds #public int MaxInlineWaitSeconds { get; set; }
Maximum seconds to block a task-complete/start-workflow response waiting for the signal pump to create the next user task. 0 (or less) = no wait (return immediately). Default: 10 seconds.
class WorkflowRuntimeOptions
public sealed class WorkflowRuntimeOptions
The runtime provider of new instances and the limits of map steps (WorkflowRuntime). The limits are checked when the host starts.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRuntimeOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowRuntime. |
DefaultProvider | property | The runtime provider of new instances. |
EnabledProviders | property | The runtime providers the host may use. |
MaxMapConcurrency | property | The largest number of map items that run at the same time, from 1 to 64. |
MaxMapItems | property | The largest number of items one map step may declare, from 1 to 10000. |
constructor WorkflowRuntimeOptions() #
WorkflowRuntimeOptions() #public WorkflowRuntimeOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowRuntime"
The configuration section the options bind from: WorkflowRuntime.
property DefaultProvider #
DefaultProvider #public string DefaultProvider { get; set; }
The runtime provider of new instances. Stella.Engine (the default) runs every step kind; Stella.InProcess runs no fork, map, external activity, timer, external signal or task deadline, and a host that selects it with such a workflow registered fails at start-up.
property EnabledProviders #
EnabledProviders #public List<string> EnabledProviders { get; set; }
The runtime providers the host may use. When the list is not empty, the start-up check fails if it does not name WorkflowRuntimeOptions., and an instance of a provider it does not name is refused. Empty by default: every registered provider may run.
property MaxMapConcurrency #
MaxMapConcurrency #public int MaxMapConcurrency { get; set; }
The largest number of map items that run at the same time, from 1 to 64. The default is 8; the WORKFLOW_ setting overrides it.
property MaxMapItems #
MaxMapItems #public int MaxMapItems { get; set; }
The largest number of items one map step may declare, from 1 to 10000. The default is 512; the WORKFLOW_ setting overrides it.
namespace StellaOps.Workflow.Engine.Licensing
| Type | Kind | Description |
|---|---|---|
IWorkflowLicenceReleaseContext | interface | The inputs of a licence evaluation that come from the release and the operator, not from the installation’s use: the running version’s first-publication date and the vendor trust roots. |
InMemoryWorkflowFirstSeenLedger | class | The first-seen ledger of a host without a workflow store. |
WorkflowComponentLicenceOptions | class | Configuration of the component licence reader, section Stella. |
WorkflowDesignatedWorkflowQueryService | class | Reads the Designated Workflows from the first-seen ledger for the self-attestation count, with the licence status and the licence notice of the latest licence evaluation. |
WorkflowLicenceAssessor | class | Evaluates the engine’s licence status: records the code catalogue and the definition store in the first-seen ledger, counts the ledger (the technical count of recorded workflow names), reads the licence records offline and runs the shared component licence evaluator against the running version’s first-publication date. |
WorkflowLicenceFileReader | class | Reads the configured licence records offline, from the path (Stella) or the licence key (Stella), and verifies them against the release context’s trust roots. |
WorkflowLicenceFiles | record | The licence records one read loaded, with the reason when they could not be read. |
WorkflowLicenceHealthCheck | class | The licence entry of the health output. |
WorkflowLicenceMetrics | class | The licence gauge: the count of recorded workflow names of the latest evaluation, tagged with its status name; no measurement while the count is unavailable. |
WorkflowLicenceMonitor | class | Evaluates the licence status once the host has started (after its startup migrations) and then once per hour, so the warning log appears at startup and hourly while the status warrants it. |
WorkflowLicenceNoticeView | class | The licence notice in the engine’s health and API output: the fields and case names the Router reports in its licence health output, so both components show it alike. |
WorkflowLicenceReleaseContext | class | The release context of the running engine: the stamp of the engine assembly and the roots of Component (the embedded published root, or the set STELLAOPS_ names). |
WorkflowLicenceSnapshot | record | One licence evaluation of the running engine, as the health detail, the gauge and the notice report it. |
WorkflowLicenceState | class | The latest licence evaluation of this process; read by the health detail and the gauge. |
interface IWorkflowLicenceReleaseContext
public interface IWorkflowLicenceReleaseContext
The inputs of a licence evaluation that come from the release and the operator, not from the installation’s use: the running version’s first-publication date and the vendor trust roots.
Members
| Member | Kind | Summary |
|---|---|---|
PublishedAt | property | The Stella stamp of the engine’s source release; a build or adaptation of a released version keeps it, and its own build date is never used. |
ResolveTrustRoots( | method | The vendor-entitlement roots that licence file signatures are checked against, resolved per evaluation. |
property PublishedAt #
PublishedAt #DateOnly? PublishedAt { get; }
The Stella stamp of the engine’s source release; a build or adaptation of a released version keeps it, and its own build date is never used. null in a development build.
method ResolveTrustRoots() #
ResolveTrustRoots() #ComponentLicenceTrustRoots ResolveTrustRoots()
The vendor-entitlement roots that licence file signatures are checked against, resolved per evaluation.
class InMemoryWorkflowFirstSeenLedger
public sealed class InMemoryWorkflowFirstSeenLedger : IWorkflowFirstSeenLedger
The first-seen ledger of a host without a workflow store. It lives in process memory, so it counts what this process has seen (in practice the code catalogue: such a host has no definition store to import into) and starts empty on every restart. This is the documented limitation of hosts without a workflow store; the PostgreSQL and MongoDB stores replace this ledger with a durable one. Its lock serialises recording within the process. Recording never refuses a workflow.
Members
| Member | Kind | Summary |
|---|---|---|
InMemoryWorkflowFirstSeenLedger( | constructor | Creates an instance of In. |
IsDurable | property | true when the record survives a restart (the PostgreSQL and MongoDB ledgers); false for the process-memory ledger of a host without a workflow store, which counts only what this process has seen. |
CountAsync( | method | The number of distinct workflows ever recorded. |
ListAsync( | method | Every workflow ever recorded, one entry per workflow with its first sighting, ordered by WorkflowFirstSeenIdentity.(ordinal). |
RecordAsync( | method | Records the workflows in workflowNames that the ledger has not seen, with source (WorkflowFirstSeenSources) and seenOnUtc. |
RecordStoredDefinitionsAsync( | method | Records every workflow the definition store holds that the ledger has not seen, active or not, with the creation time of its first stored version. |
constructor InMemoryWorkflowFirstSeenLedger() #
InMemoryWorkflowFirstSeenLedger() #public InMemoryWorkflowFirstSeenLedger()
Creates an instance of In.
property IsDurable #
IsDurable #public bool IsDurable { get; }
true when the record survives a restart (the PostgreSQL and MongoDB ledgers); false for the process-memory ledger of a host without a workflow store, which counts only what this process has seen.
method CountAsync(CancellationToken) #
CountAsync(CancellationToken) #public Task<int> CountAsync(CancellationToken cancellationToken = default)
The number of distinct workflows ever recorded.
method ListAsync(CancellationToken) #
ListAsync(CancellationToken) #public Task<IReadOnlyList<WorkflowFirstSeenRecord>> ListAsync(CancellationToken cancellationToken = default)
Every workflow ever recorded, one entry per workflow with its first sighting, ordered by WorkflowFirstSeenIdentity.(ordinal). The number of entries is the count IWorkflowFirstSeenLedger.returns for the same ledger state. Reads only; records nothing.
method RecordAsync(IReadOnlyCollection<string>, string, DateTimeOffset, CancellationToken) #
RecordAsync(IReadOnlyCollection<string>, string, DateTimeOffset, CancellationToken) #public Task RecordAsync(IReadOnlyCollection<string> workflowNames, string source, DateTimeOffset seenOnUtc, CancellationToken cancellationToken = default)
Records the workflows in workflowNames that the ledger has not seen, with source (WorkflowFirstSeenSources) and seenOnUtc. A workflow already recorded is left as it is. Every recording is serialised against every other recording of the same ledger, so engines that share it record each name once.
method RecordStoredDefinitionsAsync(CancellationToken) #
RecordStoredDefinitionsAsync(CancellationToken) #public Task RecordStoredDefinitionsAsync(CancellationToken cancellationToken = default)
Records every workflow the definition store holds that the ledger has not seen, active or not, with the creation time of its first stored version. It reconciles imports whose ledger write was interrupted and definitions stored before the ledger existed. A ledger without a durable definition store records nothing here.
class WorkflowComponentLicenceOptions
public sealed class WorkflowComponentLicenceOptions
Configuration of the component licence reader, section Stella. Every value is optional: without a licence record the engine reports its status from the count alone, and an invalid value never stops the host (the record is then not loaded, with the reason as a detail).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowComponentLicenceOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: Stella. |
InstallationId | property | The Installation identifier the licence files name: a lowercase UUID. |
Key | property | The licence key: the standard base64 of a licence file as one line, the same signed record as the file (an encoding, not a protection). |
Path | property | A licence file, or a directory whose *.dsse.json files are read. |
constructor WorkflowComponentLicenceOptions() #
WorkflowComponentLicenceOptions() #public WorkflowComponentLicenceOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "StellaOps:ComponentLicence"
The configuration section the options bind from: Stella.
property InstallationId #
InstallationId #public string? InstallationId { get; set; }
The Installation identifier the licence files name: a lowercase UUID.
property Key #
Key #public string? Key { get; set; }
The licence key: the standard base64 of a licence file as one line, the same signed record as the file (an encoding, not a protection). Configure the path or the key; with both, neither is read and the details show conflicting_sources.
property Path #
Path #public string? Path { get; set; }
A licence file, or a directory whose *.dsse.json files are read. Local path only.
class WorkflowDesignatedWorkflowQueryService
public sealed class WorkflowDesignatedWorkflowQueryService
Reads the Designated Workflows from the first-seen ledger for the self-attestation count, with the licence status and the licence notice of the latest licence evaluation. It only reads: it records nothing, so the list is the ledger as the latest recording left it (the licence evaluation at startup and every hour, and each definition import). Nothing is sent anywhere.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDesignatedWorkflowQueryService( | constructor | Reads the Designated Workflows from the first-seen ledger for the self-attestation count, with the licence status and the licence notice of the latest licence evaluation. |
GetAsync( | method | Returns the designated workflows of the first-seen ledger, with the licence status and the notice of the latest licence evaluation. |
constructor WorkflowDesignatedWorkflowQueryService(IWorkflowFirstSeenLedger, WorkflowLicenceState) #
WorkflowDesignatedWorkflowQueryService(IWorkflowFirstSeenLedger, WorkflowLicenceState) #public WorkflowDesignatedWorkflowQueryService(IWorkflowFirstSeenLedger ledger, WorkflowLicenceState state)
Reads the Designated Workflows from the first-seen ledger for the self-attestation count, with the licence status and the licence notice of the latest licence evaluation. It only reads: it records nothing, so the list is the ledger as the latest recording left it (the licence evaluation at startup and every hour, and each definition import). Nothing is sent anywhere.
method GetAsync(CancellationToken) #
GetAsync(CancellationToken) #public Task<WorkflowDesignatedWorkflowsGetResponse> GetAsync(CancellationToken cancellationToken = default)
Returns the designated workflows of the first-seen ledger, with the licence status and the notice of the latest licence evaluation.
Parameters
cancellationToken: Cancels the operation.
Returns
The designated workflows.
class WorkflowLicenceAssessor
public sealed class WorkflowLicenceAssessor
Evaluates the engine’s licence status: records the code catalogue and the definition store in the first-seen ledger, counts the ledger (the technical count of recorded workflow names), reads the licence records offline and runs the shared component licence evaluator against the running version’s first-publication date. Warnings only: it refuses, restricts and stops nothing, never fails readiness or liveness, makes no network call and sends nothing anywhere. A ledger that cannot be read gives the count-unavailable status, and a record that cannot be read a detail; neither is thrown.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceAssessor( | constructor | Evaluates the engine’s licence status: records the code catalogue and the definition store in the first-seen ledger, counts the ledger (the technical count of recorded workflow names), reads the licence records offline and runs the shared component licence evaluator against the running version’s first-publication date. |
EvaluateAsync( | method | Runs one evaluation and publishes it to WorkflowLicenceState. |
constructor WorkflowLicenceAssessor(IServiceScopeFactory, IWorkflowRegistrationCatalog, WorkflowLicenceFileReader, WorkflowLicenceState, TimeProvider, ILogger<WorkflowLicenceAssessor>) #
WorkflowLicenceAssessor(IServiceScopeFactory, IWorkflowRegistrationCatalog, WorkflowLicenceFileReader, WorkflowLicenceState, TimeProvider, ILogger<WorkflowLicenceAssessor>) #public WorkflowLicenceAssessor(IServiceScopeFactory scopeFactory, IWorkflowRegistrationCatalog catalog, WorkflowLicenceFileReader licenceFiles, WorkflowLicenceState state, TimeProvider timeProvider, ILogger<WorkflowLicenceAssessor> logger)
Evaluates the engine’s licence status: records the code catalogue and the definition store in the first-seen ledger, counts the ledger (the technical count of recorded workflow names), reads the licence records offline and runs the shared component licence evaluator against the running version’s first-publication date. Warnings only: it refuses, restricts and stops nothing, never fails readiness or liveness, makes no network call and sends nothing anywhere. A ledger that cannot be read gives the count-unavailable status, and a record that cannot be read a detail; neither is thrown.
method EvaluateAsync(bool, CancellationToken) #
EvaluateAsync(bool, CancellationToken) #public Task<WorkflowLicenceSnapshot> EvaluateAsync(bool startup, CancellationToken cancellationToken = default)
Runs one evaluation and publishes it to WorkflowLicenceState. The licence notice is logged at information level on every evaluation (startup and hourly). The warning log is written on every evaluation whose status warns (Component: every status but within-free-limit and record-matches); those two are logged at information level at startup and when the status changes.
class WorkflowLicenceFileReader
public sealed class WorkflowLicenceFileReader
Reads the configured licence records offline, from the path (Stella) or the licence key (Stella), and verifies them against the release context’s trust roots. With both set neither is read (conflicting_sources). The licence evaluation reads them again at every pass. A failure to read is reported, never thrown.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceFileReader( | constructor | Reads the configured licence records offline, from the path (Stella) or the licence key (Stella), and verifies them against the release context’s trust roots. |
PublishedAt | property | The running version’s first-publication date; null in a development build. |
Read( | method | Reads and verifies the configured licence files for the Workflow component. |
constructor WorkflowLicenceFileReader(IOptionsMonitor<WorkflowComponentLicenceOptions>, IWorkflowLicenceReleaseContext, ILogger<WorkflowLicenceFileReader>) #
WorkflowLicenceFileReader(IOptionsMonitor<WorkflowComponentLicenceOptions>, IWorkflowLicenceReleaseContext, ILogger<WorkflowLicenceFileReader>) #public WorkflowLicenceFileReader(IOptionsMonitor<WorkflowComponentLicenceOptions> options, IWorkflowLicenceReleaseContext releaseContext, ILogger<WorkflowLicenceFileReader> logger)
Reads the configured licence records offline, from the path (Stella) or the licence key (Stella), and verifies them against the release context’s trust roots. With both set neither is read (conflicting_sources). The licence evaluation reads them again at every pass. A failure to read is reported, never thrown.
property PublishedAt #
PublishedAt #public DateOnly? PublishedAt { get; }
The running version’s first-publication date; null in a development build.
method Read() #
Read() #public WorkflowLicenceFiles Read()
Reads and verifies the configured licence files for the Workflow component. No path and no key reads nothing; a read that fails is logged and reported as an issue, not raised.
Returns
The verified licence sources, any issue, and whether an installation id is configured.
record WorkflowLicenceFiles
public sealed record WorkflowLicenceFiles
The licence records one read loaded, with the reason when they could not be read.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceFiles( | constructor | Creates an instance of WorkflowLicenceFiles. |
InstallationIdConfigured | property | Whether an Installation identifier is configured. |
Issue | property | Set when the files could not be read; then WorkflowLicenceFiles.is empty. |
Sources | property | Every record read (each file, or the licence key), loaded or not, with its verification. |
constructor WorkflowLicenceFiles() #
WorkflowLicenceFiles() #public WorkflowLicenceFiles()
Creates an instance of WorkflowLicenceFiles.
property InstallationIdConfigured #
InstallationIdConfigured #public required bool InstallationIdConfigured { get; init; }
Whether an Installation identifier is configured.
property Issue #
Issue #public string? Issue { get; init; }
Set when the files could not be read; then WorkflowLicenceFiles.is empty.
property Sources #
Sources #public required IReadOnlyList<ComponentLicenceSource> Sources { get; init; }
Every record read (each file, or the licence key), loaded or not, with its verification.
class WorkflowLicenceHealthCheck
public sealed class WorkflowLicenceHealthCheck : IHealthCheck
The licence entry of the health output. Informational only: it always reports HealthStatus.Healthy, so it never fails readiness or liveness, never removes the engine from service and never triggers a restart; the licence status and the licence notice are in its data.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceHealthCheck( | constructor | The licence entry of the health output. |
Name | constant | The health check name. |
CheckHealthAsync( | method | See IHealth. |
constructor WorkflowLicenceHealthCheck(WorkflowLicenceState) #
WorkflowLicenceHealthCheck(WorkflowLicenceState) #public WorkflowLicenceHealthCheck(WorkflowLicenceState state)
The licence entry of the health output. Informational only: it always reports HealthStatus.Healthy, so it never fails readiness or liveness, never removes the engine from service and never triggers a restart; the licence status and the licence notice are in its data.
constant Name #
Name #public const string Name = "licence"
The health check name.
method CheckHealthAsync(HealthCheckContext, CancellationToken) #
CheckHealthAsync(HealthCheckContext, CancellationToken) #public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
See IHealth.
class WorkflowLicenceMetrics
public sealed class WorkflowLicenceMetrics : IDisposable
The licence gauge: the count of recorded workflow names of the latest evaluation, tagged with its status name; no measurement while the count is unavailable. It is exported only through the host’s own metrics pipeline; nothing is sent to the vendor.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceMetrics( | constructor | Creates the gauge of the designated workflows, tagged with the licence status. |
GaugeName | constant | The gauge name. |
MeterName | constant | The meter name. |
StatusTag | constant | The status tag of the gauge. |
Meter | property | The meter of this instance. |
Dispose( | method | Disposes the meter when the metrics created it. |
constructor WorkflowLicenceMetrics(WorkflowLicenceState, IMeterFactory) #
WorkflowLicenceMetrics(WorkflowLicenceState, IMeterFactory) #public WorkflowLicenceMetrics(WorkflowLicenceState state, IMeterFactory? meterFactory = null)
Creates the gauge of the designated workflows, tagged with the licence status.
Parameters
state: The licence state.meterFactory: Creates the meter; when not set, the metrics create their own meter and dispose it.
constant GaugeName #
GaugeName #public const string GaugeName = "stellaops.workflow.licence.designated_workflows"
The gauge name.
constant MeterName #
MeterName #public const string MeterName = "StellaOps.Workflow.Licence"
The meter name.
constant StatusTag #
StatusTag #public const string StatusTag = "licence.status"
The status tag of the gauge.
property Meter #
Meter #public Meter Meter { get; }
The meter of this instance.
method Dispose() #
Dispose() #public void Dispose()
Disposes the meter when the metrics created it.
class WorkflowLicenceMonitor
public sealed class WorkflowLicenceMonitor : BackgroundService
Evaluates the licence status once the host has started (after its startup migrations) and then once per hour, so the warning log appears at startup and hourly while the status warrants it. It never stops, delays or degrades the engine: a failed evaluation is logged and retried at the next interval.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceMonitor( | constructor | Evaluates the licence status once the host has started (after its startup migrations) and then once per hour, so the warning log appears at startup and hourly while the status warrants it. |
EvaluationInterval | field | The interval between evaluations. |
constructor WorkflowLicenceMonitor(WorkflowLicenceAssessor, WorkflowLicenceMetrics, TimeProvider, ILogger<WorkflowLicenceMonitor>, IHostApplicationLifetime) #
WorkflowLicenceMonitor(WorkflowLicenceAssessor, WorkflowLicenceMetrics, TimeProvider, ILogger<WorkflowLicenceMonitor>, IHostApplicationLifetime) #public WorkflowLicenceMonitor(WorkflowLicenceAssessor assessor, WorkflowLicenceMetrics metrics, TimeProvider timeProvider, ILogger<WorkflowLicenceMonitor> logger, IHostApplicationLifetime? lifetime = null)
Evaluates the licence status once the host has started (after its startup migrations) and then once per hour, so the warning log appears at startup and hourly while the status warrants it. It never stops, delays or degrades the engine: a failed evaluation is logged and retried at the next interval.
field EvaluationInterval #
EvaluationInterval #public static readonly TimeSpan EvaluationInterval
The interval between evaluations.
class WorkflowLicenceNoticeView
public static class WorkflowLicenceNoticeView
The licence notice in the engine’s health and API output: the fields and case names the Router reports in its licence health output, so both components show it alike.
Members
| Member | Kind | Summary |
|---|---|---|
From( | method | Converts a licence notice for the API: the notice text and its fields. |
HealthData( | method | The notice as the nested notice object of the licence health data. |
method From(ComponentLicenceNotice) #
From(ComponentLicenceNotice) #public static WorkflowLicenceNotice From(ComponentLicenceNotice notice)
Converts a licence notice for the API: the notice text and its fields.
Parameters
notice: The notice.
Returns
The notice view.
method HealthData(WorkflowLicenceNotice) #
HealthData(WorkflowLicenceNotice) #public static IReadOnlyDictionary<string, object?> HealthData(WorkflowLicenceNotice notice)
The notice as the nested notice object of the licence health data.
class WorkflowLicenceReleaseContext
public sealed class WorkflowLicenceReleaseContext : IWorkflowLicenceReleaseContext
The release context of the running engine: the stamp of the engine assembly and the roots of Component (the embedded published root, or the set STELLAOPS_ names). Local reads only.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceReleaseContext( | constructor | Creates an instance of Workflow. |
PublishedAt | property | The Stella stamp of the engine’s source release; a build or adaptation of a released version keeps it, and its own build date is never used. |
ResolveTrustRoots( | method | The vendor-entitlement roots that licence file signatures are checked against, resolved per evaluation. |
constructor WorkflowLicenceReleaseContext() #
WorkflowLicenceReleaseContext() #public WorkflowLicenceReleaseContext()
Creates an instance of Workflow.
property PublishedAt #
PublishedAt #public DateOnly? PublishedAt { get; }
The Stella stamp of the engine’s source release; a build or adaptation of a released version keeps it, and its own build date is never used. null in a development build.
method ResolveTrustRoots() #
ResolveTrustRoots() #public ComponentLicenceTrustRoots ResolveTrustRoots()
The vendor-entitlement roots that licence file signatures are checked against, resolved per evaluation.
record WorkflowLicenceSnapshot
public sealed record WorkflowLicenceSnapshot
One licence evaluation of the running engine, as the health detail, the gauge and the notice report it.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceSnapshot( | constructor | Creates an instance of Workflow. |
Assessment | property | The component licence evaluator’s result: status, message, count and details. |
InstallationIdConfigured | property | Whether an Installation identifier is configured. |
LedgerDurable | property | true when the count comes from a durable ledger (PostgreSQL or MongoDB). |
LedgerIssue | property | Set when the ledger could not be read and the count fell back to the code catalogue. |
LicenceFilesLoaded | property | Licence files read and loaded. |
LicenceFilesNotLoaded | property | Licence files read and not loaded (the reasons are in the assessment details). |
Notice | property | The licence notice of WorkflowLicenceSnapshot.. |
NoticeHeadline | property | The short notice text: “Licensed to” the licensee, or the message of the notice case. |
Sequence | property | The evaluation number in this process, from 1. |
Warns | property | true while the status is one the monitor logs as a warning at startup and hourly: Component, every status but within-free-limit and record-matches. |
constructor WorkflowLicenceSnapshot() #
WorkflowLicenceSnapshot() #public WorkflowLicenceSnapshot()
Creates an instance of Workflow.
property Assessment #
Assessment #public required ComponentLicenceAssessment Assessment { get; init; }
The component licence evaluator’s result: status, message, count and details.
property InstallationIdConfigured #
InstallationIdConfigured #public required bool InstallationIdConfigured { get; init; }
Whether an Installation identifier is configured.
property LedgerDurable #
LedgerDurable #public required bool LedgerDurable { get; init; }
true when the count comes from a durable ledger (PostgreSQL or MongoDB).
property LedgerIssue #
LedgerIssue #public string? LedgerIssue { get; init; }
Set when the ledger could not be read and the count fell back to the code catalogue.
property LicenceFilesLoaded #
LicenceFilesLoaded #public required int LicenceFilesLoaded { get; init; }
Licence files read and loaded.
property LicenceFilesNotLoaded #
LicenceFilesNotLoaded #public required int LicenceFilesNotLoaded { get; init; }
Licence files read and not loaded (the reasons are in the assessment details).
property Notice #
Notice #public required ComponentLicenceNotice Notice { get; init; }
The licence notice of WorkflowLicenceSnapshot..
property NoticeHeadline #
NoticeHeadline #public string NoticeHeadline { get; }
The short notice text: “Licensed to” the licensee, or the message of the notice case. Pass it to the SVG renderer, which writes it into every diagram.
property Sequence #
Sequence #public required long Sequence { get; init; }
The evaluation number in this process, from 1.
property Warns #
Warns #public bool Warns { get; }
true while the status is one the monitor logs as a warning at startup and hourly: Component, every status but within-free-limit and record-matches. A warning refuses nothing.
class WorkflowLicenceState
public sealed class WorkflowLicenceState
The latest licence evaluation of this process; read by the health detail and the gauge.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowLicenceState( | constructor | Creates an instance of WorkflowLicenceState. |
Current | property | The latest evaluation; null before the first one. |
constructor WorkflowLicenceState() #
WorkflowLicenceState() #public WorkflowLicenceState()
Creates an instance of WorkflowLicenceState.
property Current #
Current #public WorkflowLicenceSnapshot? Current { get; }
The latest evaluation; null before the first one.
namespace StellaOps.Workflow.Engine.Maps
| Type | Kind | Description |
|---|---|---|
IWorkflowMapItemExecutionHandler | interface | Runs the body of a map item. |
WorkflowMapAdvanceDecision | record | Whether a completed step belongs to a map item, and the signal that resumes it. |
WorkflowMapCompletedSignalDispatcher | class | Materializes a durable map when the runtime reaches it (MapCompleted pending signal) and publishes the completion signal the coordinator returns once every item has finished. |
WorkflowMapCoordinator | class | Owns normalized map materialization, bounded item dispatch and deterministic fan-in. |
WorkflowMapCreateRequest | record | A map execution to create with its items. |
WorkflowMapExecutionPlan | record | The frozen plan of a map: its workflow, bounds, policies and body. |
WorkflowMapItemExecutionDecision | record | The next step of a map item: an activity, a nested map, or its end. |
WorkflowMapItemExecutionRequest | record | A map item to run or resume. |
WorkflowMapItemExecutionState | record | The progress of a map item. |
WorkflowMapItemLease | record | A claimed map item. |
WorkflowMapItemSeed | record | An item to create in a map. |
WorkflowMapMaterializationItemPlan | record | An item of a map plan. |
WorkflowMapMaterializationPlan | record | A map to create: its plan and items. |
WorkflowMapRuntimeException | class | Raised when a map breaks a runtime rule, such as MAP_BOUND_INVALID or MAP_. |
WorkflowMapRuntimeService | class | Runs map executions: creates a map and its items, leases ready items to workers within the concurrency limits, and records item progress and outcomes. |
WorkflowRetryClassifier | class | Computes the delay before a retry from a retry policy: fixed, exponential (doubling with each attempt) or the provider’s hint up to its maximum; capped at the maximum delay and spread by a deterministic jitter. |
interface IWorkflowMapItemExecutionHandler
public interface IWorkflowMapItemExecutionHandler
Runs the body of a map item.
Members
| Member | Kind | Summary |
|---|---|---|
ExecuteMapItemAsync( | method | Runs the item until it waits or ends. |
method ExecuteMapItemAsync(WorkflowMapItemExecutionRequest, CancellationToken) #
ExecuteMapItemAsync(WorkflowMapItemExecutionRequest, CancellationToken) #Task<WorkflowMapItemExecutionDecision> ExecuteMapItemAsync(WorkflowMapItemExecutionRequest request, CancellationToken cancellationToken = default)
Runs the item until it waits or ends.
Parameters
request: The item.cancellationToken: Cancels the operation.
Returns
What happens next.
record WorkflowMapAdvanceDecision
public sealed record WorkflowMapAdvanceDecision
Whether a completed step belongs to a map item, and the signal that resumes it.
Parameters
IsMapItem: Whether the step runs for a map item.ResumeSignal: The signal that resumes the item, when there is one.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapAdvanceDecision( | constructor | Whether a completed step belongs to a map item, and the signal that resumes it. |
IsMapItem | property | Whether the step runs for a map item. |
ResumeSignal | property | The signal that resumes the item, when there is one. |
constructor WorkflowMapAdvanceDecision(bool, WorkflowSignalEnvelope) #
WorkflowMapAdvanceDecision(bool, WorkflowSignalEnvelope) #public WorkflowMapAdvanceDecision(bool IsMapItem, WorkflowSignalEnvelope? ResumeSignal)
Whether a completed step belongs to a map item, and the signal that resumes it.
Parameters
IsMapItem: Whether the step runs for a map item.ResumeSignal: The signal that resumes the item, when there is one.
property IsMapItem #
IsMapItem #public bool IsMapItem { get; init; }
Whether the step runs for a map item.
property ResumeSignal #
ResumeSignal #public WorkflowSignalEnvelope? ResumeSignal { get; init; }
The signal that resumes the item, when there is one.
class WorkflowMapCompletedSignalDispatcher
public sealed class WorkflowMapCompletedSignalDispatcher : IWorkflowPendingSignalDispatcher
Materializes a durable map when the runtime reaches it (MapCompleted pending signal) and publishes the completion signal the coordinator returns once every item has finished.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapCompletedSignalDispatcher( | constructor | Materializes a durable map when the runtime reaches it (MapCompleted pending signal) and publishes the completion signal the coordinator returns once every item has finished. |
CanDispatch( | method | Whether this dispatcher sends a pending signal. |
DispatchAsync( | method | Dispatches the signal and returns the execution version the next signal must expect. |
constructor WorkflowMapCompletedSignalDispatcher(WorkflowMapCoordinator, IWorkflowSignalBus, IWorkflowRuntimeStateStore) #
WorkflowMapCompletedSignalDispatcher(WorkflowMapCoordinator, IWorkflowSignalBus, IWorkflowRuntimeStateStore) #public WorkflowMapCompletedSignalDispatcher(WorkflowMapCoordinator coordinator, IWorkflowSignalBus signalBus, IWorkflowRuntimeStateStore runtimeStateStore)
Materializes a durable map when the runtime reaches it (MapCompleted pending signal) and publishes the completion signal the coordinator returns once every item has finished.
method CanDispatch(WorkflowPendingSignalPlan) #
CanDispatch(WorkflowPendingSignalPlan) #public bool CanDispatch(WorkflowPendingSignalPlan pendingSignal)
Whether this dispatcher sends a pending signal.
Parameters
pendingSignal: The signal.
Returns
Whether it does.
method DispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #
DispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #public Task<long> DispatchAsync(string workflowInstanceId, WorkflowPendingSignalPlan pendingSignal, WorkflowRuntimeStateRecord runtimeState, CancellationToken cancellationToken = default)
Dispatches the signal and returns the execution version the next signal must expect.
class WorkflowMapCoordinator
public sealed class WorkflowMapCoordinator
Owns normalized map materialization, bounded item dispatch and deterministic fan-in. All mutations run in one Workflow mutation scope (the caller’s, when it has one) so a map item can never be visible without its durable activity dispatch, or terminal without the fan-in state that follows it.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapCoordinator( | constructor | Owns normalized map materialization, bounded item dispatch and deterministic fan-in. |
MaterializeAndDispatchAsync( | method | Creates the map a map step plans, in one change scope, and dispatches the items the capacity allows. |
TryAdvanceCompletedStepAsync( | method | Advances the map item a completed step runs for, in one change scope: runs the item on, records its outcome, dispatches more items and builds the signal that resumes the item or completes the map. |
constructor WorkflowMapCoordinator(IWorkflowMapStore, IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, WorkflowMapRuntimeService, WorkflowExternalActivityDispatchService, IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #
WorkflowMapCoordinator(IWorkflowMapStore, IWorkflowExternalActivityStore, IWorkflowMutationCoordinator, WorkflowMapRuntimeService, WorkflowExternalActivityDispatchService, IWorkflowRuntimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory) #public WorkflowMapCoordinator(IWorkflowMapStore mapStore, IWorkflowExternalActivityStore activityStore, IWorkflowMutationCoordinator mutationCoordinator, WorkflowMapRuntimeService mapRuntimeService, WorkflowExternalActivityDispatchService activityDispatchService, IWorkflowRuntimeDefinitionStore runtimeDefinitionStore, IWorkflowRuntimeExecutionHandlerFactory executionHandlerFactory)
Owns normalized map materialization, bounded item dispatch and deterministic fan-in. All mutations run in one Workflow mutation scope (the caller’s, when it has one) so a map item can never be visible without its durable activity dispatch, or terminal without the fan-in state that follows it.
method MaterializeAndDispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #
MaterializeAndDispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) #public Task<WorkflowSignalEnvelope?> MaterializeAndDispatchAsync(string workflowExecutionId, WorkflowPendingSignalPlan pendingSignal, WorkflowRuntimeStateRecord runtimeState, CancellationToken cancellationToken = default)
Creates the map a map step plans, in one change scope, and dispatches the items the capacity allows.
Parameters
workflowExecutionId: The execution.pendingSignal: The map plan.runtimeState: The runtime state of the execution.cancellationToken: Cancels the operation.
Returns
The signal that completes the map step when the map is already complete; null while items run.
Exceptions
Invalid: The runtime state belongs to another execution, the root scope is missing, or the signal is not a map plan.Operation Exception
method TryAdvanceCompletedStepAsync(string, string, IReadOnlyDictionary<string, JsonElement>, CancellationToken) #
TryAdvanceCompletedStepAsync(string, string, IReadOnlyDictionary<string, JsonElement>, CancellationToken) #public Task<WorkflowMapAdvanceDecision> TryAdvanceCompletedStepAsync(string workflowExecutionId, string stepExecutionId, IReadOnlyDictionary<string, JsonElement> completionPayload, CancellationToken cancellationToken = default)
Advances the map item a completed step runs for, in one change scope: runs the item on, records its outcome, dispatches more items and builds the signal that resumes the item or completes the map.
Parameters
workflowExecutionId: The execution.stepExecutionId: The completed step.completionPayload: The completion payload of the step.cancellationToken: Cancels the operation.
Returns
Whether the step runs for a map item, and the resume signal.
Exceptions
Invalid: The step or its map does not exist, belongs to another execution, or its item has no active lease.Operation Exception
record WorkflowMapCreateRequest
public sealed record WorkflowMapCreateRequest
A map execution to create with its items.
Parameters
MapExecutionId: The map execution.WorkflowExecutionId: The execution.ScopeExecutionId: The scope of the map.StepExecutionId: The map step.FanInPolicy: The fan-in policy.FailurePolicy: The failure policy.MinimumSucceeded: The items that must succeed underMIN_SUCCEEDED.MaxConcurrency: The items in flight at once.MaxItems: The items allowed.Max: The size limit of the collected results, in bytes.Aggregate State Bytes GlobalActivityClass: The class of activities whose concurrency is limited across all maps.ExecutionPlanSha256: The SHA-256 of the map plan.ExecutionPlanJson: The map plan, as JSON.Absolute: The deadline of the map, in UTC.Deadline At Utc Items: The items.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapCreateRequest( | constructor | A map execution to create with its items. |
AbsoluteDeadlineAtUtc | property | The deadline of the map, in UTC. |
ExecutionPlanJson | property | The map plan, as JSON. |
ExecutionPlanSha256 | property | The SHA-256 of the map plan. |
FailurePolicy | property | The failure policy. |
FanInPolicy | property | The fan-in policy. |
GlobalActivityClass | property | The class of activities whose concurrency is limited across all maps. |
Items | property | The items. |
MapExecutionId | property | The map execution. |
MaxAggregateStateBytes | property | The size limit of the collected results, in bytes. |
MaxConcurrency | property | The items in flight at once. |
MaxItems | property | The items allowed. |
MinimumSucceeded | property | The items that must succeed under MIN_SUCCEEDED. |
ScopeExecutionId | property | The scope of the map. |
StepExecutionId | property | The map step. |
WorkflowExecutionId | property | The execution. |
constructor WorkflowMapCreateRequest(string, string, string, string, string, string, int?, int, int, int, string, string, string, DateTime?, IReadOnlyCollection<WorkflowMapItemSeed>) #
WorkflowMapCreateRequest(string, string, string, string, string, string, int?, int, int, int, string, string, string, DateTime?, IReadOnlyCollection<WorkflowMapItemSeed>) #public WorkflowMapCreateRequest(string MapExecutionId, string WorkflowExecutionId, string ScopeExecutionId, string StepExecutionId, string FanInPolicy, string FailurePolicy, int? MinimumSucceeded, int MaxConcurrency, int MaxItems, int MaxAggregateStateBytes, string? GlobalActivityClass, string ExecutionPlanSha256, string ExecutionPlanJson, DateTime? AbsoluteDeadlineAtUtc, IReadOnlyCollection<WorkflowMapItemSeed> Items)
A map execution to create with its items.
Parameters
MapExecutionId: The map execution.WorkflowExecutionId: The execution.ScopeExecutionId: The scope of the map.StepExecutionId: The map step.FanInPolicy: The fan-in policy.FailurePolicy: The failure policy.MinimumSucceeded: The items that must succeed underMIN_SUCCEEDED.MaxConcurrency: The items in flight at once.MaxItems: The items allowed.Max: The size limit of the collected results, in bytes.Aggregate State Bytes GlobalActivityClass: The class of activities whose concurrency is limited across all maps.ExecutionPlanSha256: The SHA-256 of the map plan.ExecutionPlanJson: The map plan, as JSON.Absolute: The deadline of the map, in UTC.Deadline At Utc Items: The items.
property AbsoluteDeadlineAtUtc #
AbsoluteDeadlineAtUtc #public DateTime? AbsoluteDeadlineAtUtc { get; init; }
The deadline of the map, in UTC.
property ExecutionPlanJson #
ExecutionPlanJson #public string ExecutionPlanJson { get; init; }
The map plan, as JSON.
property ExecutionPlanSha256 #
ExecutionPlanSha256 #public string ExecutionPlanSha256 { get; init; }
The SHA-256 of the map plan.
property FailurePolicy #
FailurePolicy #public string FailurePolicy { get; init; }
The failure policy.
property FanInPolicy #
FanInPolicy #public string FanInPolicy { get; init; }
The fan-in policy.
property GlobalActivityClass #
GlobalActivityClass #public string? GlobalActivityClass { get; init; }
The class of activities whose concurrency is limited across all maps.
property Items #
Items #public IReadOnlyCollection<WorkflowMapItemSeed> Items { get; init; }
The items.
property MapExecutionId #
MapExecutionId #public string MapExecutionId { get; init; }
The map execution.
property MaxAggregateStateBytes #
MaxAggregateStateBytes #public int MaxAggregateStateBytes { get; init; }
The size limit of the collected results, in bytes.
property MaxConcurrency #
MaxConcurrency #public int MaxConcurrency { get; init; }
The items in flight at once.
property MaxItems #
MaxItems #public int MaxItems { get; init; }
The items allowed.
property MinimumSucceeded #
MinimumSucceeded #public int? MinimumSucceeded { get; init; }
The items that must succeed under MIN_SUCCEEDED.
property ScopeExecutionId #
ScopeExecutionId #public string ScopeExecutionId { get; init; }
The scope of the map.
property StepExecutionId #
StepExecutionId #public string StepExecutionId { get; init; }
The map step.
property WorkflowExecutionId #
WorkflowExecutionId #public string WorkflowExecutionId { get; init; }
The execution.
record WorkflowMapExecutionPlan
public sealed record WorkflowMapExecutionPlan
The frozen plan of a map: its workflow, bounds, policies and body.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapExecutionPlan( | constructor | Creates an instance of Workflow. |
AbsoluteDeadlineAtUtc | property | The deadline of the map, in UTC. |
BodyResumePointer | property | Where the body starts. |
FailurePolicy | property | The failure policy. |
FanInPolicy | property | The fan-in policy. |
GlobalActivityClass | property | The class of activities whose concurrency is limited across all maps. |
ItemResultExpression | property | The result of an item, evaluated after its body. |
ItemStateKey | property | The state key that holds the current item. |
MapStepExecutionId | property | The map step. |
MaxAggregateStateBytes | property | The size limit of the collected results, in bytes. |
MaxConcurrency | property | The items in flight at once. |
MaxItems | property | The items allowed. |
MinimumSucceeded | property | The items that must succeed under MIN_SUCCEEDED. |
RetryPolicy | property | The retry policy of an item. |
StepName | property | The step name. |
WorkflowName | property | The workflow name. |
WorkflowVersion | property | The workflow version. |
constructor WorkflowMapExecutionPlan() #
WorkflowMapExecutionPlan() #public WorkflowMapExecutionPlan()
Creates an instance of Workflow.
property AbsoluteDeadlineAtUtc #
AbsoluteDeadlineAtUtc #public DateTime? AbsoluteDeadlineAtUtc { get; init; }
The deadline of the map, in UTC.
property BodyResumePointer #
BodyResumePointer #public required JsonElement BodyResumePointer { get; init; }
Where the body starts.
property FailurePolicy #
FailurePolicy #public required string FailurePolicy { get; init; }
The failure policy.
property FanInPolicy #
FanInPolicy #public required string FanInPolicy { get; init; }
The fan-in policy.
property GlobalActivityClass #
GlobalActivityClass #public string? GlobalActivityClass { get; init; }
The class of activities whose concurrency is limited across all maps.
property ItemResultExpression #
ItemResultExpression #public required WorkflowExpressionDefinition ItemResultExpression { get; init; }
The result of an item, evaluated after its body.
property ItemStateKey #
ItemStateKey #public required string ItemStateKey { get; init; }
The state key that holds the current item.
property MapStepExecutionId #
MapStepExecutionId #public required string MapStepExecutionId { get; init; }
The map step.
property MaxAggregateStateBytes #
MaxAggregateStateBytes #public required int MaxAggregateStateBytes { get; init; }
The size limit of the collected results, in bytes.
property MaxConcurrency #
MaxConcurrency #public required int MaxConcurrency { get; init; }
The items in flight at once.
property MaxItems #
MaxItems #public required int MaxItems { get; init; }
The items allowed.
property MinimumSucceeded #
MinimumSucceeded #public int? MinimumSucceeded { get; init; }
The items that must succeed under MIN_SUCCEEDED.
property RetryPolicy #
RetryPolicy #public required WorkflowRetryPolicyDeclaration RetryPolicy { get; init; }
The retry policy of an item.
property StepName #
StepName #public required string StepName { get; init; }
The step name.
property WorkflowName #
WorkflowName #public required string WorkflowName { get; init; }
The workflow name.
property WorkflowVersion #
WorkflowVersion #public required string WorkflowVersion { get; init; }
The workflow version.
record WorkflowMapItemExecutionDecision
public sealed record WorkflowMapItemExecutionDecision
The next step of a map item: an activity, a nested map, or its end.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapItemExecutionDecision( | constructor | Creates an instance of Workflow. |
ExecutionState | property | The progress after the step. |
IsTerminal | property | Whether the item ended. |
PendingActivity | property | An activity to dispatch. |
PendingMap | property | A nested map to create. |
SafeResultDescriptor | property | The safe result descriptor. |
TerminalOutcome | property | The final outcome, when the item ended. |
constructor WorkflowMapItemExecutionDecision() #
WorkflowMapItemExecutionDecision() #public WorkflowMapItemExecutionDecision()
Creates an instance of Workflow.
property ExecutionState #
ExecutionState #public required WorkflowMapItemExecutionState ExecutionState { get; init; }
The progress after the step.
property IsTerminal #
IsTerminal #public bool IsTerminal { get; }
Whether the item ended.
property PendingActivity #
PendingActivity #public WorkflowPendingSignalPlan? PendingActivity { get; init; }
An activity to dispatch.
property PendingMap #
PendingMap #public WorkflowPendingSignalPlan? PendingMap { get; init; }
A nested map to create.
property SafeResultDescriptor #
SafeResultDescriptor #public JsonElement? SafeResultDescriptor { get; init; }
The safe result descriptor.
property TerminalOutcome #
TerminalOutcome #public string? TerminalOutcome { get; init; }
The final outcome, when the item ended.
record WorkflowMapItemExecutionRequest
public sealed record WorkflowMapItemExecutionRequest
A map item to run or resume.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapItemExecutionRequest( | constructor | Creates an instance of Workflow. |
BusinessReference | property | The business reference. |
CompletionPayload | property | The payload of the completion that resumes the item. |
CompletionSignalType | property | The type of the signal that resumes the item. |
ExecutionPlan | property | The map plan. |
ItemDescriptor | property | The item descriptor. |
PriorExecutionState | property | The progress so far, when the item resumes. |
RootWorkflowState | property | The state of the execution. |
constructor WorkflowMapItemExecutionRequest() #
WorkflowMapItemExecutionRequest() #public WorkflowMapItemExecutionRequest()
Creates an instance of Workflow.
property BusinessReference #
BusinessReference #public WorkflowBusinessReference? BusinessReference { get; init; }
The business reference.
property CompletionPayload #
CompletionPayload #public IReadOnlyDictionary<string, JsonElement>? CompletionPayload { get; init; }
The payload of the completion that resumes the item.
property CompletionSignalType #
CompletionSignalType #public string? CompletionSignalType { get; init; }
The type of the signal that resumes the item.
property ExecutionPlan #
ExecutionPlan #public required WorkflowMapExecutionPlan ExecutionPlan { get; init; }
The map plan.
property ItemDescriptor #
ItemDescriptor #public required JsonElement ItemDescriptor { get; init; }
The item descriptor.
property PriorExecutionState #
PriorExecutionState #public WorkflowMapItemExecutionState? PriorExecutionState { get; init; }
The progress so far, when the item resumes.
property RootWorkflowState #
RootWorkflowState #public required IReadOnlyDictionary<string, JsonElement> RootWorkflowState { get; init; }
The state of the execution.
record WorkflowMapItemExecutionState
public sealed record WorkflowMapItemExecutionState
The progress of a map item.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapItemExecutionState( | constructor | Creates an instance of Workflow. |
ResumeState | property | Where the body resumes. |
WorkflowState | property | The item state. |
constructor WorkflowMapItemExecutionState() #
WorkflowMapItemExecutionState() #public WorkflowMapItemExecutionState()
Creates an instance of Workflow.
property ResumeState #
ResumeState #public IReadOnlyDictionary<string, JsonElement> ResumeState { get; init; }
Where the body resumes.
property WorkflowState #
WorkflowState #public IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }
The item state.
record WorkflowMapItemLease
public sealed record WorkflowMapItemLease
A claimed map item.
Parameters
MapItemId: The map item.ItemKey: The item key.Ordinal: The position of the item.ClaimFence: The claim fence.DescriptorSha256: The SHA-256 of the descriptor.DescriptorJson: The item descriptor, as JSON.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapItemLease( | constructor | A claimed map item. |
ClaimFence | property | The claim fence. |
DescriptorJson | property | The item descriptor, as JSON. |
DescriptorSha256 | property | The SHA-256 of the descriptor. |
ItemKey | property | The item key. |
MapItemId | property | The map item. |
Ordinal | property | The position of the item. |
constructor WorkflowMapItemLease(string, string, int, long, string, string) #
WorkflowMapItemLease(string, string, int, long, string, string) #public WorkflowMapItemLease(string MapItemId, string ItemKey, int Ordinal, long ClaimFence, string DescriptorSha256, string DescriptorJson)
A claimed map item.
Parameters
MapItemId: The map item.ItemKey: The item key.Ordinal: The position of the item.ClaimFence: The claim fence.DescriptorSha256: The SHA-256 of the descriptor.DescriptorJson: The item descriptor, as JSON.
property ClaimFence #
ClaimFence #public long ClaimFence { get; init; }
The claim fence.
property DescriptorJson #
DescriptorJson #public string DescriptorJson { get; init; }
The item descriptor, as JSON.
property DescriptorSha256 #
DescriptorSha256 #public string DescriptorSha256 { get; init; }
The SHA-256 of the descriptor.
property ItemKey #
ItemKey #public string ItemKey { get; init; }
The item key.
property MapItemId #
MapItemId #public string MapItemId { get; init; }
The map item.
property Ordinal #
Ordinal #public int Ordinal { get; init; }
The position of the item.
record WorkflowMapItemSeed
public sealed record WorkflowMapItemSeed
An item to create in a map.
Parameters
ItemKey: The item key.DescriptorSha256: The SHA-256 of the descriptor.DescriptorJson: The item descriptor, as JSON.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapItemSeed( | constructor | An item to create in a map. |
DescriptorJson | property | The item descriptor, as JSON. |
DescriptorSha256 | property | The SHA-256 of the descriptor. |
ItemKey | property | The item key. |
constructor WorkflowMapItemSeed(string, string, string) #
WorkflowMapItemSeed(string, string, string) #public WorkflowMapItemSeed(string ItemKey, string DescriptorSha256, string DescriptorJson)
An item to create in a map.
Parameters
ItemKey: The item key.DescriptorSha256: The SHA-256 of the descriptor.DescriptorJson: The item descriptor, as JSON.
property DescriptorJson #
DescriptorJson #public string DescriptorJson { get; init; }
The item descriptor, as JSON.
property DescriptorSha256 #
DescriptorSha256 #public string DescriptorSha256 { get; init; }
The SHA-256 of the descriptor.
property ItemKey #
ItemKey #public string ItemKey { get; init; }
The item key.
record WorkflowMapMaterializationItemPlan
public sealed record WorkflowMapMaterializationItemPlan
An item of a map plan.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapMaterializationItemPlan( | constructor | Creates an instance of Workflow. |
DescriptorJson | property | The item descriptor, as JSON. |
DescriptorSha256 | property | The SHA-256 of the descriptor. |
ItemKey | property | The item key. |
Ordinal | property | The position of the item. |
constructor WorkflowMapMaterializationItemPlan() #
WorkflowMapMaterializationItemPlan() #public WorkflowMapMaterializationItemPlan()
Creates an instance of Workflow.
property DescriptorJson #
DescriptorJson #public required string DescriptorJson { get; init; }
The item descriptor, as JSON.
property DescriptorSha256 #
DescriptorSha256 #public required string DescriptorSha256 { get; init; }
The SHA-256 of the descriptor.
property ItemKey #
ItemKey #public required string ItemKey { get; init; }
The item key.
property Ordinal #
Ordinal #public required int Ordinal { get; init; }
The position of the item.
record WorkflowMapMaterializationPlan
public sealed record WorkflowMapMaterializationPlan
A map to create: its plan and items.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapMaterializationPlan( | constructor | Creates an instance of Workflow. |
ExecutionPlan | property | The plan. |
Items | property | The items. |
MapExecutionId | property | The map execution. |
constructor WorkflowMapMaterializationPlan() #
WorkflowMapMaterializationPlan() #public WorkflowMapMaterializationPlan()
Creates an instance of Workflow.
property ExecutionPlan #
ExecutionPlan #public required WorkflowMapExecutionPlan ExecutionPlan { get; init; }
The plan.
property Items #
Items #public IReadOnlyCollection<WorkflowMapMaterializationItemPlan> Items { get; init; }
The items.
property MapExecutionId #
MapExecutionId #public required string MapExecutionId { get; init; }
The map execution.
class WorkflowMapRuntimeException
public sealed class WorkflowMapRuntimeException : Exception
Raised when a map breaks a runtime rule, such as MAP_BOUND_INVALID or MAP_.
Parameters
code: The code.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapRuntimeException( | constructor | Raised when a map breaks a runtime rule, such as MAP_BOUND_INVALID or MAP_. |
Code | property | The code. |
constructor WorkflowMapRuntimeException(string) #
WorkflowMapRuntimeException(string) #public WorkflowMapRuntimeException(string code)
Raised when a map breaks a runtime rule, such as MAP_BOUND_INVALID or MAP_.
Parameters
code: The code.
property Code #
Code #public string Code { get; }
The code.
class WorkflowMapRuntimeService
public sealed class WorkflowMapRuntimeService
Runs map executions: creates a map and its items, leases ready items to workers within the concurrency limits, and records item progress and outcomes.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMapRuntimeService( | constructor | Creates the service with the default runtime options. |
WorkflowMapRuntimeService( | constructor | Creates the service. |
ClaimReadyAsync( | method | Leases ready items to a worker, up to the free capacity: the smaller of the map’s MaxConcurrency and the runtime’s MaxMapConcurrency, less the active claims, and for a global activity class also the class limit less its active claims. |
CompleteItemAsync( | method | Records the outcome of a leased item and recalculates the map. |
CreateAsync( | method | Creates a map and its items, each READY, with the id {map}:{ordinal}. |
UpdateItemProgressAsync( | method | Records the running step and the execution state of a leased item. |
constructor WorkflowMapRuntimeService(IWorkflowMapStore, TimeProvider) #
WorkflowMapRuntimeService(IWorkflowMapStore, TimeProvider) #public WorkflowMapRuntimeService(IWorkflowMapStore store, TimeProvider timeProvider)
Creates the service with the default runtime options.
Parameters
store: The map store.timeProvider: The clock.
constructor WorkflowMapRuntimeService(IWorkflowMapStore, TimeProvider, IOptions<WorkflowRuntimeOptions>) #
WorkflowMapRuntimeService(IWorkflowMapStore, TimeProvider, IOptions<WorkflowRuntimeOptions>) #public WorkflowMapRuntimeService(IWorkflowMapStore store, TimeProvider timeProvider, IOptions<WorkflowRuntimeOptions> options)
Creates the service.
Parameters
store: The map store.timeProvider: The clock.options: The runtime options;MaxMapConcurrencycaps the items in flight.
method ClaimReadyAsync(string, string, int, TimeSpan, CancellationToken) #
ClaimReadyAsync(string, string, int, TimeSpan, CancellationToken) #public Task<IReadOnlyCollection<WorkflowMapItemLease>> ClaimReadyAsync(string mapExecutionId, string claimOwner, int requestedCount, TimeSpan leaseDuration, CancellationToken cancellationToken = default)
Leases ready items to a worker, up to the free capacity: the smaller of the map’s MaxConcurrency and the runtime’s MaxMapConcurrency, less the active claims, and for a global activity class also the class limit less its active claims. A map that is not ready or running leases nothing.
Parameters
mapExecutionId: The map.claimOwner: The worker.requestedCount: The most items to lease; positive.leaseDuration: How long a lease lasts; positive.cancellationToken: Cancels the operation.
Returns
The leased items.
Exceptions
Argument: The count or the duration is not positive.Out Of Range Exception
method CompleteItemAsync(string, string, long, string, string, CancellationToken) #
CompleteItemAsync(string, string, long, string, string, CancellationToken) #public Task CompleteItemAsync(string mapItemId, string claimOwner, long claimFence, string outcome, string? safeResultDescriptorJson, CancellationToken cancellationToken = default)
Records the outcome of a leased item and recalculates the map.
Parameters
mapItemId: The map item.claimOwner: The worker that holds the lease.claimFence: The claim fence of the lease.outcome:SUCCEEDED,PARTIAL,SKIPPEDorFAILED.safe: The result descriptor of the item, as JSON; none when not set.Result Descriptor Json cancellationToken: Cancels the operation.
Returns
A task that completes when the outcome is recorded.
Exceptions
WorkflowMapRuntimeException: The outcome is not one of the four, the lease is not current, or the collected state would exceedMax.Aggregate State Bytes
method CreateAsync(WorkflowMapCreateRequest, CancellationToken) #
CreateAsync(WorkflowMapCreateRequest, CancellationToken) #public Task<WorkflowMapExecutionRecord> CreateAsync(WorkflowMapCreateRequest request, CancellationToken cancellationToken = default)
Creates a map and its items, each READY, with the id {map}:{ordinal}. A map without items completes at once, or fails under MIN_SUCCEEDED. A map already created under its id is returned when the request is the same.
Parameters
request: The map and its items.cancellationToken: Cancels the operation.
Returns
The map.
Exceptions
WorkflowMapRuntimeException: More items thanMaxItems(MAP_), a repeated item key, or descriptors overITEM_ LIMIT_ EXCEEDED Max.Aggregate State Bytes
method UpdateItemProgressAsync(string, string, long, string, string, CancellationToken) #
UpdateItemProgressAsync(string, string, long, string, string, CancellationToken) #public Task UpdateItemProgressAsync(string mapItemId, string claimOwner, long claimFence, string activeStepExecutionId, string executionStateJson, CancellationToken cancellationToken = default)
Records the running step and the execution state of a leased item.
Parameters
mapItemId: The map item.claimOwner: The worker that holds the lease.claimFence: The claim fence of the lease.active: The running step.Step Execution Id executionStateJson: The execution state of the item, as JSON.cancellationToken: Cancels the operation.
Returns
A task that completes when the progress is recorded.
Exceptions
WorkflowMapRuntimeException: The lease is not current (MAP_CLAIM_STALE), or the collected state would exceedMax.Aggregate State Bytes
class WorkflowRetryClassifier
public static class WorkflowRetryClassifier
Computes the delay before a retry from a retry policy: fixed, exponential (doubling with each attempt) or the provider’s hint up to its maximum; capped at the maximum delay and spread by a deterministic jitter.
Members
| Member | Kind | Summary |
|---|---|---|
GetDelay( | method | The delay before the next retry, or null when no retry is left or the category is not retryable. |
method GetDelay(WorkflowRetryPolicyDeclaration, int, string, TimeSpan?, int) #
GetDelay(WorkflowRetryPolicyDeclaration, int, string, TimeSpan?, int) #public static TimeSpan? GetDelay(WorkflowRetryPolicyDeclaration policy, int completedSemanticAttempts, string failureCategory, TimeSpan? providerHint, int deterministicJitterSeed)
The delay before the next retry, or null when no retry is left or the category is not retryable.
Parameters
policy: The retry policy.completed: The attempts made.Semantic Attempts failureCategory: The failure category.providerHint: The delay the provider asked for.deterministic: The seed of the deterministic jitter.Jitter Seed
Returns
The delay, or null.
namespace StellaOps.Workflow.Engine.Observability
| Type | Kind | Description |
|---|---|---|
WorkflowMetricCatalog | class | The metric names reserved for the Workflow engine. |
WorkflowMetricLabelPolicy | class | The metric labels the engine allows, so that no metric carries an unbounded label. |
WorkflowObservability | class | The engine’s meter and activity source (StellaOps.Workflow): console requests and their duration, and terminal transitions. |
class WorkflowMetricCatalog
public static class WorkflowMetricCatalog
The metric names reserved for the Workflow engine. The engine emits workflow., workflow. and workflow..
Members
| Member | Kind | Summary |
|---|---|---|
Names | field | The names. |
field Names #
Names #public static readonly IReadOnlyCollection<string> Names
The names.
class WorkflowMetricLabelPolicy
public static class WorkflowMetricLabelPolicy
The metric labels the engine allows, so that no metric carries an unbounded label.
Members
| Member | Kind | Summary |
|---|---|---|
Validate( | method | Checks that every label is allowed. |
method Validate(IEnumerable<KeyValuePair<string, object>>) #
Validate(IEnumerable<KeyValuePair<string, object>>) #public static void Validate(IEnumerable<KeyValuePair<string, object?>> labels)
Checks that every label is allowed.
Parameters
labels: The labels.
Exceptions
Invalid: A label is not allowed.Operation Exception
class WorkflowObservability
public sealed class WorkflowObservability : IDisposable
The engine’s meter and activity source (StellaOps.Workflow): console requests and their duration, and terminal transitions.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowObservability( | constructor | Creates an instance of Workflow. |
ActivitySource | field | The activity source. |
InstrumentationName | constant | The meter and activity source name. |
Dispose( | method | Disposes the meter. |
ObserveConsole( | method | Counts an execution console request and times it until the result is disposed. |
RecordTerminal( | method | Counts a terminal transition of an execution. |
constructor WorkflowObservability() #
WorkflowObservability() #public WorkflowObservability()
Creates an instance of Workflow.
field ActivitySource #
ActivitySource #public static readonly ActivitySource ActivitySource
The activity source.
constant InstrumentationName #
InstrumentationName #public const string InstrumentationName = "StellaOps.Workflow"
The meter and activity source name.
method Dispose() #
Dispose() #public void Dispose()
Disposes the meter.
method ObserveConsole(string, string) #
ObserveConsole(string, string) #public IDisposable ObserveConsole(string operation, string profile)
Counts an execution console request and times it until the result is disposed.
Parameters
operation: The console operation.profile: The console profile.
Returns
Ends the timing when disposed.
method RecordTerminal(string, string) #
RecordTerminal(string, string) #public void RecordTerminal(string definition, string outcome)
Counts a terminal transition of an execution.
Parameters
definition: The workflow definition.outcome: The outcome.
namespace StellaOps.Workflow.Engine.Rendering
| Type | Kind | Description |
|---|---|---|
WorkflowRenderGraphCompiler | class | Builds the render graph of a workflow definition: its start, steps, tasks and branches as nodes, and the flow between them as edges. |
WorkflowRenderLayoutEngineResolver | class | Selects a registered layout engine by provider name, ignoring case. |
class WorkflowRenderGraphCompiler
public sealed class WorkflowRenderGraphCompiler : IWorkflowRenderGraphCompiler
Builds the render graph of a workflow definition: its start, steps, tasks and branches as nodes, and the flow between them as edges.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRenderGraphCompiler( | constructor | Creates an instance of Workflow. |
Compile( | method | Builds the render graph of a workflow definition. |
constructor WorkflowRenderGraphCompiler() #
WorkflowRenderGraphCompiler() #public WorkflowRenderGraphCompiler()
Creates an instance of Workflow.
method Compile(WorkflowRuntimeDefinition) #
Compile(WorkflowRuntimeDefinition) #public WorkflowRenderGraph Compile(WorkflowRuntimeDefinition definition)
Builds the render graph of a workflow definition.
Parameters
definition: The workflow definition.
Returns
The render graph.
class WorkflowRenderLayoutEngineResolver
public sealed class WorkflowRenderLayoutEngineResolver : IWorkflowRenderLayoutEngineResolver
Selects a registered layout engine by provider name, ignoring case.
Parameters
engines: The registered layout engines.options: The rendering options, with the default provider.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRenderLayoutEngineResolver( | constructor | Selects a registered layout engine by provider name, ignoring case. |
Resolve( | method | Returns the registered layout engine of a provider: providerName, else Workflow, else ElkSharp. |
constructor WorkflowRenderLayoutEngineResolver(IEnumerable<INamedWorkflowRenderGraphLayoutEngine>, IOptions<WorkflowRenderingOptions>) #
WorkflowRenderLayoutEngineResolver(IEnumerable<INamedWorkflowRenderGraphLayoutEngine>, IOptions<WorkflowRenderingOptions>) #public WorkflowRenderLayoutEngineResolver(IEnumerable<INamedWorkflowRenderGraphLayoutEngine> engines, IOptions<WorkflowRenderingOptions> options)
Selects a registered layout engine by provider name, ignoring case.
Parameters
engines: The registered layout engines.options: The rendering options, with the default provider.
method Resolve(string) #
Resolve(string) #public INamedWorkflowRenderGraphLayoutEngine Resolve(string? providerName = null)
Returns the registered layout engine of a provider: providerName, else Workflow, else ElkSharp.
Parameters
providerName: The provider name; the configured provider when not set.
Returns
The layout engine.
Exceptions
Invalid: No engine of that provider is registered.Operation Exception
namespace StellaOps.Workflow.Engine.Scheduling
| Type | Kind | Description |
|---|---|---|
NullWorkflowScheduleBus | class | The schedule bus of a host without scheduling: every call raises Not. |
NullWorkflowSignalScheduler | class | The signal scheduler of a host without a signal store: it logs a warning and stores nothing. |
WorkflowScheduleBusBridge | class | The schedule bus over the registered signal scheduler. |
class NullWorkflowScheduleBus
public sealed class NullWorkflowScheduleBus : IWorkflowScheduleBus
The schedule bus of a host without scheduling: every call raises Not.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowScheduleBus( | constructor | Creates an instance of Null. |
ScheduleAsync( | method | Stores a signal that becomes available at dueAtUtc. |
constructor NullWorkflowScheduleBus() #
NullWorkflowScheduleBus() #public NullWorkflowScheduleBus()
Creates an instance of Null.
method ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #
ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #public Task ScheduleAsync(WorkflowSignalEnvelope envelope, DateTime dueAtUtc, CancellationToken cancellationToken = default)
Stores a signal that becomes available at dueAtUtc.
Parameters
envelope: The signal.dueAtUtc: When the signal is due, in UTC.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
class NullWorkflowSignalScheduler
public sealed class NullWorkflowSignalScheduler : IWorkflowSignalScheduler
The signal scheduler of a host without a signal store: it logs a warning and stores nothing.
Parameters
logger: Receives the warnings.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalScheduler( | constructor | The signal scheduler of a host without a signal store: it logs a warning and stores nothing. |
ScheduleAsync( | method | Stores a signal that becomes available at dueAtUtc. |
constructor NullWorkflowSignalScheduler(ILogger<NullWorkflowSignalScheduler>) #
NullWorkflowSignalScheduler(ILogger<NullWorkflowSignalScheduler>) #public NullWorkflowSignalScheduler(ILogger<NullWorkflowSignalScheduler> logger)
The signal scheduler of a host without a signal store: it logs a warning and stores nothing.
Parameters
logger: Receives the warnings.
method ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #
ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #public Task ScheduleAsync(WorkflowSignalEnvelope envelope, DateTime dueAtUtc, CancellationToken cancellationToken = default)
Stores a signal that becomes available at dueAtUtc.
Parameters
envelope: The signal.dueAtUtc: When the signal is due, in UTC.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
class WorkflowScheduleBusBridge
public sealed class WorkflowScheduleBusBridge : IWorkflowScheduleBus
The schedule bus over the registered signal scheduler.
Parameters
signalScheduler: Stores the scheduled signals.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowScheduleBusBridge( | constructor | The schedule bus over the registered signal scheduler. |
ScheduleAsync( | method | Stores a signal that becomes available at dueAtUtc. |
constructor WorkflowScheduleBusBridge(IWorkflowSignalScheduler) #
WorkflowScheduleBusBridge(IWorkflowSignalScheduler) #public WorkflowScheduleBusBridge(IWorkflowSignalScheduler signalScheduler)
The schedule bus over the registered signal scheduler.
Parameters
signalScheduler: Stores the scheduled signals.
method ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #
ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) #public Task ScheduleAsync(WorkflowSignalEnvelope envelope, DateTime dueAtUtc, CancellationToken cancellationToken = default)
Stores a signal that becomes available at dueAtUtc.
Parameters
envelope: The signal.dueAtUtc: When the signal is due, in UTC.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
namespace StellaOps.Workflow.Engine.Services
| Type | Kind | Description |
|---|---|---|
DeclarativeWorkflowExecutionHandler< | class | Runs a declarative workflow class: starts, task completions and signal resumes. |
DefaultWorkflowAssignmentPermissionEvaluator | class | The default assignment rules: an actor in the effective roles (ignoring case) may assign a task to itself; assigning to another actor needs a permissions plugin; only the assignee may release; the assignee or an actor in the effective roles may complete. |
GenericAssignmentPermissionEvaluator | class | A permission evaluator that recognizes configured admin roles. |
GenericAssignmentPermissionOptions | class | Options for the generic assignment permission evaluator. |
InMemoryWorkflowDefinitionStore | class | In-process definition store. |
InMemoryWorkflowHostedJobLockService | class | An in-process hosted job lock, for a single-node host. |
InMemoryWorkflowRuntimeStateStore | class | Keeps runtime states in process memory, the default when no store library registers a store; instance ids compare ignoring case, and the states end with the process. |
InProcessWorkflowRuntimeOrchestrator | class | The Stella.InProcess runtime: runs the execution handler of a workflow in the calling process. |
NullWorkflowDefinitionStore | class | Unsupported definition store used only as a local/test fallback until a backend-specific store is registered. |
UnconfiguredWorkflowEndpointTransport | class | The endpoint transport used when none is configured: every call fails with an error that names the service and the route. |
UnconfiguredWorkflowGraphqlTransport | class | The GraphQL transport used when none is configured: every call fails with an error that names the target. |
UnconfiguredWorkflowHttpTransport | class | The HTTP transport used when none is configured: every call fails with an error that names the method, the target and the path. |
UnconfiguredWorkflowRabbitTransport | class | The RabbitMQ transport used when none is configured: every call fails with an error that names the exchange and the routing key. |
WorkflowBundledDefinition | struct | A workflow an assembly ships as an embedded bundled *.definition.json. |
WorkflowBundledDefinitionCoverage | record | How many of an assembly’s bundled definitions its registrations cover, and which ones they miss. |
WorkflowBundledDefinitions | class | Reads the bundled definitions a workflow assembly embeds and compares them with what the assembly registered, so a host can refuse to report ready when a workflow it ships is not registered under its name and version. |
WorkflowCanonicalDefinitionService | class | Serves the canonical definition schema and validates definitions. |
WorkflowCanonicalJsonSchema | class | The JSON schema of canonical workflow definitions. |
WorkflowConsoleOptions | class | What the execution console shows of an instance’s state, per profile (WorkflowConsole). |
WorkflowCoreServiceCollectionExtensions | class | Registers the core services of the workflow engine. |
WorkflowDefinitionCatalog | class | The definition descriptors of the registered workflows. |
WorkflowDefinitionDeploymentService | class | Handles import, export, versioning, and activation of canonical workflow definitions. |
WorkflowDefinitionQueryService | class | Queries the workflow definitions known to the engine: bundled in the catalog and imported into the store. |
WorkflowDefinitionRenderService | class | Lays out the diagram of a registered definition. |
WorkflowDiagramService | class | Lays out workflow diagrams, with the progress of an instance when the request names one. |
WorkflowDurableServiceCollectionExtensions | class | Registers the durable engine features. |
WorkflowExecutionConsoleService | class | The execution console: lists executions and reads their resources for one profile. |
WorkflowExecutionHandlerCatalog | class | Finds the execution handler of a registered workflow: its registered handler type, else a declarative handler when the workflow is declarative. |
WorkflowFunctionCatalogService | class | Serves the function catalog. |
WorkflowMutationScopeAccessor | class | Holds the change scope of the running operation. |
WorkflowRegistrationCatalog | class | The registered workflows, ordered by name and then by version, newest first; names and versions compare ignoring case. |
WorkflowRetentionHostedJobOptions | class | The schedule of the retention job (Workflow), which marks stale instances and tasks and purges expired ones. |
WorkflowRetentionOptions | class | When the retention job marks an open instance stale and purges a completed one (WorkflowRetention). |
WorkflowRetentionRunResult | record | The counts of a retention run. |
WorkflowRetentionService | class | Runs the instance retention: marks stale and purges projections and runtime states. |
WorkflowRoleResolutionService | class | Computes the roles that may work a task. |
WorkflowRuntimeService | class | The engine’s workflow runtime: starts instances, reads instances and tasks, completes, assigns and releases tasks, raises signals, cancels instances, and resumes instances with signals. |
WorkflowSignalDeadLetterService | class | Lists and replays dead-lettered signals. |
WorkflowSignalPumpTelemetryService | class | Counts the signal pump’s work in this process, for the pump statistics. |
WorkflowStudioDescriptor | class | Describes the workflow service to tools. |
WorkflowStudioOptions | class | Names the host and its diagram provider in the workflow service metadata. |
WorkflowTaskCreationNotifier | class | Singleton notification service that allows CompleteTaskAsync to block until the signal pump creates the next user task for a workflow instance. |
class DeclarativeWorkflowExecutionHandler<TWorkflow, TStartRequest>
public sealed class DeclarativeWorkflowExecutionHandler<TWorkflow, TStartRequest> : IWorkflowExecutionHandler, IWorkflowSignalResumableExecutionHandler where TWorkflow : class, IDeclarativeWorkflow<TStartRequest>, new() where TStartRequest : class
Runs a declarative workflow class: starts, task completions and signal resumes.
Type parameters
TWorkflow: The workflow class.TStartRequest: The start request type.
Parameters
endpointTransport: The endpoint transport.graphqlTransport: The GraphQL transport.httpTransport: The HTTP transport.rabbitTransport: The RabbitMQ transport.workflow: Evaluates the expression functions.Function Runtime workflow: Finds the handlers of child and parent workflows.Execution Handler Catalog workflow: The registered workflows, for child workflows.Registration Catalog
Members
| Member | Kind | Summary |
|---|---|---|
DeclarativeWorkflowExecutionHandler( | constructor | Runs a declarative workflow class: starts, task completions and signal resumes. |
CompleteTaskAsync( | method | Plans the completion of a task. |
StartAsync( | method | Plans the start of an instance. |
constructor DeclarativeWorkflowExecutionHandler(IWorkflowEndpointTransport, IWorkflowGraphqlTransport, IWorkflowHttpTransport, IWorkflowRabbitTransport, IWorkflowFunctionRuntime, IWorkflowExecutionHandlerCatalog, IWorkflowRegistrationCatalog) #
DeclarativeWorkflowExecutionHandler(IWorkflowEndpointTransport, IWorkflowGraphqlTransport, IWorkflowHttpTransport, IWorkflowRabbitTransport, IWorkflowFunctionRuntime, IWorkflowExecutionHandlerCatalog, IWorkflowRegistrationCatalog) #public DeclarativeWorkflowExecutionHandler(IWorkflowEndpointTransport endpointTransport, IWorkflowGraphqlTransport graphqlTransport, IWorkflowHttpTransport httpTransport, IWorkflowRabbitTransport rabbitTransport, IWorkflowFunctionRuntime workflowFunctionRuntime, IWorkflowExecutionHandlerCatalog workflowExecutionHandlerCatalog, IWorkflowRegistrationCatalog workflowRegistrationCatalog)
Runs a declarative workflow class: starts, task completions and signal resumes.
Type parameters
TWorkflow: The workflow class.TStartRequest: The start request type.
Parameters
endpointTransport: The endpoint transport.graphqlTransport: The GraphQL transport.httpTransport: The HTTP transport.rabbitTransport: The RabbitMQ transport.workflow: Evaluates the expression functions.Function Runtime workflow: Finds the handlers of child and parent workflows.Execution Handler Catalog workflow: The registered workflows, for child workflows.Registration Catalog
method CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) #
CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) #public Task<WorkflowTaskCompletionPlan> CompleteTaskAsync(WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)
Plans the completion of a task.
Parameters
context: The task context.cancellationToken: Cancels the operation.
Returns
The plan.
method StartAsync(WorkflowStartExecutionContext, CancellationToken) #
StartAsync(WorkflowStartExecutionContext, CancellationToken) #public Task<WorkflowStartExecutionPlan> StartAsync(WorkflowStartExecutionContext context, CancellationToken cancellationToken = default)
Plans the start of an instance.
Parameters
context: The start context.cancellationToken: Cancels the operation.
Returns
The plan.
class DefaultWorkflowAssignmentPermissionEvaluator
public sealed class DefaultWorkflowAssignmentPermissionEvaluator : IWorkflowAssignmentPermissionEvaluator
The default assignment rules: an actor in the effective roles (ignoring case) may assign a task to itself; assigning to another actor needs a permissions plugin; only the assignee may release; the assignee or an actor in the effective roles may complete.
Members
| Member | Kind | Summary |
|---|---|---|
DefaultWorkflowAssignmentPermissionEvaluator( | constructor | Creates an instance of Default. |
Evaluate( | method | Decides on an action. |
constructor DefaultWorkflowAssignmentPermissionEvaluator() #
DefaultWorkflowAssignmentPermissionEvaluator() #public DefaultWorkflowAssignmentPermissionEvaluator()
Creates an instance of Default.
method Evaluate(WorkflowAssignmentPermissionContext) #
Evaluate(WorkflowAssignmentPermissionContext) #public WorkflowAssignmentPermissionDecision Evaluate(WorkflowAssignmentPermissionContext context)
Decides on an action.
Parameters
context: The action and the task.
Returns
The decision.
class GenericAssignmentPermissionEvaluator
public sealed class GenericAssignmentPermissionEvaluator : IWorkflowAssignmentPermissionEvaluator
A permission evaluator that recognizes configured admin roles. Admin users receive full assignment permissions (AssignOther, AssignRoles, Release) in addition to standard permissions.
Members
| Member | Kind | Summary |
|---|---|---|
GenericAssignmentPermissionEvaluator( | constructor | A permission evaluator that recognizes configured admin roles. |
Evaluate( | method | Decides on an action. |
constructor GenericAssignmentPermissionEvaluator(IOptions<GenericAssignmentPermissionOptions>) #
GenericAssignmentPermissionEvaluator(IOptions<GenericAssignmentPermissionOptions>) #public GenericAssignmentPermissionEvaluator(IOptions<GenericAssignmentPermissionOptions> options)
A permission evaluator that recognizes configured admin roles. Admin users receive full assignment permissions (AssignOther, AssignRoles, Release) in addition to standard permissions.
method Evaluate(WorkflowAssignmentPermissionContext) #
Evaluate(WorkflowAssignmentPermissionContext) #public WorkflowAssignmentPermissionDecision Evaluate(WorkflowAssignmentPermissionContext context)
Decides on an action.
Parameters
context: The action and the task.
Returns
The decision.
class GenericAssignmentPermissionOptions
public sealed class GenericAssignmentPermissionOptions
Options for the generic assignment permission evaluator.
Members
| Member | Kind | Summary |
|---|---|---|
GenericAssignmentPermissionOptions( | constructor | Creates an instance of Generic. |
SectionName | constant | The configuration section the options bind from: Generic. |
AdminRoles | property | Roles that are considered admin roles for workflow task assignment. |
AssigneeCanComplete | property | When true, the current assignee may complete the task even without one of its effective roles (for example after an admin assigned it to them). |
constructor GenericAssignmentPermissionOptions() #
GenericAssignmentPermissionOptions() #public GenericAssignmentPermissionOptions()
Creates an instance of Generic.
constant SectionName #
SectionName #public const string SectionName = "GenericAssignmentPermissions"
The configuration section the options bind from: Generic.
property AdminRoles #
AdminRoles #public List<string> AdminRoles { get; set; }
Roles that are considered admin roles for workflow task assignment. Admin users can assign tasks to others, assign roles, and release tasks.
property AssigneeCanComplete #
AssigneeCanComplete #public bool AssigneeCanComplete { get; set; }
When true, the current assignee may complete the task even without one of its effective roles (for example after an admin assigned it to them). Default false.
class InMemoryWorkflowDefinitionStore
public sealed class InMemoryWorkflowDefinitionStore : IWorkflowDefinitionStore, IWorkflowDefinitionGovernanceStore
In-process definition store. Keeps imported definitions for the lifetime of the host process. Suitable for development, demonstrations and tests. For production deployments, register a durable store (PostgreSQL or MongoDB) that overrides this registration.
Members
| Member | Kind | Summary |
|---|---|---|
InMemoryWorkflowDefinitionStore( | constructor | In-process definition store. |
ActivateAsync( | method | Sets a specific version as active for a workflow name. |
ActivateGovernedAsync( | method | Activates a version under the activation fence and the rollback rule, and records the activation for the audit. |
FindByHashAsync( | method | Finds any definition record matching the given content hash, regardless of version. |
GetActiveAsync( | method | Gets the active definition for a workflow name. |
GetAllActiveAsync( | method | Gets all active definitions across all workflow names. |
GetAsync( | method | Gets a specific version of a workflow definition. |
GetVersionsAsync( | method | Gets all versions of a workflow definition, ordered by creation date descending. |
UpsertAsync( | method | Inserts or updates a definition record. |
constructor InMemoryWorkflowDefinitionStore(ILogger<InMemoryWorkflowDefinitionStore>) #
InMemoryWorkflowDefinitionStore(ILogger<InMemoryWorkflowDefinitionStore>) #public InMemoryWorkflowDefinitionStore(ILogger<InMemoryWorkflowDefinitionStore> logger)
In-process definition store. Keeps imported definitions for the lifetime of the host process. Suitable for development, demonstrations and tests. For production deployments, register a durable store (PostgreSQL or MongoDB) that overrides this registration.
method ActivateAsync(string, string, CancellationToken) #
ActivateAsync(string, string, CancellationToken) #public Task ActivateAsync(string workflowName, string version, CancellationToken cancellationToken = default)
Sets a specific version as active for a workflow name. Deactivates all other versions of the same workflow.
method ActivateGovernedAsync(WorkflowDefinitionActivationRecord, CancellationToken) #
ActivateGovernedAsync(WorkflowDefinitionActivationRecord, CancellationToken) #public Task ActivateGovernedAsync(WorkflowDefinitionActivationRecord activation, CancellationToken cancellationToken = default)
Activates a version under the activation fence and the rollback rule, and records the activation for the audit.
Parameters
activation: The activation.cancellationToken: Cancels the operation.
Returns
A task that completes when the version is active.
Exceptions
Invalid: The fence or the rollback rule refuses the activation; the message is theOperation Exception WORKFLOW_code.DEFINITION_ *
method FindByHashAsync(string, string, CancellationToken) #
FindByHashAsync(string, string, CancellationToken) #public Task<WorkflowDefinitionRecord?> FindByHashAsync(string workflowName, string contentHash, CancellationToken cancellationToken = default)
Finds any definition record matching the given content hash, regardless of version. Used to detect duplicate imports.
method GetActiveAsync(string, CancellationToken) #
GetActiveAsync(string, CancellationToken) #public Task<WorkflowDefinitionRecord?> GetActiveAsync(string workflowName, CancellationToken cancellationToken = default)
Gets the active definition for a workflow name. Returns null if no definition is stored for this workflow.
method GetAllActiveAsync(CancellationToken) #
GetAllActiveAsync(CancellationToken) #public Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetAllActiveAsync(CancellationToken cancellationToken = default)
Gets all active definitions across all workflow names.
method GetAsync(string, string, CancellationToken) #
GetAsync(string, string, CancellationToken) #public Task<WorkflowDefinitionRecord?> GetAsync(string workflowName, string version, CancellationToken cancellationToken = default)
Gets a specific version of a workflow definition.
method GetVersionsAsync(string, CancellationToken) #
GetVersionsAsync(string, CancellationToken) #public Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetVersionsAsync(string workflowName, CancellationToken cancellationToken = default)
Gets all versions of a workflow definition, ordered by creation date descending.
method UpsertAsync(WorkflowDefinitionRecord, CancellationToken) #
UpsertAsync(WorkflowDefinitionRecord, CancellationToken) #public Task UpsertAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)
Inserts or updates a definition record.
class InMemoryWorkflowHostedJobLockService
public sealed class InMemoryWorkflowHostedJobLockService : IWorkflowHostedJobLockService
An in-process hosted job lock, for a single-node host.
Members
| Member | Kind | Summary |
|---|---|---|
InMemoryWorkflowHostedJobLockService( | constructor | Creates an instance of In. |
ReleaseAsync( | method | Releases a lock the owner holds. |
TryAcquireAsync( | method | Takes a lock for an owner unless another owner holds an unexpired lease. |
constructor InMemoryWorkflowHostedJobLockService() #
InMemoryWorkflowHostedJobLockService() #public InMemoryWorkflowHostedJobLockService()
Creates an instance of In.
method ReleaseAsync(string, string, CancellationToken) #
ReleaseAsync(string, string, CancellationToken) #public Task ReleaseAsync(string lockName, string lockOwner, CancellationToken cancellationToken = default)
Releases a lock the owner holds.
Parameters
lockName: The lock.lockOwner: The owner.cancellationToken: Cancels the operation.
Returns
A task that completes when the lock is released.
method TryAcquireAsync(string, string, DateTime, TimeSpan, CancellationToken) #
TryAcquireAsync(string, string, DateTime, TimeSpan, CancellationToken) #public Task<bool> TryAcquireAsync(string lockName, string lockOwner, DateTime acquiredOnUtc, TimeSpan lease, CancellationToken cancellationToken = default)
Takes a lock for an owner unless another owner holds an unexpired lease.
Parameters
lockName: The lock.lockOwner: The owner.acquiredOnUtc: The time, in UTC.lease: How long the lock is held.cancellationToken: Cancels the operation.
Returns
Whether the owner holds the lock.
class InMemoryWorkflowRuntimeStateStore
public sealed class InMemoryWorkflowRuntimeStateStore : IWorkflowRuntimeStateStore
Keeps runtime states in process memory, the default when no store library registers a store; instance ids compare ignoring case, and the states end with the process.
Members
| Member | Kind | Summary |
|---|---|---|
InMemoryWorkflowRuntimeStateStore( | constructor | Creates an instance of In. |
DeleteAsync( | method | Deletes the runtime states of instances. |
GetAsync( | method | Reads the runtime state of an instance. |
GetManyAsync( | method | Reads the runtime states of instances. |
MarkStaleAsync( | method | Marks instances stale. |
UpsertAsync( | method | Writes a runtime state whose version is one above the stored one (or the first). |
constructor InMemoryWorkflowRuntimeStateStore() #
InMemoryWorkflowRuntimeStateStore() #public InMemoryWorkflowRuntimeStateStore()
Creates an instance of In.
method DeleteAsync(IReadOnlyCollection<string>, CancellationToken) #
DeleteAsync(IReadOnlyCollection<string>, CancellationToken) #public Task<int> DeleteAsync(IReadOnlyCollection<string> workflowInstanceIds, CancellationToken cancellationToken = default)
Deletes the runtime states of instances.
Parameters
workflowInstanceIds: The instances.cancellationToken: Cancels the operation.
Returns
The states deleted.
method GetAsync(string, CancellationToken) #
GetAsync(string, CancellationToken) #public Task<WorkflowRuntimeStateRecord?> GetAsync(string workflowInstanceId, CancellationToken cancellationToken = default)
Reads the runtime state of an instance.
Parameters
workflowInstanceId: The instance.cancellationToken: Cancels the operation.
Returns
The state, or null.
method GetManyAsync(IReadOnlyCollection<string>, CancellationToken) #
GetManyAsync(IReadOnlyCollection<string>, CancellationToken) #public Task<IReadOnlyCollection<WorkflowRuntimeStateRecord>> GetManyAsync(IReadOnlyCollection<string> workflowInstanceIds, CancellationToken cancellationToken = default)
Reads the runtime states of instances.
Parameters
workflowInstanceIds: The instances.cancellationToken: Cancels the operation.
Returns
The states found.
method MarkStaleAsync(IReadOnlyCollection<string>, DateTime, CancellationToken) #
MarkStaleAsync(IReadOnlyCollection<string>, DateTime, CancellationToken) #public Task<int> MarkStaleAsync(IReadOnlyCollection<string> workflowInstanceIds, DateTime updatedOnUtc, CancellationToken cancellationToken = default)
Marks instances stale.
Parameters
workflowInstanceIds: The instances.updatedOnUtc: The change time, in UTC.cancellationToken: Cancels the operation.
Returns
The instances marked.
method UpsertAsync(WorkflowRuntimeStateRecord, CancellationToken) #
UpsertAsync(WorkflowRuntimeStateRecord, CancellationToken) #public Task UpsertAsync(WorkflowRuntimeStateRecord state, CancellationToken cancellationToken = default)
Writes a runtime state whose version is one above the stored one (or the first).
Parameters
state: The state.cancellationToken: Cancels the operation.
Returns
A task that completes when the state is written.
Exceptions
WorkflowRuntimeStateConcurrencyException: Another write changed the instance first.
class InProcessWorkflowRuntimeOrchestrator
public sealed class InProcessWorkflowRuntimeOrchestrator : IWorkflowRuntimeProvider
The Stella.InProcess runtime: runs the execution handler of a workflow in the calling process.
Parameters
workflow: Finds the handlers.Execution Handler Catalog
Members
| Member | Kind | Summary |
|---|---|---|
InProcessWorkflowRuntimeOrchestrator( | constructor | The Stella.InProcess runtime: runs the execution handler of a workflow in the calling process. |
ProviderName | constant | The provider name: Stella.InProcess. |
CompleteAsync( | method | Completes a task. |
ResumeAsync( | method | Resumes an instance with a signal. |
StartAsync( | method | Starts an instance. |
constructor InProcessWorkflowRuntimeOrchestrator(IWorkflowExecutionHandlerCatalog) #
InProcessWorkflowRuntimeOrchestrator(IWorkflowExecutionHandlerCatalog) #public InProcessWorkflowRuntimeOrchestrator(IWorkflowExecutionHandlerCatalog workflowExecutionHandlerCatalog)
The Stella.InProcess runtime: runs the execution handler of a workflow in the calling process.
Parameters
workflow: Finds the handlers.Execution Handler Catalog
constant ProviderName #
ProviderName #public const string ProviderName = "Stella.InProcess"
The provider name: Stella.InProcess.
method CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #
CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> CompleteAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)
Completes a task.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The task context.cancellationToken: Cancels the operation.
Returns
The outcome.
method ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #
ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> ResumeAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowSignalExecutionContext context, CancellationToken cancellationToken = default)
Resumes an instance with a signal.
Parameters
registration: The workflow registration.definition: The definition descriptor.context: The signal context.cancellationToken: Cancels the operation.
Returns
The outcome.
method StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #
StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) #public Task<WorkflowRuntimeExecutionResult> StartAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowBusinessReference? businessReference, StartWorkflowRequest request, object startRequest, CancellationToken cancellationToken = default)
Starts an instance.
Parameters
registration: The workflow registration.definition: The definition descriptor.businessReference: The business reference.request: The start request.startRequest: The typed start request.cancellationToken: Cancels the operation.
Returns
The outcome.
class NullWorkflowDefinitionStore
public sealed class NullWorkflowDefinitionStore : IWorkflowDefinitionStore
Unsupported definition store used only as a local/test fallback until a backend-specific store is registered.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowDefinitionStore( | constructor | Unsupported definition store used only as a local/test fallback until a backend-specific store is registered. |
ActivateAsync( | method | Sets a specific version as active for a workflow name. |
FindByHashAsync( | method | Finds any definition record matching the given content hash, regardless of version. |
GetActiveAsync( | method | Gets the active definition for a workflow name. |
GetAllActiveAsync( | method | Gets all active definitions across all workflow names. |
GetAsync( | method | Gets a specific version of a workflow definition. |
GetVersionsAsync( | method | Gets all versions of a workflow definition, ordered by creation date descending. |
UpsertAsync( | method | Inserts or updates a definition record. |
constructor NullWorkflowDefinitionStore(ILogger<NullWorkflowDefinitionStore>) #
NullWorkflowDefinitionStore(ILogger<NullWorkflowDefinitionStore>) #public NullWorkflowDefinitionStore(ILogger<NullWorkflowDefinitionStore> logger)
Unsupported definition store used only as a local/test fallback until a backend-specific store is registered.
method ActivateAsync(string, string, CancellationToken) #
ActivateAsync(string, string, CancellationToken) #public Task ActivateAsync(string workflowName, string version, CancellationToken cancellationToken = default)
Sets a specific version as active for a workflow name. Deactivates all other versions of the same workflow.
method FindByHashAsync(string, string, CancellationToken) #
FindByHashAsync(string, string, CancellationToken) #public Task<WorkflowDefinitionRecord?> FindByHashAsync(string workflowName, string contentHash, CancellationToken cancellationToken = default)
Finds any definition record matching the given content hash, regardless of version. Used to detect duplicate imports.
method GetActiveAsync(string, CancellationToken) #
GetActiveAsync(string, CancellationToken) #public Task<WorkflowDefinitionRecord?> GetActiveAsync(string workflowName, CancellationToken cancellationToken = default)
Gets the active definition for a workflow name. Returns null if no definition is stored for this workflow.
method GetAllActiveAsync(CancellationToken) #
GetAllActiveAsync(CancellationToken) #public Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetAllActiveAsync(CancellationToken cancellationToken = default)
Gets all active definitions across all workflow names.
method GetAsync(string, string, CancellationToken) #
GetAsync(string, string, CancellationToken) #public Task<WorkflowDefinitionRecord?> GetAsync(string workflowName, string version, CancellationToken cancellationToken = default)
Gets a specific version of a workflow definition.
method GetVersionsAsync(string, CancellationToken) #
GetVersionsAsync(string, CancellationToken) #public Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetVersionsAsync(string workflowName, CancellationToken cancellationToken = default)
Gets all versions of a workflow definition, ordered by creation date descending.
method UpsertAsync(WorkflowDefinitionRecord, CancellationToken) #
UpsertAsync(WorkflowDefinitionRecord, CancellationToken) #public Task UpsertAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)
Inserts or updates a definition record.
class UnconfiguredWorkflowEndpointTransport
public sealed class UnconfiguredWorkflowEndpointTransport : IWorkflowEndpointTransport
The endpoint transport used when none is configured: every call fails with an error that names the service and the route.
Members
| Member | Kind | Summary |
|---|---|---|
UnconfiguredWorkflowEndpointTransport( | constructor | Creates an instance of Unconfigured. |
ExecuteAsync( | method | Sends the request and returns the response. |
constructor UnconfiguredWorkflowEndpointTransport() #
UnconfiguredWorkflowEndpointTransport() #public UnconfiguredWorkflowEndpointTransport()
Creates an instance of Unconfigured.
method ExecuteAsync(WorkflowEndpointRequest, CancellationToken) #
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 UnconfiguredWorkflowGraphqlTransport
public sealed class UnconfiguredWorkflowGraphqlTransport : IWorkflowGraphqlTransport
The GraphQL transport used when none is configured: every call fails with an error that names the target.
Members
| Member | Kind | Summary |
|---|---|---|
UnconfiguredWorkflowGraphqlTransport( | constructor | Creates an instance of Unconfigured. |
ExecuteAsync( | method | Sends the query and returns the response. |
constructor UnconfiguredWorkflowGraphqlTransport() #
UnconfiguredWorkflowGraphqlTransport() #public UnconfiguredWorkflowGraphqlTransport()
Creates an instance of Unconfigured.
method ExecuteAsync(WorkflowGraphqlRequest, CancellationToken) #
ExecuteAsync(WorkflowGraphqlRequest, CancellationToken) #public Task<WorkflowGraphqlResponse> ExecuteAsync(WorkflowGraphqlRequest request, CancellationToken cancellationToken = default)
Sends the query and returns the response. A failure, such as a non-success status or an errors array in the response, is a response that did not succeed; a call that does not answer in time raises a TimeoutException.
Parameters
request: The GraphQL request.cancellationToken: Cancels the operation.
Returns
The response.
class UnconfiguredWorkflowHttpTransport
public sealed class UnconfiguredWorkflowHttpTransport : IWorkflowHttpTransport
The HTTP transport used when none is configured: every call fails with an error that names the method, the target and the path.
Members
| Member | Kind | Summary |
|---|---|---|
UnconfiguredWorkflowHttpTransport( | constructor | Creates an instance of Unconfigured. |
ExecuteAsync( | method | Sends the request and returns the response. |
constructor UnconfiguredWorkflowHttpTransport() #
UnconfiguredWorkflowHttpTransport() #public UnconfiguredWorkflowHttpTransport()
Creates an instance of Unconfigured.
method ExecuteAsync(WorkflowHttpRequest, CancellationToken) #
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 UnconfiguredWorkflowRabbitTransport
public sealed class UnconfiguredWorkflowRabbitTransport : IWorkflowRabbitTransport
The RabbitMQ transport used when none is configured: every call fails with an error that names the exchange and the routing key.
Members
| Member | Kind | Summary |
|---|---|---|
UnconfiguredWorkflowRabbitTransport( | constructor | Creates an instance of Unconfigured. |
ExecuteAsync( | method | Publishes the request, and for a command that expects a reply, waits for the correlated reply. |
constructor UnconfiguredWorkflowRabbitTransport() #
UnconfiguredWorkflowRabbitTransport() #public UnconfiguredWorkflowRabbitTransport()
Creates an instance of Unconfigured.
method ExecuteAsync(WorkflowRabbitRequest, CancellationToken) #
ExecuteAsync(WorkflowRabbitRequest, CancellationToken) #public Task<WorkflowRabbitResponse> ExecuteAsync(WorkflowRabbitRequest request, CancellationToken cancellationToken = default)
Publishes the request, and for a command that expects a reply, waits for the correlated reply. A failure is a response that did not succeed; a reply that does not arrive in time raises a TimeoutException.
Parameters
request: The RabbitMQ request.cancellationToken: Cancels the operation.
Returns
The response.
struct WorkflowBundledDefinition
public readonly struct WorkflowBundledDefinition : IEquatable<WorkflowBundledDefinition>
A workflow an assembly ships as an embedded bundled *.definition.json.
Parameters
WorkflowName: The workflow name.WorkflowVersion: The workflow version.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowBundledDefinition( | constructor | A workflow an assembly ships as an embedded bundled *.definition.json. |
WorkflowName | property | The workflow name. |
WorkflowVersion | property | The workflow version. |
ToString( | method | Returns the name and the version, separated by a space. |
constructor WorkflowBundledDefinition(string, string) #
WorkflowBundledDefinition(string, string) #public WorkflowBundledDefinition(string WorkflowName, string WorkflowVersion)
A workflow an assembly ships as an embedded bundled *.definition.json.
Parameters
WorkflowName: The workflow name.WorkflowVersion: The workflow version.
property WorkflowName #
WorkflowName #public string WorkflowName { get; init; }
The workflow name.
property WorkflowVersion #
WorkflowVersion #public string WorkflowVersion { get; init; }
The workflow version.
method ToString() #
ToString() #public override string ToString()
Returns the name and the version, separated by a space.
Returns
The text.
record WorkflowBundledDefinitionCoverage
public sealed record WorkflowBundledDefinitionCoverage
How many of an assembly’s bundled definitions its registrations cover, and which ones they miss.
Parameters
AssemblyName: The assembly.Bundled: The bundled definitions.RegisteredCount: The registrations of the assembly.Missing: The bundled definitions no registration covers.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowBundledDefinitionCoverage( | constructor | How many of an assembly’s bundled definitions its registrations cover, and which ones they miss. |
AssemblyName | property | The assembly. |
Bundled | property | The bundled definitions. |
Missing | property | The bundled definitions no registration covers. |
RegisteredCount | property | The registrations of the assembly. |
constructor WorkflowBundledDefinitionCoverage(string, IReadOnlyCollection<WorkflowBundledDefinition>, int, IReadOnlyCollection<WorkflowBundledDefinition>) #
WorkflowBundledDefinitionCoverage(string, IReadOnlyCollection<WorkflowBundledDefinition>, int, IReadOnlyCollection<WorkflowBundledDefinition>) #public WorkflowBundledDefinitionCoverage(string AssemblyName, IReadOnlyCollection<WorkflowBundledDefinition> Bundled, int RegisteredCount, IReadOnlyCollection<WorkflowBundledDefinition> Missing)
How many of an assembly’s bundled definitions its registrations cover, and which ones they miss.
Parameters
AssemblyName: The assembly.Bundled: The bundled definitions.RegisteredCount: The registrations of the assembly.Missing: The bundled definitions no registration covers.
property AssemblyName #
AssemblyName #public string AssemblyName { get; init; }
The assembly.
property Bundled #
Bundled #public IReadOnlyCollection<WorkflowBundledDefinition> Bundled { get; init; }
The bundled definitions.
property Missing #
Missing #public IReadOnlyCollection<WorkflowBundledDefinition> Missing { get; init; }
The bundled definitions no registration covers.
property RegisteredCount #
RegisteredCount #public int RegisteredCount { get; init; }
The registrations of the assembly.
class WorkflowBundledDefinitions
public static class WorkflowBundledDefinitions
Reads the bundled definitions a workflow assembly embeds and compares them with what the assembly registered, so a host can refuse to report ready when a workflow it ships is not registered under its name and version.
Members
| Member | Kind | Summary |
|---|---|---|
ResourceMarker | constant | Part of the manifest resource name of an embedded bundled definition: a workflow assembly embeds each *.definition.json as $(. |
Compare( | method | Compares the bundled definitions of assembly with the registrations its types made. |
Read( | method | The bundled definitions assembly embeds (name and version of each). |
constant ResourceMarker #
ResourceMarker #public const string ResourceMarker = ".WorkflowDefinitions."
Part of the manifest resource name of an embedded bundled definition: a workflow assembly embeds each *.definition.json as $(.
method Compare(Assembly, IEnumerable<WorkflowRegistration>) #
Compare(Assembly, IEnumerable<WorkflowRegistration>) #public static WorkflowBundledDefinitionCoverage Compare(Assembly assembly, IEnumerable<WorkflowRegistration> registrations)
Compares the bundled definitions of assembly with the registrations its types made.
method Read(Assembly) #
Read(Assembly) #public static IReadOnlyCollection<WorkflowBundledDefinition> Read(Assembly assembly)
The bundled definitions assembly embeds (name and version of each).
class WorkflowCanonicalDefinitionService
public sealed class WorkflowCanonicalDefinitionService
Serves the canonical definition schema and validates definitions.
Parameters
workflow: The installed modules.Module Catalog workflow: The function catalog.Function Catalog external: The external activity registry.Activity Registry
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowCanonicalDefinitionService( | constructor | Serves the canonical definition schema and validates definitions. |
GetSchema( | method | Returns the JSON schema of canonical definitions. |
Validate( | method | Validates a canonical definition without importing it. |
constructor WorkflowCanonicalDefinitionService(IWorkflowModuleCatalog, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) #
WorkflowCanonicalDefinitionService(IWorkflowModuleCatalog, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) #public WorkflowCanonicalDefinitionService(IWorkflowModuleCatalog workflowModuleCatalog, IWorkflowFunctionCatalog workflowFunctionCatalog, IWorkflowExternalActivityRegistry externalActivityRegistry)
Serves the canonical definition schema and validates definitions.
Parameters
workflow: The installed modules.Module Catalog workflow: The function catalog.Function Catalog external: The external activity registry.Activity Registry
method GetSchema() #
GetSchema() #public WorkflowCanonicalSchemaGetResponse GetSchema()
Returns the JSON schema of canonical definitions.
Returns
The schema.
method Validate(WorkflowCanonicalValidateRequest) #
Validate(WorkflowCanonicalValidateRequest) #public WorkflowCanonicalValidateResponse Validate(WorkflowCanonicalValidateRequest request)
Validates a canonical definition without importing it.
Parameters
request: The request.
Returns
The findings.
class WorkflowCanonicalJsonSchema
public static class WorkflowCanonicalJsonSchema
The JSON schema of canonical workflow definitions.
Members
| Member | Kind | Summary |
|---|---|---|
DefinitionSchema | property | The schema. |
GetSchemaJson( | method | Returns the schema as JSON. |
ValidateJson( | method | Validates JSON against the schema. |
property DefinitionSchema #
DefinitionSchema #public static JsonSchema DefinitionSchema { get; }
The schema.
method GetSchemaJson() #
GetSchemaJson() #public static string GetSchemaJson()
Returns the schema as JSON.
Returns
The schema JSON.
method ValidateJson(string) #
ValidateJson(string) #public static IReadOnlyCollection<WorkflowCanonicalValidationError> ValidateJson(string json)
Validates JSON against the schema.
Parameters
json: The JSON.
Returns
The findings.
class WorkflowConsoleOptions
public sealed class WorkflowConsoleOptions
What the execution console shows of an instance’s state, per profile (WorkflowConsole).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowConsoleOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowConsole. |
SafeStateKeys | property | Top-level state keys the SAFE profile shows; everything else is hidden. |
TechnicalRedactedFragments | property | Name fragments the TECHNICAL profile removes from the top-level state. |
constructor WorkflowConsoleOptions() #
WorkflowConsoleOptions() #public WorkflowConsoleOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowConsole"
The configuration section the options bind from: WorkflowConsole.
property SafeStateKeys #
SafeStateKeys #public List<string> SafeStateKeys { get; set; }
Top-level state keys the SAFE profile shows; everything else is hidden.
property TechnicalRedactedFragments #
TechnicalRedactedFragments #public List<string> TechnicalRedactedFragments { get; set; }
Name fragments the TECHNICAL profile removes from the top-level state.
class WorkflowCoreServiceCollectionExtensions
public static class WorkflowCoreServiceCollectionExtensions
Registers the core services of the workflow engine. Platform integrations, such as the data context, plugin loading, authentication, health checks and rendering layout engines, are registered separately.
Members
| Member | Kind | Summary |
|---|---|---|
AddWorkflowEngineCoreServices( | extension method | Registers the core services of the workflow engine: the backend, signal driver and runtime options; the module and function catalogs; the registration and definition catalogs; the execution handlers, the runtime providers and their orchestrator; signal processing and the signal pump; the definition deployment and query services; the licence services; the source format converters; and the render graph compiler. |
AddWorkflowEngineHostedServices( | extension method | Registers the hosted services for signal pump and retention background processing, and the component licence monitor with its informational licence health entry. |
ConfigureWorkflowRuntimeProviderDefault( | extension method | Makes providerName the default runtime provider unless Workflow is configured. |
extension method AddWorkflowEngineCoreServices(IServiceCollection, IConfiguration) #
AddWorkflowEngineCoreServices(IServiceCollection, IConfiguration) #public static IServiceCollection AddWorkflowEngineCoreServices(this IServiceCollection services, IConfiguration configuration)
Registers the core services of the workflow engine: the backend, signal driver and runtime options; the module and function catalogs; the registration and definition catalogs; the execution handlers, the runtime providers and their orchestrator; signal processing and the signal pump; the definition deployment and query services; the licence services; the source format converters; and the render graph compiler. A runtime state store, a hosted job lock, the signal stores and the transports are registered only when none is, as in-memory, empty or unconfigured defaults.
Remarks
It does not register a projection store, a mutation coordinator or a projection retention store (the selected backend does), plugin loading, authentication, health checks or rendering layout engines; the host or another extension method registers them.
extension method AddWorkflowEngineHostedServices(IServiceCollection) #
AddWorkflowEngineHostedServices(IServiceCollection) #public static IServiceCollection AddWorkflowEngineHostedServices(this IServiceCollection services)
Registers the hosted services for signal pump and retention background processing, and the component licence monitor with its informational licence health entry. Call this only when running as the workflow engine service host.
extension method ConfigureWorkflowRuntimeProviderDefault(IServiceCollection, IConfiguration, string) #
ConfigureWorkflowRuntimeProviderDefault(IServiceCollection, IConfiguration, string) #public static IServiceCollection ConfigureWorkflowRuntimeProviderDefault(this IServiceCollection services, IConfiguration configuration, string providerName)
Makes providerName the default runtime provider unless Workflow is configured. The latest call wins, so a host calls it after WorkflowCoreServiceCollectionExtensions.to replace the engine’s default.
class WorkflowDefinitionCatalog
public sealed class WorkflowDefinitionCatalog : IWorkflowDefinitionCatalog
The definition descriptors of the registered workflows.
Parameters
workflow: The registered workflows.Registration Catalog
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDefinitionCatalog( | constructor | The definition descriptors of the registered workflows. |
GetDefinition( | method | Finds a descriptor. |
GetDefinitions( | method | Returns every descriptor. |
constructor WorkflowDefinitionCatalog(IWorkflowRegistrationCatalog) #
WorkflowDefinitionCatalog(IWorkflowRegistrationCatalog) #public WorkflowDefinitionCatalog(IWorkflowRegistrationCatalog workflowRegistrationCatalog)
The definition descriptors of the registered workflows.
Parameters
workflow: The registered workflows.Registration Catalog
method GetDefinition(string, string) #
GetDefinition(string, string) #public WorkflowDefinitionDescriptor? GetDefinition(string workflowName, string? workflowVersion = null)
Finds a descriptor.
Parameters
workflowName: The workflow name.workflowVersion: The version; the latest when not set.
Returns
The descriptor, or null.
method GetDefinitions() #
GetDefinitions() #public IReadOnlyCollection<WorkflowDefinitionDescriptor> GetDefinitions()
Returns every descriptor.
Returns
The descriptors.
class WorkflowDefinitionDeploymentService
public sealed class WorkflowDefinitionDeploymentService
Handles import, export, versioning, and activation of canonical workflow definitions.
Members
constructor WorkflowDefinitionDeploymentService(IWorkflowDefinitionStore, IWorkflowRuntimeDefinitionStore, IWorkflowRenderGraphCompiler, IWorkflowRenderLayoutEngineResolver, IWorkflowSourceFormatRegistry, WorkflowCanonicalDefinitionService, IWorkflowFirstSeenLedger, TimeProvider, ILogger<WorkflowDefinitionDeploymentService>, WorkflowLicenceState, IWorkflowRenderSvgRenderer) #
WorkflowDefinitionDeploymentService(IWorkflowDefinitionStore, IWorkflowRuntimeDefinitionStore, IWorkflowRenderGraphCompiler, IWorkflowRenderLayoutEngineResolver, IWorkflowSourceFormatRegistry, WorkflowCanonicalDefinitionService, IWorkflowFirstSeenLedger, TimeProvider, ILogger<WorkflowDefinitionDeploymentService>, WorkflowLicenceState, IWorkflowRenderSvgRenderer) #public WorkflowDefinitionDeploymentService(IWorkflowDefinitionStore definitionStore, IWorkflowRuntimeDefinitionStore runtimeDefinitionStore, IWorkflowRenderGraphCompiler renderGraphCompiler, IWorkflowRenderLayoutEngineResolver renderLayoutEngineResolver, IWorkflowSourceFormatRegistry sourceFormatRegistry, WorkflowCanonicalDefinitionService canonicalDefinitionService, IWorkflowFirstSeenLedger firstSeenLedger, TimeProvider timeProvider, ILogger<WorkflowDefinitionDeploymentService> logger, WorkflowLicenceState? licenceState = null, IWorkflowRenderSvgRenderer? svgRenderer = null)
Handles import, export, versioning, and activation of canonical workflow definitions.
method ActivateAsync(WorkflowDefinitionActivateRequest, CancellationToken) #
ActivateAsync(WorkflowDefinitionActivateRequest, CancellationToken) #public Task<WorkflowDefinitionActivateResponse> ActivateAsync(WorkflowDefinitionActivateRequest request, CancellationToken cancellationToken = default)
Activates a specific version of a workflow definition.
method CreateImportRequestAsync(string, string, string, CancellationToken) #
CreateImportRequestAsync(string, string, string, CancellationToken) #public Task<WorkflowDefinitionImportRequest?> CreateImportRequestAsync(string workflowName, string? version, string importedBy, CancellationToken cancellationToken = default)
Exports a definition (with its rendering) as the import request another engine accepts; null when the definition or version does not exist. The caller chooses the transport that delivers it.
method ExportAsync(WorkflowDefinitionExportRequest, CancellationToken) #
ExportAsync(WorkflowDefinitionExportRequest, CancellationToken) #public Task<WorkflowDefinitionExportResponse> ExportAsync(WorkflowDefinitionExportRequest request, CancellationToken cancellationToken = default)
Exports a stored definition.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The definition.
method ExportMultiAsync(WorkflowDefinitionExportMultiRequest, CancellationToken) #
ExportMultiAsync(WorkflowDefinitionExportMultiRequest, CancellationToken) #public Task<WorkflowDefinitionExportMultiResponse> ExportMultiAsync(WorkflowDefinitionExportMultiRequest request, CancellationToken cancellationToken = default)
Exports a definition in a source format.
Parameters
request: The definition and format.cancellationToken: Cancels the operation.
Returns
The content.
method GetDefinitionByIdAsync(WorkflowDefinitionByIdRequest, CancellationToken) #
GetDefinitionByIdAsync(WorkflowDefinitionByIdRequest, CancellationToken) #public Task<WorkflowDefinitionByIdResponse> GetDefinitionByIdAsync(WorkflowDefinitionByIdRequest request, CancellationToken cancellationToken = default)
Gets a single definition by name (and optional version) with optional rendering assets. Precedence matches the engine: runtime store (code-registered) first, persistent store (imported) fallback.
method GetRenderGraphAsync(WorkflowRenderGraphGetRequest, CancellationToken) #
GetRenderGraphAsync(WorkflowRenderGraphGetRequest, CancellationToken) #public Task<WorkflowRenderGraphGetResponse> GetRenderGraphAsync(WorkflowRenderGraphGetRequest request, CancellationToken cancellationToken = default)
Returns the typed render graph (nodes + edges) for a workflow, compiled from its canonical AST. Runtime store first, persistent store fallback (reconstructs a stub runtime definition).
method GetSupportedFormats() #
GetSupportedFormats() #public WorkflowSupportedFormatsGetResponse GetSupportedFormats()
Returns the source formats the server converts.
Returns
The formats.
method GetVersionsAsync(WorkflowDefinitionVersionsGetRequest, CancellationToken) #
GetVersionsAsync(WorkflowDefinitionVersionsGetRequest, CancellationToken) #public Task<WorkflowDefinitionVersionsGetResponse> GetVersionsAsync(WorkflowDefinitionVersionsGetRequest request, CancellationToken cancellationToken = default)
Lists all versions of a workflow definition.
method ImportAsync(WorkflowDefinitionImportRequest, CancellationToken) #
ImportAsync(WorkflowDefinitionImportRequest, CancellationToken) #public Task<WorkflowDefinitionImportResponse> ImportAsync(WorkflowDefinitionImportRequest request, CancellationToken cancellationToken = default)
Imports an immutable canonical definition. Import and activation are deliberately separate. A stored workflow is then recorded in the first-seen ledger (the technical count of recorded workflow names). Nothing is refused for licence reasons: an import that fails before it is stored records nothing, and a ledger failure never fails the import.
method ImportMultiAsync(WorkflowDefinitionImportMultiRequest, CancellationToken) #
ImportMultiAsync(WorkflowDefinitionImportMultiRequest, CancellationToken) #public Task<WorkflowDefinitionImportMultiResponse> ImportMultiAsync(WorkflowDefinitionImportMultiRequest request, CancellationToken cancellationToken = default)
Converts content of a source format to a canonical definition and imports it.
Parameters
request: The format and content.cancellationToken: Cancels the operation.
Returns
The outcome.
method RenderAsync(WorkflowRenderingRequest, CancellationToken) #
RenderAsync(WorkflowRenderingRequest, CancellationToken) #public Task<WorkflowRenderingResponse> RenderAsync(WorkflowRenderingRequest request, CancellationToken cancellationToken = default)
Renders a workflow definition in the requested format (SVG, PNG, or JSON render graph).
class WorkflowDefinitionQueryService
public sealed class WorkflowDefinitionQueryService
Queries the workflow definitions known to the engine: bundled in the catalog and imported into the store.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDefinitionQueryService( | constructor | Queries the workflow definitions known to the engine: bundled in the catalog and imported into the store. |
QueryAsync( | method | Lists definitions from the catalog (bundled) and the store (imported); the catalog wins on a duplicate (name, version). |
constructor WorkflowDefinitionQueryService(IWorkflowDefinitionCatalog, IWorkflowDefinitionStore) #
WorkflowDefinitionQueryService(IWorkflowDefinitionCatalog, IWorkflowDefinitionStore) #public WorkflowDefinitionQueryService(IWorkflowDefinitionCatalog workflowDefinitionCatalog, IWorkflowDefinitionStore workflowDefinitionStore)
Queries the workflow definitions known to the engine: bundled in the catalog and imported into the store.
method QueryAsync(WorkflowDefinitionGetRequest) #
QueryAsync(WorkflowDefinitionGetRequest) #public Task<WorkflowDefinitionGetResponse> QueryAsync(WorkflowDefinitionGetRequest request)
Lists definitions from the catalog (bundled) and the store (imported); the catalog wins on a duplicate (name, version). Without a version or names filter each name keeps only its latest version.
class WorkflowDefinitionRenderService
public sealed class WorkflowDefinitionRenderService
Lays out the diagram of a registered definition.
Parameters
runtime: The runtime definitions.Definition Store renderGraphCompiler: Builds the render graphs.render: Selects the layout engines.Layout Engine Resolver
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDefinitionRenderService( | constructor | Lays out the diagram of a registered definition. |
RenderDefinitionAsync( | method | Lays out a definition. |
constructor WorkflowDefinitionRenderService(IWorkflowRuntimeDefinitionStore, IWorkflowRenderGraphCompiler, IWorkflowRenderLayoutEngineResolver) #
WorkflowDefinitionRenderService(IWorkflowRuntimeDefinitionStore, IWorkflowRenderGraphCompiler, IWorkflowRenderLayoutEngineResolver) #public WorkflowDefinitionRenderService(IWorkflowRuntimeDefinitionStore runtimeDefinitionStore, IWorkflowRenderGraphCompiler renderGraphCompiler, IWorkflowRenderLayoutEngineResolver renderLayoutEngineResolver)
Lays out the diagram of a registered definition.
Parameters
runtime: The runtime definitions.Definition Store renderGraphCompiler: Builds the render graphs.render: Selects the layout engines.Layout Engine Resolver
method RenderDefinitionAsync(string, string, string, WorkflowRenderLayoutRequest, CancellationToken) #
RenderDefinitionAsync(string, string, string, WorkflowRenderLayoutRequest, CancellationToken) #public Task<(string ProviderName, WorkflowRenderLayoutResult Layout)> RenderDefinitionAsync(string workflowName, string? workflowVersion = null, string? layoutProvider = null, WorkflowRenderLayoutRequest? layoutRequest = null, CancellationToken cancellationToken = default)
Lays out a definition.
Parameters
workflowName: The workflow name.workflowVersion: The version; the latest when not set.layoutProvider: The layout provider; the configured one when not set.layoutRequest: The layout settings; the defaults when not set.cancellationToken: Cancels the operation.
Returns
The provider used and the layout.
class WorkflowDiagramService
public sealed class WorkflowDiagramService
Lays out workflow diagrams, with the progress of an instance when the request names one.
Parameters
workflow: The definitions.Definition Catalog workflow: Reads instances and tasks.Runtime Service definition: Lays out the definitions.Render Service
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowDiagramService( | constructor | Lays out workflow diagrams, with the progress of an instance when the request names one. |
GetDiagramAsync( | method | Lays out a diagram. |
constructor WorkflowDiagramService(IWorkflowDefinitionCatalog, WorkflowRuntimeService, WorkflowDefinitionRenderService) #
WorkflowDiagramService(IWorkflowDefinitionCatalog, WorkflowRuntimeService, WorkflowDefinitionRenderService) #public WorkflowDiagramService(IWorkflowDefinitionCatalog workflowDefinitionCatalog, WorkflowRuntimeService workflowRuntimeService, WorkflowDefinitionRenderService definitionRenderService)
Lays out workflow diagrams, with the progress of an instance when the request names one.
Parameters
workflow: The definitions.Definition Catalog workflow: Reads instances and tasks.Runtime Service definition: Lays out the definitions.Render Service
method GetDiagramAsync(WorkflowDiagramGetRequest, CancellationToken) #
GetDiagramAsync(WorkflowDiagramGetRequest, CancellationToken) #public Task<WorkflowDiagramGetResponse> GetDiagramAsync(WorkflowDiagramGetRequest request, CancellationToken cancellationToken = default)
Lays out a diagram.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The diagram.
class WorkflowDurableServiceCollectionExtensions
public static class WorkflowDurableServiceCollectionExtensions
Registers the durable engine features.
Members
| Member | Kind | Summary |
|---|---|---|
AddWorkflowEngineDurableServices( | extension method | Registers the durable engine features on top of WorkflowCoreServiceCollectionExtensions.: durable start and root continuation, registered signals, external activities, maps, child executions, history, observability, the execution console and the Studio descriptor. |
ValidateWorkflowProviderRegistrations( | extension method | Fails fast when the configured backend (Workflow) or signal driver (Workflow) was not registered by any store or driver library. |
extension method AddWorkflowEngineDurableServices(IServiceCollection, IConfiguration) #
AddWorkflowEngineDurableServices(IServiceCollection, IConfiguration) #public static IServiceCollection AddWorkflowEngineDurableServices(this IServiceCollection services, IConfiguration configuration)
Registers the durable engine features on top of WorkflowCoreServiceCollectionExtensions.: durable start and root continuation, registered signals, external activities, maps, child executions, history, observability, the execution console and the Studio descriptor. Every store these services use comes from a store library (PostgreSQL or MongoDB).
extension method ValidateWorkflowProviderRegistrations(IServiceCollection, IConfiguration) #
ValidateWorkflowProviderRegistrations(IServiceCollection, IConfiguration) #public static IServiceCollection ValidateWorkflowProviderRegistrations(this IServiceCollection services, IConfiguration configuration)
Fails fast when the configured backend (Workflow) or signal driver (Workflow) was not registered by any store or driver library. Call it after every store and driver registration (manual, plug-in routine or host loader).
class WorkflowExecutionConsoleService
public sealed class WorkflowExecutionConsoleService
The execution console: lists executions and reads their resources for one profile.
Parameters
readStore: Reads the console rows.historyService: Reads the history events.observability: Counts and times the console requests, when given.consoleOptions: The profile settings; the defaults when not set.
Members
constructor WorkflowExecutionConsoleService(IWorkflowExecutionConsoleReadStore, WorkflowHistoryService, WorkflowObservability, IOptions<WorkflowConsoleOptions>) #
WorkflowExecutionConsoleService(IWorkflowExecutionConsoleReadStore, WorkflowHistoryService, WorkflowObservability, IOptions<WorkflowConsoleOptions>) #public WorkflowExecutionConsoleService(IWorkflowExecutionConsoleReadStore readStore, WorkflowHistoryService historyService, WorkflowObservability? observability = null, IOptions<WorkflowConsoleOptions>? consoleOptions = null)
The execution console: lists executions and reads their resources for one profile.
Parameters
readStore: Reads the console rows.historyService: Reads the history events.observability: Counts and times the console requests, when given.consoleOptions: The profile settings; the defaults when not set.
method GetAttemptsAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetAttemptsAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetAttemptsAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the step attempts of an execution.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetDeliveryChronologyAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetDeliveryChronologyAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetDeliveryChronologyAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the activity dispatches and completions of an execution, in time order.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetExecutionAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetExecutionAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetExecutionAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads an execution: its identity, status and history position.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetGraphAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetGraphAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetGraphAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the scopes and steps of an execution as a graph.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetMapItemsAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetMapItemsAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetMapItemsAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the map items of an execution.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetMapsAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetMapsAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetMapsAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the map executions of an execution.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetScopesAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetScopesAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetScopesAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the scopes of an execution.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetSnapshotAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetSnapshotAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetSnapshotAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the state of an execution, filtered by the profile.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetStepsAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetStepsAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetStepsAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads the external activity steps of an execution.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method GetTimelineAsync(WorkflowExecutionResourceRequest, CancellationToken) #
GetTimelineAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> GetTimelineAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Reads a page of the history events after a sequence.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
method ListAsync(WorkflowExecutionListRequest, CancellationToken) #
ListAsync(WorkflowExecutionListRequest, CancellationToken) #public Task<WorkflowExecutionListResponse> ListAsync(WorkflowExecutionListRequest request, CancellationToken cancellationToken = default)
Lists executions, newest first, a page at a time.
Parameters
request: The cursor, page size and profile.cancellationToken: Cancels the operation.
Returns
A page of executions.
Exceptions
ArgumentException: The profile is notSAFEorTECHNICAL.
method RenderSvgAsync(WorkflowExecutionResourceRequest, CancellationToken) #
RenderSvgAsync(WorkflowExecutionResourceRequest, CancellationToken) #public Task<WorkflowExecutionResourceResponse> RenderSvgAsync(WorkflowExecutionResourceRequest request, CancellationToken cancellationToken = default)
Draws the execution graph as SVG.
Parameters
request: The execution, profile and limits.cancellationToken: Cancels the operation.
Returns
The resource; not found when the execution does not exist.
class WorkflowExecutionHandlerCatalog
public sealed class WorkflowExecutionHandlerCatalog : IWorkflowExecutionHandlerCatalog
Finds the execution handler of a registered workflow: its registered handler type, else a declarative handler when the workflow is declarative.
Parameters
serviceProvider: Resolves the handlers.workflow: The registered workflows.Registration Catalog
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowExecutionHandlerCatalog( | constructor | Finds the execution handler of a registered workflow: its registered handler type, else a declarative handler when the workflow is declarative. |
GetHandler( | method | Finds the handler of a workflow version. |
constructor WorkflowExecutionHandlerCatalog(IServiceProvider, IWorkflowRegistrationCatalog) #
WorkflowExecutionHandlerCatalog(IServiceProvider, IWorkflowRegistrationCatalog) #public WorkflowExecutionHandlerCatalog(IServiceProvider serviceProvider, IWorkflowRegistrationCatalog workflowRegistrationCatalog)
Finds the execution handler of a registered workflow: its registered handler type, else a declarative handler when the workflow is declarative.
Parameters
serviceProvider: Resolves the handlers.workflow: The registered workflows.Registration Catalog
method GetHandler(string, string) #
GetHandler(string, string) #public IWorkflowExecutionHandler? GetHandler(string workflowName, string workflowVersion)
Finds the handler of a workflow version.
Parameters
workflowName: The workflow name.workflowVersion: The version.
Returns
The handler, or null.
class WorkflowFunctionCatalogService
public sealed class WorkflowFunctionCatalogService
Serves the function catalog.
Parameters
workflow: The functions.Function Catalog workflow: The installed modules.Module Catalog
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowFunctionCatalogService( | constructor | Serves the function catalog. |
GetCatalog( | method | Returns the functions and installed modules. |
constructor WorkflowFunctionCatalogService(IWorkflowFunctionCatalog, IWorkflowModuleCatalog) #
WorkflowFunctionCatalogService(IWorkflowFunctionCatalog, IWorkflowModuleCatalog) #public WorkflowFunctionCatalogService(IWorkflowFunctionCatalog workflowFunctionCatalog, IWorkflowModuleCatalog workflowModuleCatalog)
Serves the function catalog.
Parameters
workflow: The functions.Function Catalog workflow: The installed modules.Module Catalog
method GetCatalog() #
GetCatalog() #public WorkflowFunctionCatalogGetResponse GetCatalog()
Returns the functions and installed modules.
Returns
The catalog.
class WorkflowMutationScopeAccessor
public sealed class WorkflowMutationScopeAccessor : IWorkflowMutationScopeAccessor
Holds the change scope of the running operation.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowMutationScopeAccessor( | constructor | Creates an instance of Workflow. |
Current | property | The change scope of the running operation, when one is open. |
constructor WorkflowMutationScopeAccessor() #
WorkflowMutationScopeAccessor() #public WorkflowMutationScopeAccessor()
Creates an instance of Workflow.
property Current #
Current #public IWorkflowMutationScope? Current { get; set; }
The change scope of the running operation, when one is open.
class WorkflowRegistrationCatalog
public sealed class WorkflowRegistrationCatalog : IWorkflowRegistrationCatalog
The registered workflows, ordered by name and then by version, newest first; names and versions compare ignoring case.
Parameters
registrations: The registrations.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRegistrationCatalog( | constructor | The registered workflows, ordered by name and then by version, newest first; names and versions compare ignoring case. |
GetRegistration( | method | Finds a registered workflow. |
GetRegistrations( | method | Returns every registered workflow. |
constructor WorkflowRegistrationCatalog(IEnumerable<WorkflowRegistration>) #
WorkflowRegistrationCatalog(IEnumerable<WorkflowRegistration>) #public WorkflowRegistrationCatalog(IEnumerable<WorkflowRegistration> registrations)
The registered workflows, ordered by name and then by version, newest first; names and versions compare ignoring case.
Parameters
registrations: The registrations.
method GetRegistration(string, string) #
GetRegistration(string, string) #public WorkflowRegistration? GetRegistration(string workflowName, string? workflowVersion = null)
Finds a registered workflow.
Parameters
workflowName: The workflow name.workflowVersion: The version; the latest when not set.
Returns
The registration, or null.
method GetRegistrations() #
GetRegistrations() #public IReadOnlyCollection<WorkflowRegistration> GetRegistrations()
Returns every registered workflow.
Returns
The registrations.
class WorkflowRetentionHostedJobOptions
public sealed class WorkflowRetentionHostedJobOptions
The schedule of the retention job (Workflow), which marks stale instances and tasks and purges expired ones. A lease lock lets one host at a time run it.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRetentionHostedJobOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: Workflow. |
Enabled | property | Whether the retention job runs. |
InitialDelay | property | The wait before the first run when the job does not run at startup. |
Interval | property | The time between runs. |
LockLease | property | How long a host holds the lock for one run. |
LockName | property | The name of the lock that lets one host at a time run the job. |
RunOnStartup | property | Whether the job runs once when the host starts, without the initial delay. |
constructor WorkflowRetentionHostedJobOptions() #
WorkflowRetentionHostedJobOptions() #public WorkflowRetentionHostedJobOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowRetentionHostedJob"
The configuration section the options bind from: Workflow.
property Enabled #
Enabled #public bool Enabled { get; set; }
Whether the retention job runs. The default is true.
property InitialDelay #
InitialDelay #public TimeSpan InitialDelay { get; set; }
The wait before the first run when the job does not run at startup. The default is 5 minutes.
property Interval #
Interval #public TimeSpan Interval { get; set; }
The time between runs. The default is 24 hours.
property LockLease #
LockLease #public TimeSpan LockLease { get; set; }
How long a host holds the lock for one run. The default is 2 hours.
property LockName #
LockName #public string LockName { get; set; }
The name of the lock that lets one host at a time run the job. The default is workflow.retention.
property RunOnStartup #
RunOnStartup #public bool RunOnStartup { get; set; }
Whether the job runs once when the host starts, without the initial delay. The default is false.
class WorkflowRetentionOptions
public sealed class WorkflowRetentionOptions
When the retention job marks an open instance stale and purges a completed one (WorkflowRetention).
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRetentionOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowRetention. |
CompletedPurgeAfterDays | property | The number of days after completion after which the retention job purges an instance. |
OpenStaleAfterDays | property | The number of days after which the retention job marks an open instance and its tasks stale. |
constructor WorkflowRetentionOptions() #
WorkflowRetentionOptions() #public WorkflowRetentionOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowRetention"
The configuration section the options bind from: WorkflowRetention.
property CompletedPurgeAfterDays #
CompletedPurgeAfterDays #public int CompletedPurgeAfterDays { get; set; }
The number of days after completion after which the retention job purges an instance. The default is 180.
property OpenStaleAfterDays #
OpenStaleAfterDays #public int OpenStaleAfterDays { get; set; }
The number of days after which the retention job marks an open instance and its tasks stale. The default is 30.
record WorkflowRetentionRunResult
public sealed record WorkflowRetentionRunResult
The counts of a retention run.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRetentionRunResult( | constructor | Creates an instance of Workflow. |
PurgedInstances | property | Instance projections purged. |
PurgedRuntimeStates | property | Runtime states deleted. |
PurgedTaskEvents | property | Task events purged. |
PurgedTasks | property | Task projections purged. |
StaleInstancesMarked | property | Instances marked stale: the larger of the projection count and the runtime state count. |
StaleTasksMarked | property | Task projections marked stale. |
constructor WorkflowRetentionRunResult() #
WorkflowRetentionRunResult() #public WorkflowRetentionRunResult()
Creates an instance of Workflow.
property PurgedInstances #
PurgedInstances #public required int PurgedInstances { get; init; }
Instance projections purged.
property PurgedRuntimeStates #
PurgedRuntimeStates #public required int PurgedRuntimeStates { get; init; }
Runtime states deleted.
property PurgedTaskEvents #
PurgedTaskEvents #public required int PurgedTaskEvents { get; init; }
Task events purged.
property PurgedTasks #
PurgedTasks #public required int PurgedTasks { get; init; }
Task projections purged.
property StaleInstancesMarked #
StaleInstancesMarked #public required int StaleInstancesMarked { get; init; }
Instances marked stale: the larger of the projection count and the runtime state count.
property StaleTasksMarked #
StaleTasksMarked #public required int StaleTasksMarked { get; init; }
Task projections marked stale.
class WorkflowRetentionService
public sealed class WorkflowRetentionService
Runs the instance retention: marks stale and purges projections and runtime states.
Parameters
projection: Applies retention to the projections.Retention Store workflow: The runtime states.Runtime State Store
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRetentionService( | constructor | Runs the instance retention: marks stale and purges projections and runtime states. |
RunAsync( | method | Runs retention once. |
RunAsync( | method | Runs retention for an operator request: ReferenceUtc (default now) and optional day thresholds that override the configured ones for this run. |
constructor WorkflowRetentionService(IWorkflowProjectionRetentionStore, IWorkflowRuntimeStateStore) #
WorkflowRetentionService(IWorkflowProjectionRetentionStore, IWorkflowRuntimeStateStore) #public WorkflowRetentionService(IWorkflowProjectionRetentionStore projectionRetentionStore, IWorkflowRuntimeStateStore workflowRuntimeStateStore)
Runs the instance retention: marks stale and purges projections and runtime states.
Parameters
projection: Applies retention to the projections.Retention Store workflow: The runtime states.Runtime State Store
method RunAsync(DateTime?, WorkflowRetentionOverride, CancellationToken) #
RunAsync(DateTime?, WorkflowRetentionOverride, CancellationToken) #public Task<WorkflowRetentionRunResult> RunAsync(DateTime? nowUtc = null, WorkflowRetentionOverride? retentionOverride = null, CancellationToken cancellationToken = default)
Runs retention once.
Parameters
nowUtc: The reference time, in UTC; now when not set.retentionOverride: Age thresholds that replace the configured ones for this run.cancellationToken: Cancels the operation.
Returns
The counts.
method RunAsync(WorkflowRetentionRunRequest, CancellationToken) #
RunAsync(WorkflowRetentionRunRequest, CancellationToken) #public Task<WorkflowRetentionRunResponse> RunAsync(WorkflowRetentionRunRequest request, CancellationToken cancellationToken = default)
Runs retention for an operator request: ReferenceUtc (default now) and optional day thresholds that override the configured ones for this run.
class WorkflowRoleResolutionService
public sealed class WorkflowRoleResolutionService
Computes the roles that may work a task.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRoleResolutionService( | constructor | Creates an instance of Workflow. |
NormalizeRoles( | method | Drops empty roles and duplicates, ignoring case. |
ResolveEffectiveRoles( | method | The runtime roles when there are any, else the task roles, else the workflow roles; normalized. |
constructor WorkflowRoleResolutionService() #
WorkflowRoleResolutionService() #public WorkflowRoleResolutionService()
Creates an instance of Workflow.
method NormalizeRoles(IReadOnlyCollection<string>) #
NormalizeRoles(IReadOnlyCollection<string>) #public IReadOnlyCollection<string> NormalizeRoles(IReadOnlyCollection<string> roles)
Drops empty roles and duplicates, ignoring case.
Parameters
roles: The roles.
Returns
The roles.
method ResolveEffectiveRoles(IReadOnlyCollection<string>, IReadOnlyCollection<string>, IReadOnlyCollection<string>) #
ResolveEffectiveRoles(IReadOnlyCollection<string>, IReadOnlyCollection<string>, IReadOnlyCollection<string>) #public IReadOnlyCollection<string> ResolveEffectiveRoles(IReadOnlyCollection<string> workflowRoles, IReadOnlyCollection<string> taskRoles, IReadOnlyCollection<string>? runtimeRoles = null)
The runtime roles when there are any, else the task roles, else the workflow roles; normalized.
Parameters
workflowRoles: The workflow roles.taskRoles: The task roles.runtimeRoles: The roles computed at runtime.
Returns
The effective roles.
class WorkflowRuntimeService
public sealed class WorkflowRuntimeService
The engine’s workflow runtime: starts instances, reads instances and tasks, completes, assigns and releases tasks, raises signals, cancels instances, and resumes instances with signals.
Members
constructor WorkflowRuntimeService(IWorkflowRegistrationCatalog, IWorkflowDefinitionCatalog, IWorkflowRuntimeOrchestrator, IWorkflowMutationCoordinator, IWorkflowProjectionStore, WorkflowTaskAuthorizationService, IWorkflowRuntimeStateStore, IWorkflowStateJsonPolicy, IWorkflowSignalBus, IWorkflowScheduleBus, IEnumerable<IWorkflowPendingSignalDispatcher>, WorkflowTaskCreationNotifier, IWorkflowActorRoleResolver, WorkflowExecutionActorContext, IWorkflowCallerIdentityAccessor, IWorkflowCancellationCleanupPolicy, IOptions<WorkflowRetentionOptions>, IOptions<WorkflowEngineOptions>, ILogger<WorkflowRuntimeService>, WorkflowObservability) #
WorkflowRuntimeService(IWorkflowRegistrationCatalog, IWorkflowDefinitionCatalog, IWorkflowRuntimeOrchestrator, IWorkflowMutationCoordinator, IWorkflowProjectionStore, WorkflowTaskAuthorizationService, IWorkflowRuntimeStateStore, IWorkflowStateJsonPolicy, IWorkflowSignalBus, IWorkflowScheduleBus, IEnumerable<IWorkflowPendingSignalDispatcher>, WorkflowTaskCreationNotifier, IWorkflowActorRoleResolver, WorkflowExecutionActorContext, IWorkflowCallerIdentityAccessor, IWorkflowCancellationCleanupPolicy, IOptions<WorkflowRetentionOptions>, IOptions<WorkflowEngineOptions>, ILogger<WorkflowRuntimeService>, WorkflowObservability) #public WorkflowRuntimeService(IWorkflowRegistrationCatalog workflowRegistrationCatalog, IWorkflowDefinitionCatalog workflowDefinitionCatalog, IWorkflowRuntimeOrchestrator workflowRuntimeOrchestrator, IWorkflowMutationCoordinator workflowMutationCoordinator, IWorkflowProjectionStore workflowProjectionStore, WorkflowTaskAuthorizationService workflowTaskAuthorizationService, IWorkflowRuntimeStateStore workflowRuntimeStateStore, IWorkflowStateJsonPolicy stateJsonPolicy, IWorkflowSignalBus workflowSignalBus, IWorkflowScheduleBus workflowScheduleBus, IEnumerable<IWorkflowPendingSignalDispatcher> pendingSignalDispatchers, WorkflowTaskCreationNotifier taskCreationNotifier, IWorkflowActorRoleResolver actorContextResolver, WorkflowExecutionActorContext executionActorContext, IWorkflowCallerIdentityAccessor callerIdentity, IWorkflowCancellationCleanupPolicy cancellationCleanupPolicy, IOptions<WorkflowRetentionOptions> retentionOptions, IOptions<WorkflowEngineOptions> engineOptions, ILogger<WorkflowRuntimeService> logger, WorkflowObservability observability)
The engine’s workflow runtime: starts instances, reads instances and tasks, completes, assigns and releases tasks, raises signals, cancels instances, and resumes instances with signals.
method AssignTaskAsync(WorkflowTaskAssignRequest, CancellationToken) #
AssignTaskAsync(WorkflowTaskAssignRequest, CancellationToken) #public Task<WorkflowTaskAssignResponse> AssignTaskAsync(WorkflowTaskAssignRequest request, CancellationToken cancellationToken = default)
Assigns a human task to a user or to roles.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The assigned task.
method CancelWorkflowAsync(WorkflowCancelRequest, CancellationToken) #
CancelWorkflowAsync(WorkflowCancelRequest, CancellationToken) #public Task<WorkflowCancelResponse> CancelWorkflowAsync(WorkflowCancelRequest request, CancellationToken cancellationToken = default)
Cancels an instance by queuing its cancel signal, and starts the cleanup workflow when the request names one.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
Whether the cancel signal was queued, and the cleanup instance.
method CompleteTaskAsync(WorkflowTaskCompleteRequest, CancellationToken) #
CompleteTaskAsync(WorkflowTaskCompleteRequest, CancellationToken) #public Task<WorkflowTaskCompleteResponse> CompleteTaskAsync(WorkflowTaskCompleteRequest request, CancellationToken cancellationToken = default)
Completes a human task with a payload; the task’s completion steps run.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The outcome of the completion.
method ContinueDurableStartAsync(StartWorkflowExecutionV1, long, CancellationToken) #
ContinueDurableStartAsync(StartWorkflowExecutionV1, long, CancellationToken) #public Task<bool> ContinueDurableStartAsync(StartWorkflowExecutionV1 durableRequest, long expectedExecutionVersion, CancellationToken cancellationToken = default)
Runs the start of a durable root whose start decision committed.
Parameters
durableRequest: The durable start request.expected: The execution version the root was created at.Execution Version cancellationToken: Cancels the operation.
Returns
true when the start ran; false when the execution already moved past that version.
Exceptions
WorkflowStartNotReadyException: The durable root does not exist yet.
method GetInstanceAsync(WorkflowInstanceGetRequest, CancellationToken) #
GetInstanceAsync(WorkflowInstanceGetRequest, CancellationToken) #public Task<WorkflowInstanceGetResponse> GetInstanceAsync(WorkflowInstanceGetRequest request, CancellationToken cancellationToken = default)
Reads one workflow instance.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The instance.
method GetInstancesAsync(WorkflowInstancesGetRequest, CancellationToken) #
GetInstancesAsync(WorkflowInstancesGetRequest, CancellationToken) #public Task<WorkflowInstancesGetResponse> GetInstancesAsync(WorkflowInstancesGetRequest request, CancellationToken cancellationToken = default)
Lists workflow instances.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
A page of instances.
method GetTaskAsync(WorkflowTaskGetRequest, CancellationToken) #
GetTaskAsync(WorkflowTaskGetRequest, CancellationToken) #public Task<WorkflowTaskGetResponse> GetTaskAsync(WorkflowTaskGetRequest request, CancellationToken cancellationToken = default)
Reads one human task.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The task.
method GetTasksAsync(WorkflowTasksGetRequest, CancellationToken) #
GetTasksAsync(WorkflowTasksGetRequest, CancellationToken) #public Task<WorkflowTasksGetResponse> GetTasksAsync(WorkflowTasksGetRequest request, CancellationToken cancellationToken = default)
Lists human tasks.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
A page of tasks.
method RaiseExternalSignalAsync(WorkflowSignalRaiseRequest, CancellationToken) #
RaiseExternalSignalAsync(WorkflowSignalRaiseRequest, CancellationToken) #public Task<WorkflowSignalRaiseResponse> RaiseExternalSignalAsync(WorkflowSignalRaiseRequest request, CancellationToken cancellationToken = default)
Queues a signal for an instance that waits for it.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The queued signal.
method ReleaseTaskAsync(WorkflowTaskReleaseRequest, CancellationToken) #
ReleaseTaskAsync(WorkflowTaskReleaseRequest, CancellationToken) #public Task<WorkflowTaskReleaseResponse> ReleaseTaskAsync(WorkflowTaskReleaseRequest request, CancellationToken cancellationToken = default)
Releases an assigned human task, so another user can take it.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The released task.
method ResumeSignalAsync(WorkflowSignalEnvelope, CancellationToken) #
ResumeSignalAsync(WorkflowSignalEnvelope, CancellationToken) #public Task ResumeSignalAsync(WorkflowSignalEnvelope signal, CancellationToken cancellationToken = default)
Applies a signal to its instance; see WorkflowRuntimeService..
Parameters
signal: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is handled.
method StartWorkflowAsync(StartWorkflowRequest, CancellationToken) #
StartWorkflowAsync(StartWorkflowRequest, CancellationToken) #public Task<StartWorkflowResponse> StartWorkflowAsync(StartWorkflowRequest request, CancellationToken cancellationToken = default)
Starts a workflow instance.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The new instance.
method TryResumeSignalAsync(WorkflowSignalEnvelope, CancellationToken) #
TryResumeSignalAsync(WorkflowSignalEnvelope, CancellationToken) #public Task<bool> TryResumeSignalAsync(WorkflowSignalEnvelope signal, CancellationToken cancellationToken = default)
Applies a signal to its instance. A signal that loses the version check is applied again on the reloaded instance, up to five times; a duplicate or stale signal is ignored.
Parameters
signal: The signal.cancellationToken: Cancels the operation.
Returns
Whether the signal was applied.
Exceptions
WorkflowRuntimeStateConcurrencyException: The conflicts outlasted the attempts; the transport redelivers the signal.
class WorkflowSignalDeadLetterService
public sealed class WorkflowSignalDeadLetterService
Lists and replays dead-lettered signals.
Parameters
deadLetterStore: The dead letter store.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalDeadLetterService( | constructor | Lists and replays dead-lettered signals. |
GetMessagesAsync( | method | Lists the dead letters. |
ReplayAsync( | method | Puts a dead letter back on the signal queue. |
constructor WorkflowSignalDeadLetterService(IWorkflowSignalDeadLetterStore) #
WorkflowSignalDeadLetterService(IWorkflowSignalDeadLetterStore) #public WorkflowSignalDeadLetterService(IWorkflowSignalDeadLetterStore deadLetterStore)
Lists and replays dead-lettered signals.
Parameters
deadLetterStore: The dead letter store.
method GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) #
GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) #public Task<WorkflowSignalDeadLettersGetResponse> GetMessagesAsync(WorkflowSignalDeadLettersGetRequest request, CancellationToken cancellationToken = default)
Lists the dead letters.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
A page of dead letters.
method ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) #
ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) #public Task<WorkflowSignalDeadLetterReplayResponse> ReplayAsync(WorkflowSignalDeadLetterReplayRequest request, CancellationToken cancellationToken = default)
Puts a dead letter back on the signal queue.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The outcome.
class WorkflowSignalPumpTelemetryService
public sealed class WorkflowSignalPumpTelemetryService
Counts the signal pump’s work in this process, for the pump statistics.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalPumpTelemetryService( | constructor | Creates an instance of Workflow. |
GetStats( | method | Returns the counts so far. |
RecordConcurrencySkip( | method | Counts a delivery put back because the instance kept changing. |
RecordDeadLetter( | method | Counts a dead-lettered signal. |
RecordEmptyPoll( | method | Counts a poll that found no signal. |
RecordFailure( | method | Counts a failed delivery. |
RecordProcessed( | method | Counts a processed signal. |
constructor WorkflowSignalPumpTelemetryService() #
WorkflowSignalPumpTelemetryService() #public WorkflowSignalPumpTelemetryService()
Creates an instance of Workflow.
method GetStats() #
GetStats() #public WorkflowSignalPumpStatsGetResponse GetStats()
Returns the counts so far.
Returns
The statistics.
method RecordConcurrencySkip(string, WorkflowSignalEnvelope, int, TimeSpan) #
RecordConcurrencySkip(string, WorkflowSignalEnvelope, int, TimeSpan) #public void RecordConcurrencySkip(string consumerName, WorkflowSignalEnvelope envelope, int deliveryCount, TimeSpan duration)
Counts a delivery put back because the instance kept changing.
Parameters
consumerName: The consumer.envelope: The signal.deliveryCount: The delivery attempt.duration: How long it took.
method RecordDeadLetter(string, WorkflowSignalEnvelope, int, TimeSpan, string) #
RecordDeadLetter(string, WorkflowSignalEnvelope, int, TimeSpan, string) #public void RecordDeadLetter(string consumerName, WorkflowSignalEnvelope envelope, int deliveryCount, TimeSpan duration, string? message)
Counts a dead-lettered signal.
Parameters
consumerName: The consumer.envelope: The signal.deliveryCount: The delivery attempt.duration: How long it took.message: The error message.
method RecordEmptyPoll(string) #
RecordEmptyPoll(string) #public void RecordEmptyPoll(string consumerName)
Counts a poll that found no signal.
Parameters
consumerName: The consumer.
method RecordFailure(string, WorkflowSignalEnvelope, int, TimeSpan, Exception) #
RecordFailure(string, WorkflowSignalEnvelope, int, TimeSpan, Exception) #public void RecordFailure(string consumerName, WorkflowSignalEnvelope envelope, int deliveryCount, TimeSpan duration, Exception exception)
Counts a failed delivery.
Parameters
consumerName: The consumer.envelope: The signal.deliveryCount: The delivery attempt.duration: How long it took.exception: The failure.
method RecordProcessed(string, WorkflowSignalEnvelope, int, TimeSpan) #
RecordProcessed(string, WorkflowSignalEnvelope, int, TimeSpan) #public void RecordProcessed(string consumerName, WorkflowSignalEnvelope envelope, int deliveryCount, TimeSpan duration)
Counts a processed signal.
Parameters
consumerName: The consumer.envelope: The signal.deliveryCount: The delivery attempt.duration: How long it took.
class WorkflowStudioDescriptor
public sealed class WorkflowStudioDescriptor
Describes the workflow service to tools.
Parameters
options: The studio options.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStudioDescriptor( | constructor | Describes the workflow service to tools. |
GetMetadata( | method | Returns the service metadata. |
constructor WorkflowStudioDescriptor(IOptions<WorkflowStudioOptions>) #
WorkflowStudioDescriptor(IOptions<WorkflowStudioOptions>) #public WorkflowStudioDescriptor(IOptions<WorkflowStudioOptions> options)
Describes the workflow service to tools.
Parameters
options: The studio options.
method GetMetadata() #
GetMetadata() #public WorkflowServiceMetadata GetMetadata()
Returns the service metadata.
Returns
The metadata.
class WorkflowStudioOptions
public sealed class WorkflowStudioOptions
Names the host and its diagram provider in the workflow service metadata.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowStudioOptions( | constructor | Creates an instance of Workflow. |
SectionName | constant | The configuration section the options bind from: WorkflowStudio. |
DiagramProvider | property | The diagram provider name the workflow service metadata reports. |
ServiceName | property | The service name the workflow service metadata reports. |
constructor WorkflowStudioOptions() #
WorkflowStudioOptions() #public WorkflowStudioOptions()
Creates an instance of Workflow.
constant SectionName #
SectionName #public const string SectionName = "WorkflowStudio"
The configuration section the options bind from: WorkflowStudio.
property DiagramProvider #
DiagramProvider #public string DiagramProvider { get; set; }
The diagram provider name the workflow service metadata reports. The default is StellaOps Engine.
property ServiceName #
ServiceName #public string ServiceName { get; set; }
The service name the workflow service metadata reports. The default is StellaOps.Workflow.
class WorkflowTaskCreationNotifier
public sealed class WorkflowTaskCreationNotifier
Singleton notification service that allows CompleteTaskAsync to block until the signal pump creates the next user task for a workflow instance.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowTaskCreationNotifier( | constructor | Creates an instance of Workflow. |
NotifyTaskCreated( | method | Called by the projection store when a new task is created for a workflow instance. |
WaitForTaskAsync( | method | Register a waiter for a workflow instance. |
constructor WorkflowTaskCreationNotifier() #
WorkflowTaskCreationNotifier() #public WorkflowTaskCreationNotifier()
Creates an instance of Workflow.
method NotifyTaskCreated(string) #
NotifyTaskCreated(string) #public void NotifyTaskCreated(string workflowInstanceId)
Called by the projection store when a new task is created for a workflow instance. Unblocks any waiting CompleteTaskAsync call.
method WaitForTaskAsync(string, TimeSpan, CancellationToken) #
WaitForTaskAsync(string, TimeSpan, CancellationToken) #public Task<bool> WaitForTaskAsync(string workflowInstanceId, TimeSpan timeout, CancellationToken cancellationToken)
Register a waiter for a workflow instance. Returns a task that completes when NotifyTaskCreated is called for this instance, or when the timeout expires.
namespace StellaOps.Workflow.Engine.Services.Converters
| Type | Kind | Description |
|---|---|---|
CanonicalBundleSourceConverter | class | Canonical workflow definition plus its rendering assets, packed as a single ZIP archive. |
CanonicalJsonSourceConverter | class | Pass-through converter for the engine’s native canonical JSON format. |
CanonicalYamlSourceConverter | class | Round-trips canonical workflow definitions through YAML. |
WorkflowSourceFormatRegistry | class | The registry of the source format converters. |
class CanonicalBundleSourceConverter
public sealed class CanonicalBundleSourceConverter : IWorkflowSourceFormatConverter
Canonical workflow definition plus its rendering assets, packed as a single ZIP archive. Layout:
manifest.json # { "schema": "stellaops.bundle/v1", "workflowName", "workflowVersion", "createdOnUtc" }
canonical.json # the canonical definition JSON
renderings/elksharp.svg # optional
renderings/elksharp.png # optional
renderings/elksharp.render.json # optional
Members
| Member | Kind | Summary |
|---|---|---|
CanonicalBundleSourceConverter( | constructor | Creates an instance of Canonical. |
ContentType | property | MIME type of the content this converter produces / consumes. |
DisplayName | property | Human-friendly name, for example for a format picker. |
FileExtension | property | Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”). |
FormatId | property | Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”). |
IsBinary | property | True when the format is not safely paste-able as text (e.g., binary ZIP). |
SupportsExport | property | True when the converter supports encoding a stored definition into its format. |
SupportsImport | property | True when the converter supports decoding its format into canonical JSON. |
ExportAsync( | method | Converts a stored definition to the format. |
ImportAsync( | method | Converts content of the format to a canonical definition. |
constructor CanonicalBundleSourceConverter() #
CanonicalBundleSourceConverter() #public CanonicalBundleSourceConverter()
Creates an instance of Canonical.
property ContentType #
ContentType #public string ContentType { get; }
MIME type of the content this converter produces / consumes.
property DisplayName #
DisplayName #public string DisplayName { get; }
Human-friendly name, for example for a format picker.
property FileExtension #
FileExtension #public string FileExtension { get; }
Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”).
property FormatId #
FormatId #public string FormatId { get; }
Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”).
property IsBinary #
IsBinary #public bool IsBinary { get; }
True when the format is not safely paste-able as text (e.g., binary ZIP). UI uses this to disable the textarea mode and force file upload.
property SupportsExport #
SupportsExport #public bool SupportsExport { get; }
True when the converter supports encoding a stored definition into its format.
property SupportsImport #
SupportsImport #public bool SupportsImport { get; }
True when the converter supports decoding its format into canonical JSON.
method ExportAsync(WorkflowDefinitionRecord, CancellationToken) #
ExportAsync(WorkflowDefinitionRecord, CancellationToken) #public Task<WorkflowSourceExportResult> ExportAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)
Converts a stored definition to the format.
Parameters
record: The stored definition.cancellationToken: Cancels the operation.
Returns
The content, its media type and a file name.
method ImportAsync(byte[], CancellationToken) #
ImportAsync(byte[], CancellationToken) #public Task<WorkflowSourceImportResult> ImportAsync(byte[] content, CancellationToken cancellationToken = default)
Converts content of the format to a canonical definition.
Parameters
content: The content.cancellationToken: Cancels the operation.
Returns
The canonical definition, or the diagnostics of a failed conversion.
class CanonicalJsonSourceConverter
public sealed class CanonicalJsonSourceConverter : IWorkflowSourceFormatConverter
Pass-through converter for the engine’s native canonical JSON format. Import does a light UTF-8 decode + structural probe; export emits the stored Canonical verbatim.
Members
| Member | Kind | Summary |
|---|---|---|
CanonicalJsonSourceConverter( | constructor | Creates an instance of Canonical. |
ContentType | property | MIME type of the content this converter produces / consumes. |
DisplayName | property | Human-friendly name, for example for a format picker. |
FileExtension | property | Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”). |
FormatId | property | Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”). |
IsBinary | property | True when the format is not safely paste-able as text (e.g., binary ZIP). |
SupportsExport | property | True when the converter supports encoding a stored definition into its format. |
SupportsImport | property | True when the converter supports decoding its format into canonical JSON. |
ExportAsync( | method | Converts a stored definition to the format. |
ImportAsync( | method | Converts content of the format to a canonical definition. |
constructor CanonicalJsonSourceConverter() #
CanonicalJsonSourceConverter() #public CanonicalJsonSourceConverter()
Creates an instance of Canonical.
property ContentType #
ContentType #public string ContentType { get; }
MIME type of the content this converter produces / consumes.
property DisplayName #
DisplayName #public string DisplayName { get; }
Human-friendly name, for example for a format picker.
property FileExtension #
FileExtension #public string FileExtension { get; }
Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”).
property FormatId #
FormatId #public string FormatId { get; }
Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”).
property IsBinary #
IsBinary #public bool IsBinary { get; }
True when the format is not safely paste-able as text (e.g., binary ZIP). UI uses this to disable the textarea mode and force file upload.
property SupportsExport #
SupportsExport #public bool SupportsExport { get; }
True when the converter supports encoding a stored definition into its format.
property SupportsImport #
SupportsImport #public bool SupportsImport { get; }
True when the converter supports decoding its format into canonical JSON.
method ExportAsync(WorkflowDefinitionRecord, CancellationToken) #
ExportAsync(WorkflowDefinitionRecord, CancellationToken) #public Task<WorkflowSourceExportResult> ExportAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)
Converts a stored definition to the format.
Parameters
record: The stored definition.cancellationToken: Cancels the operation.
Returns
The content, its media type and a file name.
method ImportAsync(byte[], CancellationToken) #
ImportAsync(byte[], CancellationToken) #public Task<WorkflowSourceImportResult> ImportAsync(byte[] content, CancellationToken cancellationToken = default)
Converts content of the format to a canonical definition.
Parameters
content: The content.cancellationToken: Cancels the operation.
Returns
The canonical definition, or the diagnostics of a failed conversion.
class CanonicalYamlSourceConverter
public sealed class CanonicalYamlSourceConverter : IWorkflowSourceFormatConverter
Round-trips canonical workflow definitions through YAML. YAML offers a friendlier authoring experience for the same schema; the engine’s validator is JSON-based, so the converter always converts YAML to JSON before the core import pipeline receives it.
Members
| Member | Kind | Summary |
|---|---|---|
CanonicalYamlSourceConverter( | constructor | Creates an instance of Canonical. |
ContentType | property | MIME type of the content this converter produces / consumes. |
DisplayName | property | Human-friendly name, for example for a format picker. |
FileExtension | property | Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”). |
FormatId | property | Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”). |
IsBinary | property | True when the format is not safely paste-able as text (e.g., binary ZIP). |
SupportsExport | property | True when the converter supports encoding a stored definition into its format. |
SupportsImport | property | True when the converter supports decoding its format into canonical JSON. |
ExportAsync( | method | Converts a stored definition to the format. |
ImportAsync( | method | Converts content of the format to a canonical definition. |
constructor CanonicalYamlSourceConverter() #
CanonicalYamlSourceConverter() #public CanonicalYamlSourceConverter()
Creates an instance of Canonical.
property ContentType #
ContentType #public string ContentType { get; }
MIME type of the content this converter produces / consumes.
property DisplayName #
DisplayName #public string DisplayName { get; }
Human-friendly name, for example for a format picker.
property FileExtension #
FileExtension #public string FileExtension { get; }
Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”).
property FormatId #
FormatId #public string FormatId { get; }
Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”).
property IsBinary #
IsBinary #public bool IsBinary { get; }
True when the format is not safely paste-able as text (e.g., binary ZIP). UI uses this to disable the textarea mode and force file upload.
property SupportsExport #
SupportsExport #public bool SupportsExport { get; }
True when the converter supports encoding a stored definition into its format.
property SupportsImport #
SupportsImport #public bool SupportsImport { get; }
True when the converter supports decoding its format into canonical JSON.
method ExportAsync(WorkflowDefinitionRecord, CancellationToken) #
ExportAsync(WorkflowDefinitionRecord, CancellationToken) #public Task<WorkflowSourceExportResult> ExportAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)
Converts a stored definition to the format.
Parameters
record: The stored definition.cancellationToken: Cancels the operation.
Returns
The content, its media type and a file name.
method ImportAsync(byte[], CancellationToken) #
ImportAsync(byte[], CancellationToken) #public Task<WorkflowSourceImportResult> ImportAsync(byte[] content, CancellationToken cancellationToken = default)
Converts content of the format to a canonical definition.
Parameters
content: The content.cancellationToken: Cancels the operation.
Returns
The canonical definition, or the diagnostics of a failed conversion.
class WorkflowSourceFormatRegistry
public sealed class WorkflowSourceFormatRegistry : IWorkflowSourceFormatRegistry
The registry of the source format converters.
Parameters
converters: The registered converters.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSourceFormatRegistry( | constructor | The registry of the source format converters. |
GetAll( | method | Returns the converters, ordered by display name. |
GetRequired( | method | Finds a converter by format id, ignoring case. |
TryGet( | method | Finds a converter by format id, ignoring case. |
constructor WorkflowSourceFormatRegistry(IEnumerable<IWorkflowSourceFormatConverter>) #
WorkflowSourceFormatRegistry(IEnumerable<IWorkflowSourceFormatConverter>) #public WorkflowSourceFormatRegistry(IEnumerable<IWorkflowSourceFormatConverter> converters)
The registry of the source format converters.
Parameters
converters: The registered converters.
method GetAll() #
GetAll() #public IReadOnlyCollection<IWorkflowSourceFormatConverter> GetAll()
Returns the converters, ordered by display name.
Returns
The converters.
method GetRequired(string) #
GetRequired(string) #public IWorkflowSourceFormatConverter GetRequired(string formatId)
Finds a converter by format id, ignoring case.
Parameters
formatId: The format id.
Returns
The converter.
Exceptions
Invalid: No converter has the format id.Operation Exception
method TryGet(string) #
TryGet(string) #public IWorkflowSourceFormatConverter? TryGet(string formatId)
Finds a converter by format id, ignoring case.
Parameters
formatId: The format id.
Returns
The converter, or null.
namespace StellaOps.Workflow.Engine.Signaling
| Type | Kind | Description |
|---|---|---|
IWorkflowSignalCommandDispatcher | interface | Runs the start and resume commands that arrive as signals. |
NullWorkflowSignalBus | class | The signal bus of a host without signaling: every call raises Not. |
NullWorkflowSignalClaimStore | class | A claim store that never has a signal to claim. |
NullWorkflowSignalDeadLetterStore | class | The dead letter store used when the backend registers none: every call raises Not. |
NullWorkflowSignalDriver | class | The signal driver None: it sends no wake and has no signal to receive. |
NullWorkflowSignalStore | class | The signal store of a host without one: it logs a warning and stores nothing. |
NullWorkflowWakeOutbox | class | A wake outbox that stores nothing. |
NullWorkflowWakeOutboxReceiver | class | A wake outbox receiver that never has a notification. |
WorkflowSignalBusBridge | class | The signal bus over the signal store and driver: it stores a signal, then wakes the consumers as the driver’s dispatch mode says, and receives through the driver. |
WorkflowSignalCommandDispatcher | class | Runs signal commands through the workflow runtime service. |
WorkflowSignalEnvelopeSerializer | class | Serializes signal envelopes as JSON with the web defaults (camel-case names); payload keys compare ignoring case. |
WorkflowSignalProcessor | class | Applies the engine’s signals: a timer, retry, external signal or child completion resumes its instance, and an internal continue starts the next workflow; another type raises Not. |
interface IWorkflowSignalCommandDispatcher
public interface IWorkflowSignalCommandDispatcher
Runs the start and resume commands that arrive as signals.
Members
| Member | Kind | Summary |
|---|---|---|
DispatchResumeWorkflowAsync( | method | Applies a signal to its instance. |
DispatchStartWorkflowAsync( | method | Starts a workflow. |
method DispatchResumeWorkflowAsync(WorkflowSignalEnvelope, CancellationToken) #
DispatchResumeWorkflowAsync(WorkflowSignalEnvelope, CancellationToken) #Task DispatchResumeWorkflowAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Applies a signal to its instance.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is handled.
method DispatchStartWorkflowAsync(StartWorkflowRequest, CancellationToken) #
DispatchStartWorkflowAsync(StartWorkflowRequest, CancellationToken) #Task DispatchStartWorkflowAsync(StartWorkflowRequest request, CancellationToken cancellationToken = default)
Starts a workflow.
Parameters
request: The start request.cancellationToken: Cancels the operation.
Returns
A task that completes when the start has run.
class NullWorkflowSignalBus
public sealed class NullWorkflowSignalBus : IWorkflowSignalBus
The signal bus of a host without signaling: every call raises Not.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalBus( | constructor | Creates an instance of Null. |
PublishAsync( | method | Stores a signal for delivery. |
PublishDeadLetterAsync( | method | Stores a signal that could not be processed as a dead letter. |
ReceiveAsync( | method | Waits for a signal to claim. |
constructor NullWorkflowSignalBus() #
NullWorkflowSignalBus() #public NullWorkflowSignalBus()
Creates an instance of Null.
method PublishAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal for delivery.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
method PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishDeadLetterAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal that could not be processed as a dead letter.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
method ReceiveAsync(string, CancellationToken) #
ReceiveAsync(string, CancellationToken) #public Task<IWorkflowSignalLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)
Waits for a signal to claim.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
The lease of the claimed signal, or null when none arrives in time.
class NullWorkflowSignalClaimStore
public sealed class NullWorkflowSignalClaimStore : IWorkflowSignalClaimStore
A claim store that never has a signal to claim.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalClaimStore( | constructor | Creates an instance of Null. |
TryClaimAsync( | method | Claims one available signal for a consumer. |
constructor NullWorkflowSignalClaimStore() #
NullWorkflowSignalClaimStore() #public NullWorkflowSignalClaimStore()
Creates an instance of Null.
method TryClaimAsync(string, CancellationToken) #
TryClaimAsync(string, CancellationToken) #public Task<IWorkflowSignalLease?> TryClaimAsync(string consumerName, CancellationToken cancellationToken = default)
Claims one available signal for a consumer.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
The lease of the claimed signal, or null when none is available.
class NullWorkflowSignalDeadLetterStore
public sealed class NullWorkflowSignalDeadLetterStore : IWorkflowSignalDeadLetterStore
The dead letter store used when the backend registers none: every call raises Not.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalDeadLetterStore( | constructor | Creates an instance of Null. |
GetMessagesAsync( | method | Lists the dead-lettered signals. |
ReplayAsync( | method | Puts a dead letter back on the signal queue. |
constructor NullWorkflowSignalDeadLetterStore() #
NullWorkflowSignalDeadLetterStore() #public NullWorkflowSignalDeadLetterStore()
Creates an instance of Null.
method GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) #
GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) #public Task<WorkflowSignalDeadLettersGetResponse> GetMessagesAsync(WorkflowSignalDeadLettersGetRequest request, CancellationToken cancellationToken = default)
Lists the dead-lettered signals.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
A page of dead letters.
method ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) #
ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) #public Task<WorkflowSignalDeadLetterReplayResponse> ReplayAsync(WorkflowSignalDeadLetterReplayRequest request, CancellationToken cancellationToken = default)
Puts a dead letter back on the signal queue.
Parameters
request: The request.cancellationToken: Cancels the operation.
Returns
The outcome.
class NullWorkflowSignalDriver
public sealed class NullWorkflowSignalDriver : IWorkflowSignalDriver
The signal driver None: it sends no wake and has no signal to receive.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalDriver( | constructor | Creates an instance of Null. |
DispatchMode | property | When the engine tells the driver that a signal is available. |
DriverName | property | The driver name, as Workflow selects it. |
NotifySignalAvailableAsync( | method | Tells the consumers that a signal is available. |
ReceiveAsync( | method | Waits up to the driver’s blocking wait for a signal to claim. |
constructor NullWorkflowSignalDriver() #
NullWorkflowSignalDriver() #public NullWorkflowSignalDriver()
Creates an instance of Null.
property DispatchMode #
DispatchMode #public WorkflowSignalDriverDispatchMode DispatchMode { get; }
When the engine tells the driver that a signal is available.
property DriverName #
DriverName #public string DriverName { get; }
The driver name, as Workflow selects it.
method NotifySignalAvailableAsync(WorkflowSignalWakeNotification, CancellationToken) #
NotifySignalAvailableAsync(WorkflowSignalWakeNotification, CancellationToken) #public Task NotifySignalAvailableAsync(WorkflowSignalWakeNotification notification, CancellationToken cancellationToken = default)
Tells the consumers that a signal is available.
Parameters
notification: The available signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the notification is sent.
method ReceiveAsync(string, CancellationToken) #
ReceiveAsync(string, CancellationToken) #public Task<IWorkflowSignalLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)
Waits up to the driver’s blocking wait for a signal to claim.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
The lease of the claimed signal, or null when none arrives in time.
class NullWorkflowSignalStore
public sealed class NullWorkflowSignalStore : IWorkflowSignalStore
The signal store of a host without one: it logs a warning and stores nothing.
Parameters
logger: Receives the warnings.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowSignalStore( | constructor | The signal store of a host without one: it logs a warning and stores nothing. |
PublishAsync( | method | Stores a signal for delivery. |
PublishDeadLetterAsync( | method | Stores a signal that could not be processed as a dead letter. |
constructor NullWorkflowSignalStore(ILogger<NullWorkflowSignalStore>) #
NullWorkflowSignalStore(ILogger<NullWorkflowSignalStore>) #public NullWorkflowSignalStore(ILogger<NullWorkflowSignalStore> logger)
The signal store of a host without one: it logs a warning and stores nothing.
Parameters
logger: Receives the warnings.
method PublishAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal for delivery.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
method PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishDeadLetterAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal that could not be processed as a dead letter.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
class NullWorkflowWakeOutbox
public sealed class NullWorkflowWakeOutbox : IWorkflowWakeOutbox
A wake outbox that stores nothing.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowWakeOutbox( | constructor | Creates an instance of Null. |
EnqueueAsync( | method | Writes a wake notification to the outbox. |
constructor NullWorkflowWakeOutbox() #
NullWorkflowWakeOutbox() #public NullWorkflowWakeOutbox()
Creates an instance of Null.
method EnqueueAsync(WorkflowSignalWakeNotification, CancellationToken) #
EnqueueAsync(WorkflowSignalWakeNotification, CancellationToken) #public Task EnqueueAsync(WorkflowSignalWakeNotification notification, CancellationToken cancellationToken = default)
Writes a wake notification to the outbox.
Parameters
notification: The notification.cancellationToken: Cancels the operation.
Returns
A task that completes when the notification is written.
class NullWorkflowWakeOutboxReceiver
public sealed class NullWorkflowWakeOutboxReceiver : IWorkflowWakeOutboxReceiver
A wake outbox receiver that never has a notification.
Members
| Member | Kind | Summary |
|---|---|---|
NullWorkflowWakeOutboxReceiver( | constructor | Creates an instance of Null. |
ReceiveAsync( | method | Claims one wake notification of the outbox for a consumer. |
constructor NullWorkflowWakeOutboxReceiver() #
NullWorkflowWakeOutboxReceiver() #public NullWorkflowWakeOutboxReceiver()
Creates an instance of Null.
method ReceiveAsync(string, CancellationToken) #
ReceiveAsync(string, CancellationToken) #public Task<IWorkflowWakeOutboxLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)
Claims one wake notification of the outbox for a consumer.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
The lease of the notification, or null when there is none.
class WorkflowSignalBusBridge
public sealed class WorkflowSignalBusBridge : IWorkflowSignalBus
The signal bus over the signal store and driver: it stores a signal, then wakes the consumers as the driver’s dispatch mode says, and receives through the driver.
Parameters
signalStore: Stores the signals.signalDriver: Wakes the consumers and hands out signals.wakeOutbox: The wake outbox, for theWakeOutboxdispatch mode.mutation: The open change scope, for post-commit wakes.Scope Accessor
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalBusBridge( | constructor | The signal bus over the signal store and driver: it stores a signal, then wakes the consumers as the driver’s dispatch mode says, and receives through the driver. |
PublishAsync( | method | Stores a signal for delivery. |
PublishDeadLetterAsync( | method | Stores a signal that could not be processed as a dead letter. |
ReceiveAsync( | method | Waits for a signal to claim. |
constructor WorkflowSignalBusBridge(IWorkflowSignalStore, IWorkflowSignalDriver, IWorkflowWakeOutbox, IWorkflowMutationScopeAccessor) #
WorkflowSignalBusBridge(IWorkflowSignalStore, IWorkflowSignalDriver, IWorkflowWakeOutbox, IWorkflowMutationScopeAccessor) #public WorkflowSignalBusBridge(IWorkflowSignalStore signalStore, IWorkflowSignalDriver signalDriver, IWorkflowWakeOutbox wakeOutbox, IWorkflowMutationScopeAccessor mutationScopeAccessor)
The signal bus over the signal store and driver: it stores a signal, then wakes the consumers as the driver’s dispatch mode says, and receives through the driver.
Parameters
signalStore: Stores the signals.signalDriver: Wakes the consumers and hands out signals.wakeOutbox: The wake outbox, for theWakeOutboxdispatch mode.mutation: The open change scope, for post-commit wakes.Scope Accessor
method PublishAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal for delivery.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
method PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #
PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) #public Task PublishDeadLetterAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Stores a signal that could not be processed as a dead letter.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is stored.
method ReceiveAsync(string, CancellationToken) #
ReceiveAsync(string, CancellationToken) #public Task<IWorkflowSignalLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)
Waits for a signal to claim.
Parameters
consumerName: The consumer.cancellationToken: Cancels the operation.
Returns
The lease of the claimed signal, or null when none arrives in time.
class WorkflowSignalCommandDispatcher
public sealed class WorkflowSignalCommandDispatcher : IWorkflowSignalCommandDispatcher
Runs signal commands through the workflow runtime service.
Parameters
workflow: The runtime service.Runtime Service
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalCommandDispatcher( | constructor | Runs signal commands through the workflow runtime service. |
DispatchResumeWorkflowAsync( | method | Applies a signal to its instance. |
DispatchStartWorkflowAsync( | method | Starts a workflow. |
constructor WorkflowSignalCommandDispatcher(WorkflowRuntimeService) #
WorkflowSignalCommandDispatcher(WorkflowRuntimeService) #public WorkflowSignalCommandDispatcher(WorkflowRuntimeService workflowRuntimeService)
Runs signal commands through the workflow runtime service.
Parameters
workflow: The runtime service.Runtime Service
method DispatchResumeWorkflowAsync(WorkflowSignalEnvelope, CancellationToken) #
DispatchResumeWorkflowAsync(WorkflowSignalEnvelope, CancellationToken) #public Task DispatchResumeWorkflowAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Applies a signal to its instance.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is handled.
method DispatchStartWorkflowAsync(StartWorkflowRequest, CancellationToken) #
DispatchStartWorkflowAsync(StartWorkflowRequest, CancellationToken) #public Task DispatchStartWorkflowAsync(StartWorkflowRequest request, CancellationToken cancellationToken = default)
Starts a workflow.
Parameters
request: The start request.cancellationToken: Cancels the operation.
Returns
A task that completes when the start has run.
class WorkflowSignalEnvelopeSerializer
public sealed class WorkflowSignalEnvelopeSerializer
Serializes signal envelopes as JSON with the web defaults (camel-case names); payload keys compare ignoring case.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalEnvelopeSerializer( | constructor | Creates an instance of Workflow. |
Deserialize( | method | Deserializes an envelope. |
Serialize( | method | Serializes an envelope. |
constructor WorkflowSignalEnvelopeSerializer() #
WorkflowSignalEnvelopeSerializer() #public WorkflowSignalEnvelopeSerializer()
Creates an instance of Workflow.
method Deserialize(byte[]) #
Deserialize(byte[]) #public WorkflowSignalEnvelope Deserialize(byte[] payload)
Deserializes an envelope.
Parameters
payload: The UTF-8 JSON.
Returns
The envelope.
Exceptions
Invalid: The JSON isOperation Exception null.
method Serialize(WorkflowSignalEnvelope) #
Serialize(WorkflowSignalEnvelope) #public byte[] Serialize(WorkflowSignalEnvelope envelope)
Serializes an envelope.
Parameters
envelope: The envelope.
Returns
The UTF-8 JSON.
class WorkflowSignalProcessor
public sealed class WorkflowSignalProcessor : IWorkflowSignalProcessor
Applies the engine’s signals: a timer, retry, external signal or child completion resumes its instance, and an internal continue starts the next workflow; another type raises Not.
Parameters
commandDispatcher: Runs the resume and start commands.callerIdentity: Restores the caller a continuation signal carries.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowSignalProcessor( | constructor | Applies the engine’s signals: a timer, retry, external signal or child completion resumes its instance, and an internal continue starts the next workflow; another type raises Not. |
ProcessAsync( | method | Applies a signal to its instance. |
constructor WorkflowSignalProcessor(IWorkflowSignalCommandDispatcher, IWorkflowCallerIdentityAccessor) #
WorkflowSignalProcessor(IWorkflowSignalCommandDispatcher, IWorkflowCallerIdentityAccessor) #public WorkflowSignalProcessor(IWorkflowSignalCommandDispatcher commandDispatcher, IWorkflowCallerIdentityAccessor callerIdentity)
Applies the engine’s signals: a timer, retry, external signal or child completion resumes its instance, and an internal continue starts the next workflow; another type raises Not.
Parameters
commandDispatcher: Runs the resume and start commands.callerIdentity: Restores the caller a continuation signal carries.
method ProcessAsync(WorkflowSignalEnvelope, CancellationToken) #
ProcessAsync(WorkflowSignalEnvelope, CancellationToken) #public Task ProcessAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)
Applies a signal to its instance.
Parameters
envelope: The signal.cancellationToken: Cancels the operation.
Returns
A task that completes when the signal is applied.