StellaOps.Workflow.Abstractions

Workflow abstractions: the declaration API that workflow definitions are written against and the extension points of the workflow engine.

PackageStellaOps.Workflow.Abstractions
ComponentWorkflow
LicenceBUSL-1.1 (Workflow licence)
Package kindLibrary
Target frameworknet10.0

To add the package to a project, see Installing Stella Ops packages.

Namespaces

NamespaceTypes
StellaOps.Workflow.Abstractions284

StellaOps.Workflow.Abstractions namespace

TypeKindDescription
ActorContextWorkflowCallerIdentityAccessorclassDefault accessor: the caller the local HTTP endpoints put on the actor context; restore is a no-op.
DefaultWorkflowCancellationCleanupPolicyclassStarts the cleanup workflow whenever the cancel request names one.
EndpointAddressclassAddress of an HTTP endpoint of a named service ("$type": "endpoint"): the host resolves EndpointAddress.ServiceNameto a base address and calls EndpointAddress.Pathwith EndpointAddress.Method.
GraphqlAddressclassThe address of a GraphQL query ("$type": "graphql"): a named target and the query.
HttpAddressclassThe address of a call of a named HTTP target ("$type": "http").
IDeclarativeWorkflowinterfaceA workflow defined with the declarative builder.
IDeclarativeWorkflow<TStartRequest>interfaceA declarative workflow whose start request binds to TStartRequest.
INamedWorkflowRenderGraphLayoutEngineinterfaceA layout engine with a provider name, which WorkflowRendering:LayoutProvider selects.
IWorkflowinterfaceThe contract every registrable workflow implements: its identity, the roles allowed to act on it, and the tasks it declares.
IWorkflow<TStartRequest>interfaceA workflow whose start payload binds to TStartRequest.
IWorkflowActorRoleResolverinterfaceResolves the authenticated actor’s identity (ID + roles) from the server-side request context.
IWorkflowAssignmentPermissionEvaluatorinterfaceDecides whether an actor may take an action on a task.
IWorkflowBackendRegistrationMarkerinterfaceRegistered by a store library.
IWorkflowCallerIdentityAccessorinterfaceThe host’s view of who is calling.
IWorkflowCancellationCleanupPolicyinterfaceDecides whether cancelling an instance starts the cleanup workflow the cancel request names.
IWorkflowCanonicalDefinitionApiinterfaceCanonical workflow definition operations: retrieving the JSON schema and validating canonical definition payloads.
IWorkflowChildLinkStoreinterfaceDurable child-workflow links.
IWorkflowDefinitionCataloginterfaceThe definition descriptors of the registered workflows.
IWorkflowDefinitionDeploymentApiinterfaceWorkflow definition deployment operations: export, import, activate, version listing, single definition lookup, and rendering.
IWorkflowDefinitionGovernanceStoreinterfaceA definition store that governs activations: the expected active version and hash, and authorized rollbacks.
IWorkflowDefinitionQueryApiinterfaceWorkflow definition query operations: listing registered workflow definitions.
IWorkflowDefinitionStoreinterfacePersistent store for versioned canonical workflow definitions.
IWorkflowDiagramApiinterfaceWorkflow diagram operations: retrieving the visual graph representation of a workflow.
IWorkflowDurableMaintenanceStoreinterfaceIntegrity probes over the durable execution rows, for scheduled maintenance.
IWorkflowDurableStartStoreinterfaceDurable start coordination: start receipts, prestart terminal fences and the terminal inbox.
IWorkflowEndpointTransportinterfaceCalls an HTTP endpoint of a named service ("$type": "endpoint").
IWorkflowExecutionConsoleReadStoreinterfaceRead-only queries behind the execution console.
IWorkflowExecutionHandlerinterfaceRuns a workflow: starts instances and completes their tasks.
IWorkflowExecutionHandlerCataloginterfaceFinds the execution handler of a workflow version.
IWorkflowExternalActivityRegistryinterfaceThe external activities the host’s signed manifest registers.
IWorkflowExternalActivityStoreinterfaceDurable external activities: steps, attempts, the dispatch and cancel outboxes, the completion inbox, continuation lineages and scope reprocesses.
IWorkflowFirstSeenLedgerinterfaceThe insert-only record of every workflow an installation has registered in code or stored in the definition store: the engine’s technical counter of recorded workflow names.
IWorkflowFunctionCataloginterfaceThe expression functions the engine knows.
IWorkflowFunctionCatalogApiinterfaceWorkflow function catalog operations: retrieving the canonical function catalog and installed workflow modules.
IWorkflowFunctionProviderinterfaceProvides the functions of one module to the function catalog.
IWorkflowFunctionRuntimeinterfaceEvaluates expression function calls.
IWorkflowFunctionRuntimeProviderinterfaceEvaluates the functions of one module.
IWorkflowGraphqlTransportinterfaceRuns GraphQL queries against named targets: the transport of a graphql address.
IWorkflowHistoryStoreinterfaceDurable execution history.
IWorkflowHostedJobLockServiceinterfaceA lock that lets one service instance at a time run a hosted job.
IWorkflowHttpTransportinterfaceCalls named HTTP targets: the transport of an http address.
IWorkflowMapStoreinterfaceDurable maps: map executions and their items.
IWorkflowModuleCataloginterfaceThe installed modules: those registered with WorkflowModuleCatalogServiceCollectionExtensions.AddWorkflowModule(IServiceCollection, string, string)and those the function providers declare.
IWorkflowMutationCoordinatorinterfaceBegins the change scopes of the workflow store.
IWorkflowMutationScopeinterfaceA unit of workflow store changes that commit together.
IWorkflowMutationScopeAccessorinterfaceHolds the change scope of the running operation.
IWorkflowOutboxStoreinterfaceDelivery side of the durable outboxes: read what is ready, record each attempt, and compact what was delivered long ago.
IWorkflowPendingSignalDispatcherinterfaceDispatches a pending signal that is not a plain signal-bus publish, such as a durable map completion or an external activity dispatch.
IWorkflowProjectionRetentionStoreinterfaceApplies retention to the instance and task projections.
IWorkflowProjectionStoreinterfaceThe read model of instances and tasks, and the task operations that change it.
IWorkflowRabbitTransportinterfacePublishes to RabbitMQ: the transport of a rabbit address.
IWorkflowRegisteredSignalStoreinterfaceDurable registered signals: waits, their deadline timers and the signal inbox.
IWorkflowRegistrationCataloginterfaceThe workflows registered in code.
IWorkflowRenderGraphCompilerinterfaceBuilds the render graph of a workflow definition.
IWorkflowRenderGraphLayoutEngineinterfaceLays out a workflow render graph.
IWorkflowRenderLayoutEngineResolverinterfaceSelects the layout engine of a render request.
IWorkflowRenderSvgRendererinterfaceRenders a positioned workflow diagram as an SVG document.
IWorkflowRetentionApiinterfaceWorkflow retention operations: running cleanup and purge of stale workflow data.
IWorkflowRuntimeApiinterfaceCore workflow runtime operations: starting workflows, querying instances and tasks, completing/assigning/releasing tasks, and raising external signals.
IWorkflowRuntimeDefinitionStoreinterfaceThe workflows registered in code, as the engine runs them.
IWorkflowRuntimeExecutionHandlerFactoryinterfaceCreates the execution handler of a runtime definition.
IWorkflowRuntimeOrchestratorinterfaceRuns the instances of a runtime provider: start, task completion and signal resume.
IWorkflowRuntimeProviderinterfaceA runtime orchestrator with a provider name.
IWorkflowRuntimeStateStoreinterfaceStores the runtime state of instances.
IWorkflowScheduleBusinterfaceSchedules signals for later.
IWorkflowServiceMetadataApiinterfaceWorkflow service metadata operations: retrieving operational metadata about the running workflow service instance.
IWorkflowSignalBusinterfacePublishes and delivers the signals of workflow instances.
IWorkflowSignalClaimStoreinterfaceClaims stored signals for processing.
IWorkflowSignalDeadLetterApiinterfaceWorkflow signal dead-letter operations: listing and replaying dead-lettered signals.
IWorkflowSignalDeadLetterStoreinterfaceLists and replays the dead-lettered signals of a store.
IWorkflowSignalDriverinterfaceWakes the signal consumers when a signal is stored, and hands them signals to process.
IWorkflowSignalDriverRegistrationMarkerinterfaceRegistered by a signal driver library.
IWorkflowSignalLeaseinterfaceA claimed signal: complete it when it is processed, abandon it to let it be claimed again, or dead-letter it.
IWorkflowSignalProcessorinterfaceApplies a signal to its workflow instance.
IWorkflowSignalPumpTelemetryApiinterfaceWorkflow signal pump telemetry operations: retrieving in-process statistics for the workflow signal pump.
IWorkflowSignalResumableExecutionHandlerinterfaceAn execution handler that also resumes instances with signals.
IWorkflowSignalSchedulerinterfaceSchedules signals for later, such as the signal of a timer.
IWorkflowSignalStoreinterfaceStores signals and dead letters.
IWorkflowSourceFormatConverterinterfaceConverts workflow definitions between a source format and the canonical JSON shape used by the engine’s import / export pipeline.
IWorkflowSourceFormatRegistryinterfaceResolves converters by IWorkflowSourceFormatConverter.FormatId; used by the multi-format import / export endpoints to dispatch to the right converter.
IWorkflowSpecExecutionContextinterfaceThe execution context of a workflow, without its start request type.
IWorkflowStateJsonPolicyinterfaceChecks the workflow state JSON against the limits before it is stored.
IWorkflowWakeOutboxinterfaceThe outbox of wake notifications, for a driver whose dispatch mode is WorkflowSignalDriverDispatchMode.WakeOutbox.
IWorkflowWakeOutboxLeaseinterfaceA claimed wake notification of the outbox.
IWorkflowWakeOutboxReceiverinterfaceClaims the wake notifications of the outbox.
NoopWorkflowExecutionHandlerclassA placeholder handler for registrations whose steps the engine runs from their definition.
NullWorkflowActorRoleResolverclassDefault no-op resolver that passes through client-supplied values.
RabbitAddressclassThe address of a RabbitMQ call: the exchange and routing key the message is published to.
RequiredPayloadKeyCancellationCleanupPolicyclassStarts the cleanup workflow only when the cleanup payload carries a non-empty value under a required key: without it there is nothing to clean up.
WorkflowActivateTaskStepDefinition<TStartRequest>recordOpens a declared human task.
WorkflowActivityAttemptrecordOne semantic attempt of a step, with its frozen request and how it completed.
WorkflowActivityCancelEntryrecordAn activity cancel request waiting in, or delivered from, the cancel outbox.
WorkflowActivityCompletionEntryrecordA received activity completion and the disposition it was recorded with.
WorkflowActivityDispatchEntryrecordAn activity dispatch request waiting in, or delivered from, the dispatch outbox.
WorkflowActivityEventAppendrecordAn execution-history event to append.
WorkflowActivityMapItemStaterecordThe status fields of a map item that a stop may skip.
WorkflowActivityMapItemStatusChangerecordA map item moved to a terminal status; applied only at WorkflowActivityMapItemStatusChange.ExpectedVersionNo.
WorkflowActivityMapStaterecordThe status fields of a map execution that a stop may fence.
WorkflowActivityMapStatusChangerecordA map execution moved to a terminal status; applied only at WorkflowActivityMapStatusChange.ExpectedVersionNo.
WorkflowActivityRuntimeChangerecordA runtime-state version bump, applied only when the stored version still equals WorkflowActivityRuntimeChange.ExpectedVersion.
WorkflowActivityRuntimeStaterecordThe runtime-state fields the activity services read: the execution version and its snapshot.
WorkflowActivitySteprecordOne logical external-activity step: its binding, current attempt, retry and cancel fences.
WorkflowActivityStepChangerecordA changed step, written only when its stored version still equals WorkflowActivityStepChange.ExpectedVersionNo.
WorkflowActivityStopTargetKindenumWhat a stop request targets.
WorkflowAssignmentPermissionContextrecordWhat a permission check knows about a task action.
WorkflowAssignmentPermissionDecisionrecordThe outcome of a permission check.
WorkflowBackendConfigurationExtensionsclassReads the configured workflow backend.
WorkflowBackendNamesclassThe names of the durable stores, for WorkflowBackend:Provider.
WorkflowBackendOptionsclassThe workflow store the host uses (WorkflowBackend).
WorkflowBackendRegistrationMarkerrecordThe registration marker of a store library.
WorkflowBusinessIdAttributeclassMarks the property of a start request whose value is the business reference key of the instance.
WorkflowBusinessReferenceAssignmentStepDefinition<TStartRequest>recordSets the business reference of the instance.
WorkflowBusinessReferenceExtensionsclassBuilds, normalizes and compares business references.
WorkflowBusinessReferencePartAttributeclassMarks a property of a start request as a part of the business reference of the instance.
WorkflowCallerrecordA workflow’s caller: the user its service calls go as, with the roles the caller’s token carried.
WorkflowCallerSnapshotclassReads and writes the caller kept in an engine runtime snapshot and carried in signal payloads.
WorkflowCancellationCleanupPolicyServiceCollectionExtensionsclassRegisters the rule that decides whether cancelling an instance starts its cleanup workflow.
WorkflowCanonicalCompilationResultrecordThe outcome of compiling a C# workflow to a canonical definition.
WorkflowCanonicalDefinitionCompilerclassCompiles C# workflows to canonical definitions at runtime.
WorkflowCanonicalDefinitionValidatorclassValidates canonical definitions and their parts (WFVAL codes).
WorkflowCanonicalEvaluationContextrecordWhat a canonical expression reads: the roots of its paths, and the function runtime.
WorkflowCanonicalExpressionRuntimeclassEvaluates canonical expressions.
WorkflowCanonicalImportValidationResultrecordThe outcome of validating a canonical definition for import.
WorkflowCanonicalImportValidatorclassValidates canonical definitions before an import.
WorkflowCanonicalResultReferencesclassFinds the step results a canonical definition reads through result.<key> paths.
WorkflowCanonicalTemplateBindingsclassThe token values of a canonical definition template.
WorkflowCanonicalTemplateLoaderclassLoads canonical definitions from embedded JSON templates whose {{token}} placeholders take bound JSON values.
WorkflowCanonicalValidationErrorrecordA finding of the canonical definition validation.
WorkflowCanonicalValidationResultrecordThe outcome of a canonical definition validation.
WorkflowCanonicalizationDiagnosticrecordWhy a part of a C# workflow has no canonical form.
WorkflowChildFamilyRetentionclassThe retention rule for executions joined by child links.
WorkflowChildLinkrecordThe durable link between a parent step and the child workflow execution it started.
WorkflowChildLinkRetentionRowrecordOne parent-to-child execution link, as the retention pass reads it.
WorkflowCompleteStepDefinition<TStartRequest>recordCompletes the instance.
WorkflowConditionDefinition<TStartRequest>classA condition of a decision.
WorkflowConditionalStepDefinition<TStartRequest>recordBranches on a condition.
WorkflowConsoleAttemptRecordrecordAn attempt of an external activity step, as the console returns it.
WorkflowConsoleDeliveryRecordrecordOne activity delivery: a dispatch (DISPATCH, its delivery state, created and published times) or a completion (COMPLETION, its disposition, received and applied times).
WorkflowConsoleExecutionRecordrecordAn execution as the console reads it: the instance projection’s identity, status, state and history position.
WorkflowConsoleMapItemRecordrecordA map item row, as the console returns it.
WorkflowConsoleMapRecordrecordA map execution row.
WorkflowConsoleScopeRecordrecordA scope execution row.
WorkflowConsoleStepRecordrecordAn external activity step row, as the console returns it.
WorkflowContentHasherclassComputes a deterministic content hash for canonical workflow definitions.
WorkflowContinuationLineagerecordA provider continuation an attempt left behind, consumed by the next attempt or revoked by a cancel.
WorkflowContinuationLineageChangerecordA changed lineage, written only when its stored version still equals WorkflowContinuationLineageChange.ExpectedVersionNo.
WorkflowContinuationPlanrecordA workflow a plan starts next, at once or at a due time.
WorkflowContinueWithStepDefinition<TStartRequest>recordStarts another workflow as an independent instance and continues at once.
WorkflowCoreFunctionProviderclassProvides the core expression functions (module workflow.functions.core).
WorkflowDecisionStepDefinition<TStartRequest>recordBranches on a value condition.
WorkflowDefinitionActivationRecordrecordA governed activation.
WorkflowDefinitionRecordrecordA versioned, persisted canonical workflow definition record.
WorkflowEndpointCallStepDefinition<TStartRequest>recordDefines a transport call of an HTTP endpoint of a named service.
WorkflowExecutionActorContextclassPropagates the authenticated actor ID through async workflow execution chains (e.g., OnComplete -> Call -> transport) where the original request context is not available.
WorkflowExecutionTaskPlanrecordA human task a plan opens.
WorkflowExprclassBuilds the expressions of canonical workflow definitions.
WorkflowExpressionConditionDefinition<TStartRequest>classA condition evaluated by a delegate, with its expression when it has one.
WorkflowExternalActivityRegistrationrecordAn external activity of the signed registry manifest.
WorkflowExternalActivityStepDefinition<TStartRequest>recordRuns an external activity of the host’s signed registry.
WorkflowExternalActivityWriterecordThe changes one external-activity decision makes, written atomically.
WorkflowExternalSignalStepDefinition<TStartRequest>recordPauses the instance until a caller raises the signal for it.
WorkflowFailureHandlers<TStartRequest>recordThe failure and timeout branches of a step.
WorkflowFirstSeenIdentityclassThe identity of a workflow in the first-seen ledger.
WorkflowFirstSeenRecordrecordA workflow in the first-seen ledger, as first seen.
WorkflowFirstSeenSourcesclassWhere the ledger first saw a workflow.
WorkflowFlowBuilder<TStartRequest>classAdds the steps of a flow: the first steps of a workflow (StartWith), the completion steps of a task (OnComplete) and the branches of decisions, calls, loops and forks.
WorkflowForkStepDefinition<TStartRequest>recordRuns its branches concurrently.
WorkflowFunctionArgumentsclassArgument access for workflow function providers: an exact arity check, then the argument by position.
WorkflowFunctionCatalogclassThe function catalog: the functions of every provider, ordered by module and name.
WorkflowFunctionCatalogServiceCollectionExtensionsclassRegisters the function catalog and the function providers that workflow expressions call.
WorkflowFunctionDescriptorsclassBuilds the catalog descriptor of a deterministic workflow function with one example.
WorkflowGraphqlCallStepDefinition<TStartRequest>recordDefines a transport call to a GraphQL endpoint.
WorkflowHandledBranchActionenumWhat a call does on a failure or a timeout when no branch is given.
WorkflowHistoryCompactionResultrecordThe outcome of a history compaction.
WorkflowHistoryCursorrecordThe history position of an execution: the first sequence still stored, the next one to allocate, and the retention flags that decide whether its prefix may be compacted.
WorkflowHistoryEventrecordOne durable execution-history event, as the history store returns it.
WorkflowHttpCallStepDefinition<TStartRequest>recordDefines a transport call to an HTTP endpoint.
WorkflowHumanTaskclassStarts the definition of a human task.
WorkflowHumanTaskBuilder<TStartRequest>classBuilds a human task: its payload, roles, route, timeout and completion steps.
WorkflowHumanTaskDefinition<TStartRequest>classDefines a human task (user task) within a workflow.
WorkflowInlineStepDefinition<TStartRequest>recordRuns C# code with the inline step services.
WorkflowInlineStepServicesclassThe transports an inline step (Run) can call.
WorkflowInstalledModulerecordA function module installed in the engine.
WorkflowJsonExtensionsclassReads, converts and writes the JSON values of workflow state, payloads and results.
WorkflowMapExecutionChangerecordA changed map execution, written only when its stored version still equals WorkflowMapExecutionChange.ExpectedVersionNo.
WorkflowMapExecutionRecordrecordOne durable map execution: its frozen plan, bounds, fan-in and failure policies and status.
WorkflowMapItemChangerecordA changed map item, written only when its stored version still equals WorkflowMapItemChange.ExpectedVersionNo.
WorkflowMapItemRecordrecordOne item of a map: its descriptor, claim lease and fence, progress state and terminal outcome.
WorkflowMapStepDefinition<TStartRequest>recordRuns its body once per item of a collection.
WorkflowMapWriterecordThe changes one map decision makes, written atomically.
WorkflowModuleCatalogServiceCollectionExtensionsclassRegisters the module catalog and installed modules.
WorkflowModuleRequirementValidationErrorrecordA finding of a module requirement check.
WorkflowModuleVersionExpressionclassParses module version expressions such as >=1.0.0 <2.0.0.
WorkflowModuleVersionOperatorenumThe comparison of a module version clause.
WorkflowModuleVersionRequirementrecordA module version requirement: every clause must hold.
WorkflowModuleVersionRequirementClauserecordOne clause of a module version requirement.
WorkflowModuleVersioningclassChecks module requirements against the installed modules.
WorkflowOutboxEntryrecordOne outbox message waiting for delivery.
WorkflowOutboxKindenumThe durable outboxes an integration publisher drains.
WorkflowOutboxMessagerecordA message appended to the durable outbox in the same write as the state change it announces.
WorkflowPendingSignalPlanrecordA signal a plan waits for or sends.
WorkflowPrestartTerminalFencerecordA terminal command that arrived before its start request: the start is fenced and never creates a root.
WorkflowProjectionRetentionBatchrecordThe outcome of one retention pass over the projections.
WorkflowRabbitCallStepDefinition<TStartRequest>recordDefines a RabbitMQ call: a message published to an exchange with a routing key and, for a command-style peer, a command that may wait for a correlated reply.
WorkflowReferenceclassRefers to the workflow a sub-workflow or continue-with step runs.
WorkflowRegisteredSignalInboxEntryrecordA received external signal, kept for exact replay and for a wait registered after it arrived.
WorkflowRegisteredSignalWaitrecordA registered wait for one external signal, raced by its deadline timer.
WorkflowRegisteredSignalWriterecordThe changes one registered-signal operation makes, written atomically.
WorkflowRegistrationrecordA registered workflow: its definition, its start request type and its execution handler.
WorkflowRegistrationServiceCollectionExtensionsclassRegisters workflow definitions: each registration records the definition, its start request type and, when given, its execution handler.
WorkflowRenderEdgerecordAn edge of a render graph, before layout.
WorkflowRenderEdgeSectionrecordA routed section of an edge.
WorkflowRenderGraphrecordThe nodes and edges of a workflow diagram, before layout.
WorkflowRenderLayoutDirectionenumThe direction of the flow in a diagram.
WorkflowRenderLayoutEffortenumHow hard the layout works on node order and placement.
WorkflowRenderLayoutProviderNamesclassThe layout provider names.
WorkflowRenderLayoutRequestrecordThe settings of a layout.
WorkflowRenderLayoutResultrecordA laid-out diagram: positioned nodes and routed edges.
WorkflowRenderNoderecordA node of a render graph, before layout.
WorkflowRenderPointrecordA point of a laid-out diagram.
WorkflowRenderPortrecordA port of a render node.
WorkflowRenderPositionedNoderecordA positioned node.
WorkflowRenderPositionedPortrecordA positioned port.
WorkflowRenderRoutedEdgerecordA routed edge.
WorkflowRenderingOptionsclassThe layout engine of rendered workflow diagrams (WorkflowRendering).
WorkflowRepeatStepDefinition<TStartRequest>recordRuns its body while a condition holds, at most a number of times.
WorkflowRetentionOverriderecordOptional override passed from the admin UI to bypass the projection’s pre-computed StaleAfterUtc / PurgeAfterUtc values and force retention based on the instance’s age directly.
WorkflowRootExecutionStartrecordThe rows a committed start creates for its root execution: the instance, its runtime state, the root scope, the open association and the first history event (sequence 1).
WorkflowRuntimeDefinitionrecordA workflow the engine can run: its registration, descriptor and, for a declarative workflow, its canonical definition.
WorkflowRuntimeExecutionKindenumHow the engine runs a registered workflow.
WorkflowRuntimeExecutionResultrecordThe outcome of a runtime step of an instance.
WorkflowRuntimePayloadKeysclassThe payload keys the engine reserves.
WorkflowRuntimeProviderNamesclassThe names of the runtime providers.
WorkflowRuntimeStateConcurrencyExceptionclassRaised when a runtime state write loses its version check: another write changed the instance first.
WorkflowRuntimeStateRecordrecordThe runtime state of an instance, versioned for optimistic concurrency.
WorkflowScopeReprocessrecordAn operator request to run a scope again as a tagged successor occurrence.
WorkflowSignalDeadlineTimerrecordThe deadline timer of a registered wait.
WorkflowSignalDriverConfigurationExtensionsclassReads the configured signal driver.
WorkflowSignalDriverDispatchModeenumWhen the engine tells the signal driver that a signal is available.
WorkflowSignalDriverNamesclassThe names of the signal drivers, for WorkflowSignalDriver:Provider.
WorkflowSignalDriverOptionsclassThe signal driver the host uses (WorkflowSignalDriver).
WorkflowSignalDriverRegistrationMarkerrecordThe registration marker of a signal driver.
WorkflowSignalEnveloperecordA signal for a workflow instance, as the signal store keeps it.
WorkflowSignalExecutionContextrecordWhat the runtime gets to resume an instance with a signal.
WorkflowSignalPayloadKeysclassThe payload keys of the engine’s own signals.
WorkflowSignalResumeContextrecordWhat an execution handler gets to resume an instance with a signal.
WorkflowSignalTypesclassThe types of the engine’s signals.
WorkflowSignalWakeNotificationrecordTells signal consumers that a signal is available.
WorkflowSourceExportResultrecordA definition converted to a source format.
WorkflowSourceFormatDiagnosticrecordA finding of a source format conversion.
WorkflowSourceFormatDiagnosticSeverityenumThe severity of a conversion finding.
WorkflowSourceImportResultrecordResult of converting external content into canonical form.
WorkflowSpecclassStarts a declarative workflow definition.
WorkflowSpec<TStartRequest>classA declarative workflow definition: the initial state, the tasks and the first steps.
WorkflowSpecBuilder<TStartRequest>classBuilds a declarative workflow definition: the initial state, the tasks and the first steps.
WorkflowSpecExecutionContext<TStartRequest>classWhat the delegates of a workflow see: the start request, state, payload, kept results and business reference of the instance.
WorkflowStartExecutionContextrecordWhat an execution handler gets to start an instance.
WorkflowStartExecutionPlanrecordWhat starting an instance does: its status, state, tasks, signals and continuations.
WorkflowStartReceiptrecordThe durable decision taken for one start request, with the canonical result once there is one.
WorkflowStateAssignmentStepDefinition<TStartRequest>recordSets a state value.
WorkflowStateJsonPolicyclassThe state limits of WorkflowRuntime:StateJson.
WorkflowStateJsonPolicyOptionsclassLimits of the workflow state JSON (WorkflowRuntime:StateJson).
WorkflowStepDefinition<TStartRequest>recordA step of a workflow, as the builder produces it.
WorkflowStepSequence<TStartRequest>classA sequence of steps.
WorkflowStoreConcurrencyExceptionclassA durable store refused a write because the row changed since it was read (version or fence mismatch).
WorkflowStoreDuplicateExceptionclassA durable store refused a write because a row with the same key already exists.
WorkflowSubWorkflowStepDefinition<TStartRequest>recordRuns another workflow as a child and waits for it.
WorkflowTaskActionenumAn action on a human task that needs permission.
WorkflowTaskCompletionPlanrecordWhat completing a task or resuming an instance does.
WorkflowTaskExecutionContextrecordWhat an execution handler gets to complete a task.
WorkflowTerminalInboxEntryrecordA received prestart terminal command and the acknowledgement it was answered with, for exact replay.
WorkflowTerminateForkStepDefinition<TStartRequest>recordEnds the fork whose branch reaches it.
WorkflowTimeoutDefaultsclassDefault timeout values used across the workflow engine when no explicit timeout is specified.
WorkflowTimerDelayclassThe delay of a timer step (Wait(stepName, delayExpression)), from the value its delay expression evaluates to; both runtime providers read a delay this way.
WorkflowTimerStepDefinition<TStartRequest>recordPauses the instance for a delay.
WorkflowTrustedAssemblyAttributeclassMarks an assembly as a trusted workflow-authoring assembly for the workflow canonicality analyzer (WF001-WF010).
WorkflowValuestructOne workflow value; converting it to a type it cannot take raises the missing-value error.
WorkflowValueConditionDefinition<TStartRequest>classA condition that a payload or state value equals a value.
WorkflowValueDictionarystructWorkflow values by key; a missing key raises an error that names the key and the workflow.
WorkflowValueEqualsConditionDefinitionrecordA condition that a payload or state value equals a value.
WorkflowValueNotFoundExceptionclassRaised when a workflow value is missing or cannot take the requested type.
WorkflowValueSourceenumWhere a value condition reads its value.
WorkflowVersioningclassParses and compares semantic workflow versions (major.minor.patch).
WorkflowWebserviceServiceCollectionExtensionsclassExtension methods for registering workflow webservice API implementations in DI.

ActorContextWorkflowCallerIdentityAccessor class

public sealed class ActorContextWorkflowCallerIdentityAccessor : IWorkflowCallerIdentityAccessor

Default accessor: the caller the local HTTP endpoints put on the actor context; restore is a no-op.

ActorContextWorkflowCallerIdentityAccessor(WorkflowExecutionActorContext) constructor

public ActorContextWorkflowCallerIdentityAccessor(WorkflowExecutionActorContext executionActorContext)

Default accessor: the caller the local HTTP endpoints put on the actor context; restore is a no-op.

Current() method

public WorkflowCaller? Current()

The caller of the request being handled, or null outside a request.

Restore(WorkflowCaller) method

public void Restore(WorkflowCaller? caller)

Makes the stored caller the ambient caller when no request is being handled.

DefaultWorkflowCancellationCleanupPolicy class

public sealed class DefaultWorkflowCancellationCleanupPolicy : IWorkflowCancellationCleanupPolicy

Starts the cleanup workflow whenever the cancel request names one.

DefaultWorkflowCancellationCleanupPolicy() constructor

public DefaultWorkflowCancellationCleanupPolicy()

Creates an instance of DefaultWorkflowCancellationCleanupPolicy.

ShouldStartCleanup(WorkflowCancelRequest) method

public bool ShouldStartCleanup(WorkflowCancelRequest request)

Whether cancelling starts the cleanup workflow of the request.

Parameters

Returns

Whether to start it.

EndpointAddress class

public sealed class EndpointAddress

Address of an HTTP endpoint of a named service ("$type": "endpoint"): the host resolves EndpointAddress.ServiceNameto a base address and calls EndpointAddress.Pathwith EndpointAddress.Method.

EndpointAddress(string, string, string) constructor

public EndpointAddress(string serviceName, string path, string method = "POST")

Creates the address.

Parameters

Exceptions

Method property

public string Method { get; }

The HTTP method.

Path property

public string Path { get; }

The path.

ServiceName property

public string ServiceName { get; }

The service.

GraphqlAddress class

public sealed class GraphqlAddress

The address of a GraphQL query ("$type": "graphql"): a named target and the query.

GraphqlAddress(string, string, string) constructor

public GraphqlAddress(string target, string query, string? operationName = null)

Creates the address.

Parameters

Exceptions

OperationName property

public string? OperationName { get; }

The operation to run.

Query property

public string Query { get; }

The GraphQL query.

Target property

public string Target { get; }

The GraphQL target.

HttpAddress class

public sealed class HttpAddress

The address of a call of a named HTTP target ("$type": "http").

HttpAddress(string, string, string) constructor

public HttpAddress(string target, string path, string method = "POST")

Creates the address.

Parameters

Exceptions

Method property

public string Method { get; }

The HTTP method.

Path property

public string Path { get; }

The path.

Target property

public string Target { get; }

The HTTP target.

IDeclarativeWorkflow interface

public interface IDeclarativeWorkflow : IWorkflow

A workflow defined with the declarative builder.

IDeclarativeWorkflow<TStartRequest> interface

public interface IDeclarativeWorkflow<TStartRequest> : IDeclarativeWorkflow, IWorkflow<TStartRequest> where TStartRequest : class

A declarative workflow whose start request binds to TStartRequest. The analyzer checks that its IDeclarativeWorkflow<TStartRequest>.Speccan be written as a canonical definition.

Type parameters

Spec property

WorkflowSpec<TStartRequest> Spec { get; }

The definition: the initial state, the tasks and the first steps. Write every value as a WorkflowExpr expression, so that the definition has a canonical form.

INamedWorkflowRenderGraphLayoutEngine interface

public interface INamedWorkflowRenderGraphLayoutEngine : IWorkflowRenderGraphLayoutEngine

A layout engine with a provider name, which WorkflowRendering:LayoutProvider selects.

ProviderName property

string ProviderName { get; }

The provider name that selects the engine, compared ignoring case.

IWorkflow interface

public interface IWorkflow

The contract every registrable workflow implements: its identity, the roles allowed to act on it, and the tasks it declares. WorkflowRegistrationServiceCollectionExtensionsreads these members to build the WorkflowDefinitionDescriptorfor the catalog.

DisplayName property

string DisplayName { get; }

The title in lists and diagrams.

Tasks property

IReadOnlyCollection<WorkflowTaskDescriptor> Tasks { get; }

The task descriptors of the workflow.

WorkflowName property

string WorkflowName { get; }

The name that identifies the workflow; clients start it by this name.

WorkflowRoles property

IReadOnlyCollection<string> WorkflowRoles { get; }

The roles that may work the workflow’s tasks, unless a task names its own roles.

WorkflowVersion property

string WorkflowVersion { get; }

The version of the definition.

IWorkflow<TStartRequest> interface

public interface IWorkflow<TStartRequest> : IWorkflow where TStartRequest : class

A workflow whose start payload binds to TStartRequest. Declares no members of its own; registration resolves the start-request type from this interface.

IWorkflowActorRoleResolver interface

public interface IWorkflowActorRoleResolver

Resolves the authenticated actor’s identity (ID + roles) from the server-side request context. Implementations may query a database, read JWT claims, or fall back to client-supplied values.

ResolveActorId(string) method

string ResolveActorId(string? clientActorId)

Returns the actor ID for the current request. Implementations should prefer server-side identity over client-supplied values.

ResolveActorRolesAsync(string, IReadOnlyCollection<string>, CancellationToken) method

Task<IReadOnlyCollection<string>> ResolveActorRolesAsync(string actorId, IReadOnlyCollection<string>? clientRoles, CancellationToken cancellationToken = default)

Resolves user roles from a trusted source (database, identity provider). Falls back to clientRoles when no server-side context is available (e.g., during signal pump processing).

IWorkflowAssignmentPermissionEvaluator interface

public interface IWorkflowAssignmentPermissionEvaluator

Decides whether an actor may take an action on a task. The default lets an actor in the task’s effective roles take the task and complete it, lets the assignee release and complete it, and refuses assignment to another user.

Evaluate(WorkflowAssignmentPermissionContext) method

WorkflowAssignmentPermissionDecision Evaluate(WorkflowAssignmentPermissionContext context)

Decides on an action.

Parameters

Returns

The decision.

IWorkflowBackendRegistrationMarker interface

public interface IWorkflowBackendRegistrationMarker

Registered by a store library. ValidateWorkflowProviderRegistrations refuses a configured backend that no library registered.

BackendName property

string BackendName { get; }

The backend name, compared ignoring case with WorkflowBackend:Provider.

IWorkflowCallerIdentityAccessor interface

public interface IWorkflowCallerIdentityAccessor

The host’s view of who is calling. The engine keeps the caller with the instance (the user who started it, replaced by whoever completes one of its tasks) and, when it continues the instance without a request (timer, retry, signal, sub-workflow completion), restores that caller so transports call services as the same user.

Current() method

WorkflowCaller? Current()

The caller of the request being handled, or null outside a request.

Restore(WorkflowCaller) method

void Restore(WorkflowCaller? caller)

Makes the stored caller the ambient caller when no request is being handled.

IWorkflowCancellationCleanupPolicy interface

public interface IWorkflowCancellationCleanupPolicy

Decides whether cancelling an instance starts the cleanup workflow the cancel request names. The default starts it whenever one is named; a product registers its own rule (for example, only when the payload identifies the record to clean up) with WorkflowCancellationCleanupPolicyServiceCollectionExtensions.

ShouldStartCleanup(WorkflowCancelRequest) method

bool ShouldStartCleanup(WorkflowCancelRequest request)

Whether cancelling starts the cleanup workflow of the request.

Parameters

Returns

Whether to start it.

IWorkflowCanonicalDefinitionApi interface

public interface IWorkflowCanonicalDefinitionApi

Canonical workflow definition operations: retrieving the JSON schema and validating canonical definition payloads.

GetSchemaAsync(CancellationToken) method

Task<WorkflowCanonicalSchemaGetResponse> GetSchemaAsync(CancellationToken cancellationToken = default)

Returns the JSON schema of canonical definitions.

Parameters

Returns

The schema.

ValidateAsync(WorkflowCanonicalValidateRequest, CancellationToken) method

Task<WorkflowCanonicalValidateResponse> ValidateAsync(WorkflowCanonicalValidateRequest request, CancellationToken cancellationToken = default)

Validates a canonical definition without importing it.

Parameters

Returns

The findings.

IWorkflowChildLinkStore interface

public interface IWorkflowChildLinkStore

Durable child-workflow links. Every write is atomic with its outbox message.

GetAsync(string, CancellationToken) method

Task<WorkflowChildLink?> GetAsync(string linkId, CancellationToken cancellationToken = default)

Reads a child link.

Parameters

Returns

The link, or null.

Task InsertAsync(WorkflowChildLink link, WorkflowOutboxMessage message, CancellationToken cancellationToken = default)

Inserts the link and appends the message; throws WorkflowStoreDuplicateExceptionwhen the link exists.

Task UpdateAsync(WorkflowChildLink link, long expectedVersion, WorkflowOutboxMessage? message, CancellationToken cancellationToken = default)

Replaces the link when its stored version is expectedVersion and appends the message, if any; throws WorkflowStoreConcurrencyExceptionon a version mismatch.

IWorkflowDefinitionCatalog interface

public interface IWorkflowDefinitionCatalog

The definition descriptors of the registered workflows.

GetDefinition(string, string) method

WorkflowDefinitionDescriptor? GetDefinition(string workflowName, string? workflowVersion = null)

Finds a descriptor.

Parameters

Returns

The descriptor, or null.

GetDefinitions() method

IReadOnlyCollection<WorkflowDefinitionDescriptor> GetDefinitions()

Returns every descriptor.

Returns

The descriptors.

IWorkflowDefinitionDeploymentApi interface

public interface IWorkflowDefinitionDeploymentApi

Workflow definition deployment operations: export, import, activate, version listing, single definition lookup, and rendering.

ActivateAsync(WorkflowDefinitionActivateRequest, CancellationToken) method

Task<WorkflowDefinitionActivateResponse> ActivateAsync(WorkflowDefinitionActivateRequest request, CancellationToken cancellationToken = default)

Makes a stored version the active version of its workflow.

Parameters

Returns

The outcome of the activation.

ExportAsync(WorkflowDefinitionExportRequest, CancellationToken) method

Task<WorkflowDefinitionExportResponse> ExportAsync(WorkflowDefinitionExportRequest request, CancellationToken cancellationToken = default)

Exports a stored definition.

Parameters

Returns

The definition.

GetDefinitionByIdAsync(WorkflowDefinitionByIdRequest, CancellationToken) method

Task<WorkflowDefinitionByIdResponse> GetDefinitionByIdAsync(WorkflowDefinitionByIdRequest request, CancellationToken cancellationToken = default)

Reads one definition: a code-registered workflow first, the store otherwise.

Parameters

Returns

The definition.

GetVersionsAsync(WorkflowDefinitionVersionsGetRequest, CancellationToken) method

Task<WorkflowDefinitionVersionsGetResponse> GetVersionsAsync(WorkflowDefinitionVersionsGetRequest request, CancellationToken cancellationToken = default)

Lists the stored versions of a workflow.

Parameters

Returns

The versions.

ImportAsync(WorkflowDefinitionImportRequest, CancellationToken) method

Task<WorkflowDefinitionImportResponse> ImportAsync(WorkflowDefinitionImportRequest request, CancellationToken cancellationToken = default)

Imports a canonical definition as a new, inactive version.

Parameters

Returns

The outcome of the import.

RenderAsync(WorkflowRenderingRequest, CancellationToken) method

Task<WorkflowRenderingResponse> RenderAsync(WorkflowRenderingRequest request, CancellationToken cancellationToken = default)

Reads the stored rendering of a definition in one format.

Parameters

Returns

The rendering.

IWorkflowDefinitionGovernanceStore interface

public interface IWorkflowDefinitionGovernanceStore

A definition store that governs activations: the expected active version and hash, and authorized rollbacks.

ActivateGovernedAsync(WorkflowDefinitionActivationRecord, CancellationToken) method

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

Returns

A task that completes when the version is active.

Exceptions

IWorkflowDefinitionQueryApi interface

public interface IWorkflowDefinitionQueryApi

Workflow definition query operations: listing registered workflow definitions.

GetDefinitionsAsync(WorkflowDefinitionGetRequest, CancellationToken) method

Task<WorkflowDefinitionGetResponse> GetDefinitionsAsync(WorkflowDefinitionGetRequest request, CancellationToken cancellationToken = default)

Lists workflow definitions.

Parameters

Returns

A page of definitions.

IWorkflowDefinitionStore interface

public interface IWorkflowDefinitionStore

Persistent store for versioned canonical workflow definitions. The PostgreSQL backend (PostgresWorkflowDefinitionStore, registered by AddWorkflowPostgresDataStore) implements it, as does the MongoDB backend (MongoWorkflowDefinitionStore, registered by AddWorkflowMongoDataStore); the engine also offers InMemoryWorkflowDefinitionStore for a host or test that registers it. A host that registers no store keeps the engine’s NullWorkflowDefinitionStore, which stores nothing and refuses imports and activations; its workflows are the code-registered catalog only.

ActivateAsync(string, string, CancellationToken) method

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.

FindByHashAsync(string, string, CancellationToken) method

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.

GetActiveAsync(string, CancellationToken) method

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.

GetAllActiveAsync(CancellationToken) method

Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetAllActiveAsync(CancellationToken cancellationToken = default)

Gets all active definitions across all workflow names.

GetAsync(string, string, CancellationToken) method

Task<WorkflowDefinitionRecord?> GetAsync(string workflowName, string version, CancellationToken cancellationToken = default)

Gets a specific version of a workflow definition.

GetVersionsAsync(string, CancellationToken) method

Task<IReadOnlyCollection<WorkflowDefinitionRecord>> GetVersionsAsync(string workflowName, CancellationToken cancellationToken = default)

Gets all versions of a workflow definition, ordered by creation date descending.

UpsertAsync(WorkflowDefinitionRecord, CancellationToken) method

Task UpsertAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)

Inserts or updates a definition record.

IWorkflowDiagramApi interface

public interface IWorkflowDiagramApi

Workflow diagram operations: retrieving the visual graph representation of a workflow.

GetDiagramAsync(WorkflowDiagramGetRequest, CancellationToken) method

Task<WorkflowDiagramGetResponse> GetDiagramAsync(WorkflowDiagramGetRequest request, CancellationToken cancellationToken = default)

Lays out a workflow diagram.

Parameters

Returns

The diagram.

IWorkflowDurableMaintenanceStore interface

public interface IWorkflowDurableMaintenanceStore

Integrity probes over the durable execution rows, for scheduled maintenance. Detect-only: no method writes.

HasOrphanedStepAttemptsAsync(CancellationToken) method

Task<bool> HasOrphanedStepAttemptsAsync(CancellationToken cancellationToken = default)

True when a step attempt exists whose step (same step, execution and scope ids) does not.

IWorkflowDurableStartStore interface

public interface IWorkflowDurableStartStore

Durable start coordination: start receipts, prestart terminal fences and the terminal inbox. Each write is atomic with its outbox messages; a write that loses a race on a key throws WorkflowStoreDuplicateException.

GetFenceAsync(string, CancellationToken) method

Task<WorkflowPrestartTerminalFence?> GetFenceAsync(string startRequestId, CancellationToken cancellationToken = default)

Reads the prestart terminal fence of a start request.

Parameters

Returns

The fence, or null.

GetReceiptAsync(string, CancellationToken) method

Task<WorkflowStartReceipt?> GetReceiptAsync(string startRequestId, CancellationToken cancellationToken = default)

Reads the receipt of a start request.

Parameters

Returns

The receipt, or null.

GetTerminalInboxAsync(string, CancellationToken) method

Task<WorkflowTerminalInboxEntry?> GetTerminalInboxAsync(string commandEventId, CancellationToken cancellationToken = default)

Reads a terminal inbox entry.

Parameters

Returns

The entry, or null.

HasOpenExecutionAsync(string, string, string, CancellationToken) method

Task<bool> HasOpenExecutionAsync(string definitionCode, string businessReferenceSha256, string openStatus, CancellationToken cancellationToken = default)

True when an execution of the definition is open for the business reference.

RecordPrestartTerminalAsync(WorkflowPrestartTerminalFence, WorkflowStartReceipt, WorkflowTerminalInboxEntry, WorkflowOutboxMessage, CancellationToken) method

Task RecordPrestartTerminalAsync(WorkflowPrestartTerminalFence fence, WorkflowStartReceipt? newReceipt, WorkflowTerminalInboxEntry inbox, WorkflowOutboxMessage message, CancellationToken cancellationToken = default)

Records a prestart terminal command: the fence, the fenced receipt when none exists, the inbox entry and the acknowledgement.

RecordStartDecisionAsync(WorkflowStartReceipt, WorkflowRootExecutionStart, IReadOnlyList<WorkflowOutboxMessage>, CancellationToken) method

Task RecordStartDecisionAsync(WorkflowStartReceipt receipt, WorkflowRootExecutionStart? root, IReadOnlyList<WorkflowOutboxMessage> messages, CancellationToken cancellationToken = default)

Records a start decision: the receipt, the root execution rows when the start created one (the store allocates the instance id), and the messages.

TryCompleteReceiptAsync(WorkflowStartReceipt, WorkflowOutboxMessage, CancellationToken) method

Task<bool> TryCompleteReceiptAsync(WorkflowStartReceipt receipt, WorkflowOutboxMessage message, CancellationToken cancellationToken = default)

Writes the result into a receipt that has none yet, with its message. Returns false, and writes nothing, when the stored receipt already carries a result.

IWorkflowEndpointTransport interface

public interface IWorkflowEndpointTransport

Calls an HTTP endpoint of a named service ("$type": "endpoint").

ExecuteAsync(WorkflowEndpointRequest, CancellationToken) method

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

Returns

The response.

IWorkflowExecutionConsoleReadStore interface

public interface IWorkflowExecutionConsoleReadStore

Read-only queries behind the execution console. The console service owns paging, clamping, profiles and redaction; a backend only returns the rows.

GetAttemptsAsync(string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleAttemptRecord>> GetAttemptsAsync(string workflowExecutionId, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount step attempts of the execution, by creation time.

GetDeliveriesAsync(string, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleDeliveryRecord>> GetDeliveriesAsync(string workflowExecutionId, CancellationToken cancellationToken = default)

All activity dispatches of the execution, then all its completions, unsorted.

GetExecutionAsync(string, CancellationToken) method

Task<WorkflowConsoleExecutionRecord?> GetExecutionAsync(string workflowExecutionId, CancellationToken cancellationToken = default)

Reads one execution.

Parameters

Returns

The execution, or null.

GetMapItemsAsync(string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleMapItemRecord>> GetMapItemsAsync(string workflowExecutionId, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount items of the execution’s maps, by map execution id, then ordinal.

GetMapsAsync(string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleMapRecord>> GetMapsAsync(string workflowExecutionId, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount map executions of the execution, in the backend’s natural order.

GetScopesAsync(string, int, bool, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleScopeRecord>> GetScopesAsync(string workflowExecutionId, int maxCount, bool orderByCreation, CancellationToken cancellationToken = default)

Up to maxCount scopes of the execution; ordered by creation time when orderByCreation is set, otherwise in the backend’s natural order.

GetStepsAsync(string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleStepRecord>> GetStepsAsync(string workflowExecutionId, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount steps of the execution, by creation time.

ListExecutionsAsync(DateTime?, string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowConsoleExecutionRecord>> ListExecutionsAsync(DateTime? createdBeforeUtc, string? executionIdBefore, int take, CancellationToken cancellationToken = default)

Up to take executions, newest first (created time, then execution id, both descending), strictly after the cursor position when createdBeforeUtc is set.

IWorkflowExecutionHandler interface

public interface IWorkflowExecutionHandler

Runs a workflow: starts instances and completes their tasks.

CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) method

Task<WorkflowTaskCompletionPlan> CompleteTaskAsync(WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)

Plans the completion of a task.

Parameters

Returns

The plan.

StartAsync(WorkflowStartExecutionContext, CancellationToken) method

Task<WorkflowStartExecutionPlan> StartAsync(WorkflowStartExecutionContext context, CancellationToken cancellationToken = default)

Plans the start of an instance.

Parameters

Returns

The plan.

IWorkflowExecutionHandlerCatalog interface

public interface IWorkflowExecutionHandlerCatalog

Finds the execution handler of a workflow version.

GetHandler(string, string) method

IWorkflowExecutionHandler? GetHandler(string workflowName, string workflowVersion)

Finds the handler of a workflow version.

Parameters

Returns

The handler, or null.

IWorkflowExternalActivityRegistry interface

public interface IWorkflowExternalActivityRegistry

The external activities the host’s signed manifest registers. A host without a manifest has an empty, ready registry.

IsReady property

bool IsReady { get; }

Whether the manifest loaded; a registry that is not ready resolves nothing.

ReadinessFailureCode property

string? ReadinessFailureCode { get; }

Why the manifest did not load.

IsExternalTransportAddress(WorkflowTransportAddressDeclaration) method

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

Returns

Whether it does.

TryResolve(string, string, string, out WorkflowExternalActivityRegistration) method

bool TryResolve(string destinationCode, string operationCode, string contractVersion, out WorkflowExternalActivityRegistration registration)

Finds an activity by destination, operation and contract version.

Parameters

Returns

Whether the registry is ready and has the activity.

IWorkflowExternalActivityStore interface

public interface IWorkflowExternalActivityStore

Durable external activities: steps, attempts, the dispatch and cancel outboxes, the completion inbox, continuation lineages and scope reprocesses. Reads return snapshots; every decision’s changes go through one atomic IWorkflowExternalActivityStore.WriteAsync(WorkflowExternalActivityWrite, CancellationToken).

GetAttemptAsync(string, CancellationToken) method

Task<WorkflowActivityAttempt?> GetAttemptAsync(string attemptId, CancellationToken cancellationToken = default)

Reads an attempt.

Parameters

Returns

The attempt, or null.

GetAttemptByNumberAsync(string, int, CancellationToken) method

Task<WorkflowActivityAttempt?> GetAttemptByNumberAsync(string stepExecutionId, int attemptNumber, CancellationToken cancellationToken = default)

Reads an attempt of a step by number.

Parameters

Returns

The attempt, or null.

GetCompletionAsync(string, CancellationToken) method

Task<WorkflowActivityCompletionEntry?> GetCompletionAsync(string eventId, CancellationToken cancellationToken = default)

Reads a completion.

Parameters

Returns

The completion, or null.

GetDispatchForAttemptAsync(string, CancellationToken) method

Task<WorkflowActivityDispatchEntry?> GetDispatchForAttemptAsync(string attemptId, CancellationToken cancellationToken = default)

Reads the dispatch of an attempt.

Parameters

Returns

The dispatch, or null.

GetLastAttemptNumberAsync(string, CancellationToken) method

Task<int> GetLastAttemptNumberAsync(string stepExecutionId, CancellationToken cancellationToken = default)

The highest attempt number recorded for the step; 0 when it has none.

GetLastReprocessOccurrenceAsync(string, CancellationToken) method

Task<int> GetLastReprocessOccurrenceAsync(string sourceScopeExecutionId, CancellationToken cancellationToken = default)

The highest reprocess occurrence of the scope; 0 when it has none.

GetLineageAsync(string, CancellationToken) method

Task<WorkflowContinuationLineage?> GetLineageAsync(string lineageId, CancellationToken cancellationToken = default)

Reads a lineage.

Parameters

Returns

The lineage, or null.

GetLineagesAsync(string, string, string, CancellationToken) method

Task<IReadOnlyList<WorkflowContinuationLineage>> GetLineagesAsync(string stepExecutionId, string? sourceAttemptId, string status, CancellationToken cancellationToken = default)

The step’s lineages in status, highest generation first, optionally limited to one source attempt.

GetMapItemsAsync(string, string, CancellationToken) method

Task<IReadOnlyList<WorkflowActivityMapItemState>> GetMapItemsAsync(string mapExecutionId, string status, CancellationToken cancellationToken = default)

Reads the items of a map in a status.

Parameters

Returns

The items.

GetMapsForStopAsync(WorkflowActivityStopTargetKind, string, CancellationToken) method

Task<IReadOnlyList<WorkflowActivityMapState>> GetMapsForStopAsync(WorkflowActivityStopTargetKind targetKind, string targetId, CancellationToken cancellationToken = default)

The map executions a stop targets, in any status.

GetReadyCancelsAsync(int, CancellationToken) method

Task<IReadOnlyList<WorkflowActivityCancelEntry>> GetReadyCancelsAsync(int maxCount, CancellationToken cancellationToken = default)

Reads up to maxCount READY cancels, oldest first.

GetReadyDispatchesAsync(int, CancellationToken) method

Task<IReadOnlyList<WorkflowActivityDispatchEntry>> GetReadyDispatchesAsync(int maxCount, CancellationToken cancellationToken = default)

Reads up to maxCount READY dispatches, oldest first.

GetRootScopeExecutionIdAsync(string, CancellationToken) method

Task<string?> GetRootScopeExecutionIdAsync(string workflowExecutionId, CancellationToken cancellationToken = default)

Reads the root scope of an execution.

Parameters

Returns

The root scope, or null.

GetRuntimeAsync(string, CancellationToken) method

Task<WorkflowActivityRuntimeState?> GetRuntimeAsync(string workflowExecutionId, CancellationToken cancellationToken = default)

Reads the runtime state of an execution.

Parameters

Returns

The runtime state, or null.

GetStepAsync(string, CancellationToken) method

Task<WorkflowActivityStep?> GetStepAsync(string stepExecutionId, CancellationToken cancellationToken = default)

Reads a step.

Parameters

Returns

The step, or null.

GetStepsForStopAsync(WorkflowActivityStopTargetKind, string, CancellationToken) method

Task<IReadOnlyList<WorkflowActivityStep>> GetStepsForStopAsync(WorkflowActivityStopTargetKind targetKind, string targetId, CancellationToken cancellationToken = default)

The steps a stop targets, ordered by step execution id; for a map, the items’ active steps.

MarkCancelPublishedAsync(string, DateTime, CancellationToken) method

Task MarkCancelPublishedAsync(string cancelId, DateTime publishedAtUtc, CancellationToken cancellationToken = default)

Marks a cancel PUBLISHED and counts the delivery attempt; does nothing when it is already PUBLISHED and throws when it does not exist.

MarkDispatchPublishedAsync(string, DateTime, CancellationToken) method

Task MarkDispatchPublishedAsync(string dispatchId, DateTime publishedAtUtc, CancellationToken cancellationToken = default)

Marks a dispatch PUBLISHED and counts the delivery attempt; does nothing when it is already PUBLISHED and throws when it does not exist.

WriteAsync(WorkflowExternalActivityWrite, CancellationToken) method

Task WriteAsync(WorkflowExternalActivityWrite write, CancellationToken cancellationToken = default)

Writes the changes atomically. Throws WorkflowStoreConcurrencyExceptionwhen a changed row’s version moved and WorkflowStoreDuplicateExceptionwhen a new row’s key exists.

IWorkflowFirstSeenLedger interface

public interface IWorkflowFirstSeenLedger

The insert-only record of every workflow an installation has registered in code or stored in the definition store: the engine’s technical counter of recorded workflow names. A workflow is recorded the first time it is seen and is never updated or removed, so removing it from the code catalogue, replacing its versions or deactivating a version never lowers the count. Versions are not counted; names that differ only in letter case are one workflow, as the engine resolves them. Recording never refuses a workflow: the count drives licence status and warnings only.

IsDurable property

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.

CountAsync(CancellationToken) method

Task<int> CountAsync(CancellationToken cancellationToken = default)

The number of distinct workflows ever recorded.

ListAsync(CancellationToken) method

Task<IReadOnlyList<WorkflowFirstSeenRecord>> ListAsync(CancellationToken cancellationToken = default)

Every workflow ever recorded, one entry per workflow with its first sighting, ordered by WorkflowFirstSeenIdentity.Key(string)(ordinal). The number of entries is the count IWorkflowFirstSeenLedger.CountAsync(CancellationToken)returns for the same ledger state. Reads only; records nothing.

RecordAsync(IReadOnlyCollection<string>, string, DateTimeOffset, CancellationToken) method

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.

RecordStoredDefinitionsAsync(CancellationToken) method

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.

IWorkflowFunctionCatalog interface

public interface IWorkflowFunctionCatalog

The expression functions the engine knows.

GetFunctions() method

IReadOnlyCollection<WorkflowFunctionDescriptor> GetFunctions()

Returns the functions.

Returns

The functions.

TryGetFunction(string, out WorkflowFunctionDescriptor) method

bool TryGetFunction(string functionName, out WorkflowFunctionDescriptor descriptor)

Finds a function by name or alias, ignoring case.

Parameters

Returns

Whether the function exists.

IWorkflowFunctionCatalogApi interface

public interface IWorkflowFunctionCatalogApi

Workflow function catalog operations: retrieving the canonical function catalog and installed workflow modules.

GetCatalogAsync(CancellationToken) method

Task<WorkflowFunctionCatalogGetResponse> GetCatalogAsync(CancellationToken cancellationToken = default)

Returns the expression functions and installed modules.

Parameters

Returns

The catalog.

IWorkflowFunctionProvider interface

public interface IWorkflowFunctionProvider

Provides the functions of one module to the function catalog.

GetFunctions() method

IReadOnlyCollection<WorkflowFunctionDescriptor> GetFunctions()

Returns the functions.

Returns

The functions.

IWorkflowFunctionRuntime interface

public interface IWorkflowFunctionRuntime

Evaluates expression function calls.

TryEvaluate(string, IReadOnlyCollection<object>, WorkflowCanonicalEvaluationContext, out object) method

bool TryEvaluate(string functionName, IReadOnlyCollection<object?> arguments, WorkflowCanonicalEvaluationContext context, out object? result)

Evaluates a function call with the first provider that knows the function.

Parameters

Returns

Whether the function was evaluated.

IWorkflowFunctionRuntimeProvider interface

public interface IWorkflowFunctionRuntimeProvider

Evaluates the functions of one module.

TryEvaluate(string, IReadOnlyCollection<object>, WorkflowCanonicalEvaluationContext, out object) method

bool TryEvaluate(string functionName, IReadOnlyCollection<object?> arguments, WorkflowCanonicalEvaluationContext context, out object? result)

Evaluates a function call.

Parameters

Returns

Whether the function was evaluated.

IWorkflowGraphqlTransport interface

public interface IWorkflowGraphqlTransport

Runs GraphQL queries against named targets: the transport of a graphql address.

ExecuteAsync(WorkflowGraphqlRequest, CancellationToken) method

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

Returns

The response.

IWorkflowHistoryStore interface

public interface IWorkflowHistoryStore

Durable execution history. A backend implements reads and the atomic prefix compaction; the engine’s history service owns the cursor and retention rules.

CompactPrefixAsync(string, long, int, CancellationToken) method

Task<WorkflowHistoryCompactionResult> CompactPrefixAsync(string workflowExecutionId, long throughSequence, int maxCount, CancellationToken cancellationToken = default)

Deletes, in one write, up to maxCount events from the history floor through throughSequence, stopping before the first retention-held event, and moves the floor to the first event kept.

GetCursorAsync(string, CancellationToken) method

Task<WorkflowHistoryCursor> GetCursorAsync(string workflowExecutionId, CancellationToken cancellationToken = default)

Reads the history cursor; throws when the execution does not exist.

GetEventsAsync(string, long, int, CancellationToken) method

Task<IReadOnlyList<WorkflowHistoryEvent>> GetEventsAsync(string workflowExecutionId, long afterSequence, int maxCount, CancellationToken cancellationToken = default)

Reads up to maxCount events after afterSequence, in sequence order.

IWorkflowHostedJobLockService interface

public interface IWorkflowHostedJobLockService

A lock that lets one service instance at a time run a hosted job.

ReleaseAsync(string, string, CancellationToken) method

Task ReleaseAsync(string lockName, string lockOwner, CancellationToken cancellationToken = default)

Releases a lock the owner holds.

Parameters

Returns

A task that completes when the lock is released.

TryAcquireAsync(string, string, DateTime, TimeSpan, CancellationToken) method

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

Returns

Whether the owner holds the lock.

IWorkflowHttpTransport interface

public interface IWorkflowHttpTransport

Calls named HTTP targets: the transport of an http address.

ExecuteAsync(WorkflowHttpRequest, CancellationToken) method

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

Returns

The response.

IWorkflowMapStore interface

public interface IWorkflowMapStore

Durable maps: map executions and their items. Reads return snapshots; every decision’s changes go through one atomic IWorkflowMapStore.WriteAsync(WorkflowMapWrite, CancellationToken), whose item version checks make a lease claim race-safe (one winner).

CountActiveClaimsAsync(string, DateTime, CancellationToken) method

Task<int> CountActiveClaimsAsync(string mapExecutionId, DateTime nowUtc, CancellationToken cancellationToken = default)

Counts the map’s CLAIMED items that hold capacity at nowUtc: an active step, or an unexpired lease.

CountGlobalActiveClaimsAsync(string, DateTime, CancellationToken) method

Task<int> CountGlobalActiveClaimsAsync(string globalActivityClass, DateTime nowUtc, CancellationToken cancellationToken = default)

Counts the active claims (as above) across every map of the global activity class.

GetClaimableItemsAsync(string, DateTime, int, CancellationToken) method

Task<IReadOnlyList<WorkflowMapItemRecord>> GetClaimableItemsAsync(string mapExecutionId, DateTime nowUtc, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount items that can be claimed at nowUtc, ordered by ordinal: READY items, and CLAIMED items with no active step whose lease has expired.

GetGlobalMaxConcurrencyAsync(string, CancellationToken) method

Task<int> GetGlobalMaxConcurrencyAsync(string globalActivityClass, CancellationToken cancellationToken = default)

The lowest declared max concurrency among the maps of the global activity class.

GetItemAsync(string, CancellationToken) method

Task<WorkflowMapItemRecord?> GetItemAsync(string mapItemId, CancellationToken cancellationToken = default)

Reads a map item.

Parameters

Returns

The item, or null.

GetItemsAsync(string, CancellationToken) method

Task<IReadOnlyList<WorkflowMapItemRecord>> GetItemsAsync(string mapExecutionId, CancellationToken cancellationToken = default)

All items of the map, ordered by ordinal.

GetItemsByActiveStepAsync(string, int, CancellationToken) method

Task<IReadOnlyList<WorkflowMapItemRecord>> GetItemsByActiveStepAsync(string activeStepExecutionId, int maxCount, CancellationToken cancellationToken = default)

Up to maxCount items whose active step is activeStepExecutionId.

GetMapAsync(string, CancellationToken) method

Task<WorkflowMapExecutionRecord?> GetMapAsync(string mapExecutionId, CancellationToken cancellationToken = default)

Reads a map execution.

Parameters

Returns

The map, or null.

WriteAsync(WorkflowMapWrite, CancellationToken) method

Task WriteAsync(WorkflowMapWrite write, CancellationToken cancellationToken = default)

Writes the changes atomically. Throws WorkflowStoreConcurrencyExceptionwhen a changed row’s version moved and WorkflowStoreDuplicateExceptionwhen a new row’s key exists.

IWorkflowModuleCatalog interface

public interface IWorkflowModuleCatalog

The installed modules: those registered with WorkflowModuleCatalogServiceCollectionExtensions.AddWorkflowModule(IServiceCollection, string, string)and those the function providers declare.

GetInstalledModules() method

IReadOnlyCollection<WorkflowInstalledModule> GetInstalledModules()

Returns each installed module and version once, ordered by module name and then version.

IWorkflowMutationCoordinator interface

public interface IWorkflowMutationCoordinator

Begins the change scopes of the workflow store.

BeginAsync(CancellationToken) method

Task<IWorkflowMutationScope> BeginAsync(CancellationToken cancellationToken = default)

Begins a change scope.

Parameters

Returns

The scope.

IWorkflowMutationScope interface

public interface IWorkflowMutationScope : IAsyncDisposable

A unit of workflow store changes that commit together.

CommitAsync(CancellationToken) method

Task CommitAsync(CancellationToken cancellationToken = default)

Commits the changes, then runs the post-commit actions.

Parameters

Returns

A task that completes when the changes are committed.

RegisterPostCommitAction(Func<CancellationToken, Task>) method

void RegisterPostCommitAction(Func<CancellationToken, Task> action)

Registers an action to run after the commit.

Parameters

IWorkflowMutationScopeAccessor interface

public interface IWorkflowMutationScopeAccessor

Holds the change scope of the running operation.

Current property

IWorkflowMutationScope? Current { get; set; }

The change scope of the running operation, when one is open.

IWorkflowOutboxStore interface

public interface IWorkflowOutboxStore

Delivery side of the durable outboxes: read what is ready, record each attempt, and compact what was delivered long ago.

CompactDeliveredAsync(DateTime, int, CancellationToken) method

Task CompactDeliveredAsync(DateTime cutoffUtc, int batchSize, CancellationToken cancellationToken = default)

Deletes up to batchSize rows per outbox published before cutoffUtc, and as many activity-completion inbox rows applied before it.

GetReadyAsync(WorkflowOutboxKind, IReadOnlyCollection<string>, int, CancellationToken) method

Task<IReadOnlyList<WorkflowOutboxEntry>> GetReadyAsync(WorkflowOutboxKind kind, IReadOnlyCollection<string>? channels, int maxCount, CancellationToken cancellationToken = default)

Reads up to maxCount READY entries, oldest first, optionally limited to some channels.

RecordDeliveryAttemptAsync(WorkflowOutboxEntry, DateTime?, CancellationToken) method

Task RecordDeliveryAttemptAsync(WorkflowOutboxEntry entry, DateTime? publishedAtUtc, CancellationToken cancellationToken = default)

Counts one delivery attempt; a non-null publishedAtUtc marks the entry PUBLISHED.

TryMarkPublishedAsync(WorkflowOutboxKind, string, DateTime, CancellationToken) method

Task<bool> TryMarkPublishedAsync(WorkflowOutboxKind kind, string entryKey, DateTime publishedAtUtc, CancellationToken cancellationToken = default)

Marks a READY entry PUBLISHED; false when it is not READY (already published or missing).

IWorkflowPendingSignalDispatcher interface

public interface IWorkflowPendingSignalDispatcher

Dispatches a pending signal that is not a plain signal-bus publish, such as a durable map completion or an external activity dispatch. The runtime asks each registered dispatcher in turn; the first that claims a signal dispatches it. A backend that cannot run such steps registers no dispatcher for them, and the definition validator rejects definitions that need one.

CanDispatch(WorkflowPendingSignalPlan) method

bool CanDispatch(WorkflowPendingSignalPlan pendingSignal)

Whether this dispatcher sends a pending signal.

Parameters

Returns

Whether it does.

DispatchAsync(string, WorkflowPendingSignalPlan, WorkflowRuntimeStateRecord, CancellationToken) method

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.

IWorkflowProjectionRetentionStore interface

public interface IWorkflowProjectionRetentionStore

Applies retention to the instance and task projections.

RunAsync(DateTime, WorkflowRetentionOverride, CancellationToken) method

Task<WorkflowProjectionRetentionBatch> RunAsync(DateTime nowUtc, WorkflowRetentionOverride? retentionOverride = null, CancellationToken cancellationToken = default)

Marks stale and purges the projections whose dates have passed.

Parameters

Returns

What was marked and purged.

IWorkflowProjectionStore interface

public interface IWorkflowProjectionStore

The read model of instances and tasks, and the task operations that change it.

ApplyRuntimeProgressAsync(string, WorkflowTaskCompletionPlan, WorkflowBusinessReference, CancellationToken) method

Task ApplyRuntimeProgressAsync(string workflowInstanceId, WorkflowTaskCompletionPlan progressPlan, WorkflowBusinessReference? businessReference, CancellationToken cancellationToken = default)

Applies the progress of an instance that moved without a task completion, such as after a signal.

Parameters

Returns

A task that completes when the progress is applied.

ApplyTaskCompletionAsync(string, string, IDictionary<string, object>, WorkflowTaskCompletionPlan, WorkflowBusinessReference, CancellationToken) method

Task<WorkflowTaskSummary> ApplyTaskCompletionAsync(string workflowTaskId, string actorId, IDictionary<string, object?> payload, WorkflowTaskCompletionPlan completionPlan, WorkflowBusinessReference? businessReference, CancellationToken cancellationToken = default)

Completes a task and applies the completion plan: new tasks, state and instance status.

Parameters

Returns

The completed task.

AssignTaskAsync(string, string, string, CancellationToken) method

Task<WorkflowTaskSummary> AssignTaskAsync(string workflowTaskId, string actorId, string assignee, CancellationToken cancellationToken = default)

Assigns a task to a user.

Parameters

Returns

The task.

AssignTaskRolesAsync(string, string, IReadOnlyCollection<string>, CancellationToken) method

Task<WorkflowTaskSummary> AssignTaskRolesAsync(string workflowTaskId, string actorId, IReadOnlyCollection<string> targetRoles, CancellationToken cancellationToken = default)

Assigns a task to roles.

Parameters

Returns

The task.

CreateWorkflowAsync(WorkflowDefinitionDescriptor, WorkflowBusinessReference, WorkflowStartExecutionPlan, CancellationToken) method

Task<StartWorkflowResponse> CreateWorkflowAsync(WorkflowDefinitionDescriptor definition, WorkflowBusinessReference? businessReference, WorkflowStartExecutionPlan executionPlan, CancellationToken cancellationToken = default)

Creates the projection of a new instance with the tasks of its start plan.

Parameters

Returns

The new instance.

GetExecutionSnapshotAsync(string, CancellationToken) method

Task<WorkflowExecutionSnapshot?> GetExecutionSnapshotAsync(string workflowTaskId, CancellationToken cancellationToken = default)

Reads a task with the state of its instance.

Parameters

Returns

The snapshot, or null.

GetInstanceAsync(string, CancellationToken) method

Task<WorkflowInstanceSummary?> GetInstanceAsync(string workflowInstanceId, CancellationToken cancellationToken = default)

Reads an instance.

Parameters

Returns

The instance, or null.

GetInstanceDetailsAsync(string, CancellationToken) method

Task<WorkflowInstanceProjectionDetails?> GetInstanceDetailsAsync(string workflowInstanceId, CancellationToken cancellationToken = default)

Reads an instance with its state, tasks and task events.

Parameters

Returns

The details, or null.

GetInstancesAsync(WorkflowInstancesGetRequest, CancellationToken) method

Task<IReadOnlyCollection<WorkflowInstanceSummary>> GetInstancesAsync(WorkflowInstancesGetRequest request, CancellationToken cancellationToken = default)

Lists instances.

Parameters

Returns

The instances.

GetTaskAsync(string, CancellationToken) method

Task<WorkflowTaskSummary?> GetTaskAsync(string workflowTaskId, CancellationToken cancellationToken = default)

Reads a task.

Parameters

Returns

The task, or null.

GetTasksAsync(WorkflowTasksGetRequest, CancellationToken) method

Task<IReadOnlyCollection<WorkflowTaskSummary>> GetTasksAsync(WorkflowTasksGetRequest request, CancellationToken cancellationToken = default)

Lists tasks.

Parameters

Returns

The tasks.

ReleaseTaskAsync(string, string, CancellationToken) method

Task<WorkflowTaskSummary> ReleaseTaskAsync(string workflowTaskId, string actorId, CancellationToken cancellationToken = default)

Releases an assigned task.

Parameters

Returns

The task.

IWorkflowRabbitTransport interface

public interface IWorkflowRabbitTransport

Publishes to RabbitMQ: the transport of a rabbit address.

ExecuteAsync(WorkflowRabbitRequest, CancellationToken) method

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

Returns

The response.

IWorkflowRegisteredSignalStore interface

public interface IWorkflowRegisteredSignalStore

Durable registered signals: waits, their deadline timers and the signal inbox. Reads return snapshots; every operation’s changes go through one atomic IWorkflowRegisteredSignalStore.WriteAsync(WorkflowRegisteredSignalWrite, CancellationToken).

FindWaitAsync(string, string, string, string, string, CancellationToken) method

Task<WorkflowRegisteredSignalWait?> FindWaitAsync(string workflowExecutionId, string signalCode, string? serviceAudience, string? signalRegistrationId, string? signalKey, CancellationToken cancellationToken = default)

Finds the wait of an execution for a signal code and audience, by registration id when one is given and by signal key otherwise.

GetInboxAsync(string, CancellationToken) method

Task<WorkflowRegisteredSignalInboxEntry?> GetInboxAsync(string signalEventId, CancellationToken cancellationToken = default)

Reads a signal inbox entry.

Parameters

Returns

The entry, or null.

GetOldestUncorrelatedInboxAsync(string, string, string, string, string, CancellationToken) method

Task<WorkflowRegisteredSignalInboxEntry?> GetOldestUncorrelatedInboxAsync(string workflowExecutionId, string signalKey, string signalCode, string serviceAudience, string uncorrelatedDisposition, CancellationToken cancellationToken = default)

The oldest signal received for this execution, key, code and audience that no wait has taken yet.

GetTimerAsync(string, CancellationToken) method

Task<WorkflowSignalDeadlineTimer?> GetTimerAsync(string timerId, CancellationToken cancellationToken = default)

Reads a deadline timer.

Parameters

Returns

The timer, or null.

GetTimerForWaitAsync(string, CancellationToken) method

Task<WorkflowSignalDeadlineTimer?> GetTimerForWaitAsync(string signalRegistrationId, CancellationToken cancellationToken = default)

Reads the deadline timer of a wait.

Parameters

Returns

The timer, or null.

GetWaitAsync(string, CancellationToken) method

Task<WorkflowRegisteredSignalWait?> GetWaitAsync(string signalRegistrationId, CancellationToken cancellationToken = default)

Reads a registered wait.

Parameters

Returns

The wait, or null.

WriteAsync(WorkflowRegisteredSignalWrite, CancellationToken) method

Task WriteAsync(WorkflowRegisteredSignalWrite write, CancellationToken cancellationToken = default)

Writes the changes atomically. Throws WorkflowStoreConcurrencyExceptionwhen the changed wait’s version moved and WorkflowStoreDuplicateExceptionwhen a new row’s key exists.

IWorkflowRegistrationCatalog interface

public interface IWorkflowRegistrationCatalog

The workflows registered in code.

GetRegistration(string, string) method

WorkflowRegistration? GetRegistration(string workflowName, string? workflowVersion = null)

Finds a registered workflow.

Parameters

Returns

The registration, or null.

GetRegistrations() method

IReadOnlyCollection<WorkflowRegistration> GetRegistrations()

Returns every registered workflow.

Returns

The registrations.

IWorkflowRenderGraphCompiler interface

public interface IWorkflowRenderGraphCompiler

Builds the render graph of a workflow definition.

Compile(WorkflowRuntimeDefinition) method

WorkflowRenderGraph Compile(WorkflowRuntimeDefinition definition)

Builds the render graph of a workflow definition.

Parameters

Returns

The render graph.

IWorkflowRenderGraphLayoutEngine interface

public interface IWorkflowRenderGraphLayoutEngine

Lays out a workflow render graph.

LayoutAsync(WorkflowRenderGraph, WorkflowRenderLayoutRequest, CancellationToken) method

Task<WorkflowRenderLayoutResult> LayoutAsync(WorkflowRenderGraph graph, WorkflowRenderLayoutRequest? request = null, CancellationToken cancellationToken = default)

Positions the nodes and routes the edges of a render graph.

Parameters

Returns

The positioned nodes and routed edges.

IWorkflowRenderLayoutEngineResolver interface

public interface IWorkflowRenderLayoutEngineResolver

Selects the layout engine of a render request.

Resolve(string) method

INamedWorkflowRenderGraphLayoutEngine Resolve(string? providerName = null)

Returns the registered layout engine of a provider: providerName, else WorkflowRendering:LayoutProvider, else ElkSharp.

Parameters

Returns

The layout engine.

Exceptions

IWorkflowRenderSvgRenderer interface

public interface IWorkflowRenderSvgRenderer

Renders a positioned workflow diagram as an SVG document. Optional: a host that wants server-side SVG registers an implementation (AddWorkflowSvgRenderer of StellaOps.Workflow.Renderer.Svg), so the engine itself carries no rendering library.

RenderSvg(WorkflowRenderLayoutResult, string, string) method

string RenderSvg(WorkflowRenderLayoutResult layout, string title, string? licenceNotice)

Renders layout titled title. Every diagram carries a licence notice: licenceNotice when the host has one, otherwise the renderer’s notice for a host without a loaded licence record.

IWorkflowRetentionApi interface

public interface IWorkflowRetentionApi

Workflow retention operations: running cleanup and purge of stale workflow data.

RunRetentionAsync(WorkflowRetentionRunRequest, CancellationToken) method

Task<WorkflowRetentionRunResponse> RunRetentionAsync(WorkflowRetentionRunRequest request, CancellationToken cancellationToken = default)

Runs the instance retention once.

Parameters

Returns

The counts.

IWorkflowRuntimeApi interface

public interface IWorkflowRuntimeApi

Core workflow runtime operations: starting workflows, querying instances and tasks, completing/assigning/releasing tasks, and raising external signals.

AssignTaskAsync(WorkflowTaskAssignRequest, CancellationToken) method

Task<WorkflowTaskAssignResponse> AssignTaskAsync(WorkflowTaskAssignRequest request, CancellationToken cancellationToken = default)

Assigns a human task to a user or to roles.

Parameters

Returns

The assigned task.

CancelWorkflowAsync(WorkflowCancelRequest, CancellationToken) method

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

Returns

Whether the cancel signal was queued, and the cleanup instance.

CompleteTaskAsync(WorkflowTaskCompleteRequest, CancellationToken) method

Task<WorkflowTaskCompleteResponse> CompleteTaskAsync(WorkflowTaskCompleteRequest request, CancellationToken cancellationToken = default)

Completes a human task with a payload; the task’s completion steps run.

Parameters

Returns

The outcome of the completion.

GetInstanceAsync(WorkflowInstanceGetRequest, CancellationToken) method

Task<WorkflowInstanceGetResponse> GetInstanceAsync(WorkflowInstanceGetRequest request, CancellationToken cancellationToken = default)

Reads one workflow instance.

Parameters

Returns

The instance.

GetInstancesAsync(WorkflowInstancesGetRequest, CancellationToken) method

Task<WorkflowInstancesGetResponse> GetInstancesAsync(WorkflowInstancesGetRequest request, CancellationToken cancellationToken = default)

Lists workflow instances.

Parameters

Returns

A page of instances.

GetTaskAsync(WorkflowTaskGetRequest, CancellationToken) method

Task<WorkflowTaskGetResponse> GetTaskAsync(WorkflowTaskGetRequest request, CancellationToken cancellationToken = default)

Reads one human task.

Parameters

Returns

The task.

GetTasksAsync(WorkflowTasksGetRequest, CancellationToken) method

Task<WorkflowTasksGetResponse> GetTasksAsync(WorkflowTasksGetRequest request, CancellationToken cancellationToken = default)

Lists human tasks.

Parameters

Returns

A page of tasks.

RaiseExternalSignalAsync(WorkflowSignalRaiseRequest, CancellationToken) method

Task<WorkflowSignalRaiseResponse> RaiseExternalSignalAsync(WorkflowSignalRaiseRequest request, CancellationToken cancellationToken = default)

Queues a signal for an instance that waits for it.

Parameters

Returns

The queued signal.

ReleaseTaskAsync(WorkflowTaskReleaseRequest, CancellationToken) method

Task<WorkflowTaskReleaseResponse> ReleaseTaskAsync(WorkflowTaskReleaseRequest request, CancellationToken cancellationToken = default)

Releases an assigned human task, so another user can take it.

Parameters

Returns

The released task.

StartWorkflowAsync(StartWorkflowRequest, CancellationToken) method

Task<StartWorkflowResponse> StartWorkflowAsync(StartWorkflowRequest request, CancellationToken cancellationToken = default)

Starts a workflow instance.

Parameters

Returns

The new instance.

IWorkflowRuntimeDefinitionStore interface

public interface IWorkflowRuntimeDefinitionStore

The workflows registered in code, as the engine runs them.

GetDefinition(string, string) method

WorkflowRuntimeDefinition? GetDefinition(string workflowName, string? workflowVersion = null)

Finds a runtime definition.

Parameters

Returns

The definition, or null.

GetDefinitions() method

IReadOnlyCollection<WorkflowRuntimeDefinition> GetDefinitions()

Returns every runtime definition.

Returns

The definitions.

GetRequiredDefinition(string, string) method

WorkflowRuntimeDefinition GetRequiredDefinition(string workflowName, string? workflowVersion = null)

Finds a runtime definition.

Parameters

Returns

The definition.

Exceptions

IWorkflowRuntimeExecutionHandlerFactory interface

public interface IWorkflowRuntimeExecutionHandlerFactory

Creates the execution handler of a runtime definition.

TryCreateHandler(WorkflowRuntimeDefinition) method

IWorkflowExecutionHandler? TryCreateHandler(WorkflowRuntimeDefinition definition)

Creates the handler: the custom handler of the registration, or the declarative handler; none for a definition-only workflow.

Parameters

Returns

The handler, or null.

IWorkflowRuntimeOrchestrator interface

public interface IWorkflowRuntimeOrchestrator

Runs the instances of a runtime provider: start, task completion and signal resume.

CompleteAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowTaskExecutionContext, CancellationToken) method

Task<WorkflowRuntimeExecutionResult> CompleteAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)

Completes a task.

Parameters

Returns

The outcome.

ResumeAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowSignalExecutionContext, CancellationToken) method

Task<WorkflowRuntimeExecutionResult> ResumeAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowSignalExecutionContext context, CancellationToken cancellationToken = default)

Resumes an instance with a signal.

Parameters

Returns

The outcome.

StartAsync(WorkflowRegistration, WorkflowDefinitionDescriptor, WorkflowBusinessReference, StartWorkflowRequest, object, CancellationToken) method

Task<WorkflowRuntimeExecutionResult> StartAsync(WorkflowRegistration registration, WorkflowDefinitionDescriptor definition, WorkflowBusinessReference? businessReference, StartWorkflowRequest request, object startRequest, CancellationToken cancellationToken = default)

Starts an instance.

Parameters

Returns

The outcome.

IWorkflowRuntimeProvider interface

public interface IWorkflowRuntimeProvider : IWorkflowRuntimeOrchestrator

A runtime orchestrator with a provider name.

ProviderName property

string ProviderName { get; }

The provider name.

IWorkflowRuntimeStateStore interface

public interface IWorkflowRuntimeStateStore

Stores the runtime state of instances.

DeleteAsync(IReadOnlyCollection<string>, CancellationToken) method

Task<int> DeleteAsync(IReadOnlyCollection<string> workflowInstanceIds, CancellationToken cancellationToken = default)

Deletes the runtime states of instances.

Parameters

Returns

The states deleted.

GetAsync(string, CancellationToken) method

Task<WorkflowRuntimeStateRecord?> GetAsync(string workflowInstanceId, CancellationToken cancellationToken = default)

Reads the runtime state of an instance.

Parameters

Returns

The state, or null.

GetManyAsync(IReadOnlyCollection<string>, CancellationToken) method

Task<IReadOnlyCollection<WorkflowRuntimeStateRecord>> GetManyAsync(IReadOnlyCollection<string> workflowInstanceIds, CancellationToken cancellationToken = default)

Reads the runtime states of instances.

Parameters

Returns

The states found.

MarkStaleAsync(IReadOnlyCollection<string>, DateTime, CancellationToken) method

Task<int> MarkStaleAsync(IReadOnlyCollection<string> workflowInstanceIds, DateTime updatedOnUtc, CancellationToken cancellationToken = default)

Marks instances stale.

Parameters

Returns

The instances marked.

UpsertAsync(WorkflowRuntimeStateRecord, CancellationToken) method

Task UpsertAsync(WorkflowRuntimeStateRecord state, CancellationToken cancellationToken = default)

Writes a runtime state whose version is one above the stored one (or the first).

Parameters

Returns

A task that completes when the state is written.

Exceptions

IWorkflowScheduleBus interface

public interface IWorkflowScheduleBus

Schedules signals for later.

ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) method

Task ScheduleAsync(WorkflowSignalEnvelope envelope, DateTime dueAtUtc, CancellationToken cancellationToken = default)

Stores a signal that becomes available at dueAtUtc.

Parameters

Returns

A task that completes when the signal is stored.

IWorkflowServiceMetadataApi interface

public interface IWorkflowServiceMetadataApi

Workflow service metadata operations: retrieving operational metadata about the running workflow service instance.

GetMetadataAsync(CancellationToken) method

Task<WorkflowServiceMetadataGetResponse> GetMetadataAsync(CancellationToken cancellationToken = default)

Returns the service metadata.

Parameters

Returns

The metadata.

IWorkflowSignalBus interface

public interface IWorkflowSignalBus

Publishes and delivers the signals of workflow instances.

PublishAsync(WorkflowSignalEnvelope, CancellationToken) method

Task PublishAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)

Stores a signal for delivery.

Parameters

Returns

A task that completes when the signal is stored.

PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) method

Task PublishDeadLetterAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)

Stores a signal that could not be processed as a dead letter.

Parameters

Returns

A task that completes when the signal is stored.

ReceiveAsync(string, CancellationToken) method

Task<IWorkflowSignalLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)

Waits for a signal to claim.

Parameters

Returns

The lease of the claimed signal, or null when none arrives in time.

IWorkflowSignalClaimStore interface

public interface IWorkflowSignalClaimStore

Claims stored signals for processing.

TryClaimAsync(string, CancellationToken) method

Task<IWorkflowSignalLease?> TryClaimAsync(string consumerName, CancellationToken cancellationToken = default)

Claims one available signal for a consumer.

Parameters

Returns

The lease of the claimed signal, or null when none is available.

IWorkflowSignalDeadLetterApi interface

public interface IWorkflowSignalDeadLetterApi

Workflow signal dead-letter operations: listing and replaying dead-lettered signals.

GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) method

Task<WorkflowSignalDeadLettersGetResponse> GetMessagesAsync(WorkflowSignalDeadLettersGetRequest request, CancellationToken cancellationToken = default)

Lists the dead-lettered signals.

Parameters

Returns

A page of dead letters.

ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) method

Task<WorkflowSignalDeadLetterReplayResponse> ReplayAsync(WorkflowSignalDeadLetterReplayRequest request, CancellationToken cancellationToken = default)

Puts a dead letter back on the signal queue.

Parameters

Returns

The outcome.

IWorkflowSignalDeadLetterStore interface

public interface IWorkflowSignalDeadLetterStore

Lists and replays the dead-lettered signals of a store.

GetMessagesAsync(WorkflowSignalDeadLettersGetRequest, CancellationToken) method

Task<WorkflowSignalDeadLettersGetResponse> GetMessagesAsync(WorkflowSignalDeadLettersGetRequest request, CancellationToken cancellationToken = default)

Lists the dead-lettered signals.

Parameters

Returns

A page of dead letters.

ReplayAsync(WorkflowSignalDeadLetterReplayRequest, CancellationToken) method

Task<WorkflowSignalDeadLetterReplayResponse> ReplayAsync(WorkflowSignalDeadLetterReplayRequest request, CancellationToken cancellationToken = default)

Puts a dead letter back on the signal queue.

Parameters

Returns

The outcome.

IWorkflowSignalDriver interface

public interface IWorkflowSignalDriver

Wakes the signal consumers when a signal is stored, and hands them signals to process.

DispatchMode property

WorkflowSignalDriverDispatchMode DispatchMode { get; }

When the engine tells the driver that a signal is available.

DriverName property

string DriverName { get; }

The driver name, as WorkflowSignalDriver:Provider selects it.

NotifySignalAvailableAsync(WorkflowSignalWakeNotification, CancellationToken) method

Task NotifySignalAvailableAsync(WorkflowSignalWakeNotification notification, CancellationToken cancellationToken = default)

Tells the consumers that a signal is available.

Parameters

Returns

A task that completes when the notification is sent.

ReceiveAsync(string, CancellationToken) method

Task<IWorkflowSignalLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)

Waits up to the driver’s blocking wait for a signal to claim.

Parameters

Returns

The lease of the claimed signal, or null when none arrives in time.

IWorkflowSignalDriverRegistrationMarker interface

public interface IWorkflowSignalDriverRegistrationMarker

Registered by a signal driver library. ValidateWorkflowProviderRegistrations refuses a configured driver that no library registered.

DriverName property

string DriverName { get; }

The driver name, compared ignoring case with WorkflowSignalDriver:Provider.

IWorkflowSignalLease interface

public interface IWorkflowSignalLease : IAsyncDisposable

A claimed signal: complete it when it is processed, abandon it to let it be claimed again, or dead-letter it.

DeliveryCount property

int DeliveryCount { get; }

How many times the signal has been delivered, this delivery included.

Envelope property

WorkflowSignalEnvelope Envelope { get; }

The claimed signal.

AbandonAsync(CancellationToken) method

Task AbandonAsync(CancellationToken cancellationToken = default)

Releases the signal, so it can be claimed again.

Parameters

Returns

A task that completes when it is released.

CompleteAsync(CancellationToken) method

Task CompleteAsync(CancellationToken cancellationToken = default)

Removes the processed signal.

Parameters

Returns

A task that completes when the signal is removed.

DeadLetterAsync(CancellationToken) method

Task DeadLetterAsync(CancellationToken cancellationToken = default)

Moves the signal to the dead letters.

Parameters

Returns

A task that completes when it is moved.

IWorkflowSignalProcessor interface

public interface IWorkflowSignalProcessor

Applies a signal to its workflow instance.

ProcessAsync(WorkflowSignalEnvelope, CancellationToken) method

Task ProcessAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)

Applies a signal to its instance.

Parameters

Returns

A task that completes when the signal is applied.

IWorkflowSignalPumpTelemetryApi interface

public interface IWorkflowSignalPumpTelemetryApi

Workflow signal pump telemetry operations: retrieving in-process statistics for the workflow signal pump.

GetStatsAsync(CancellationToken) method

Task<WorkflowSignalPumpStatsGetResponse> GetStatsAsync(CancellationToken cancellationToken = default)

Returns the signal pump counts of this process.

Parameters

Returns

The statistics.

IWorkflowSignalResumableExecutionHandler interface

public interface IWorkflowSignalResumableExecutionHandler

An execution handler that also resumes instances with signals.

ResumeSignalAsync(WorkflowSignalResumeContext, CancellationToken) method

Task<WorkflowTaskCompletionPlan> ResumeSignalAsync(WorkflowSignalResumeContext context, CancellationToken cancellationToken = default)

Plans the resume of an instance with a signal.

Parameters

Returns

The plan.

IWorkflowSignalScheduler interface

public interface IWorkflowSignalScheduler

Schedules signals for later, such as the signal of a timer.

ScheduleAsync(WorkflowSignalEnvelope, DateTime, CancellationToken) method

Task ScheduleAsync(WorkflowSignalEnvelope envelope, DateTime dueAtUtc, CancellationToken cancellationToken = default)

Stores a signal that becomes available at dueAtUtc.

Parameters

Returns

A task that completes when the signal is stored.

IWorkflowSignalStore interface

public interface IWorkflowSignalStore

Stores signals and dead letters.

PublishAsync(WorkflowSignalEnvelope, CancellationToken) method

Task PublishAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)

Stores a signal for delivery.

Parameters

Returns

A task that completes when the signal is stored.

PublishDeadLetterAsync(WorkflowSignalEnvelope, CancellationToken) method

Task PublishDeadLetterAsync(WorkflowSignalEnvelope envelope, CancellationToken cancellationToken = default)

Stores a signal that could not be processed as a dead letter.

Parameters

Returns

A task that completes when the signal is stored.

IWorkflowSourceFormatConverter interface

public interface IWorkflowSourceFormatConverter

Converts workflow definitions between a source format and the canonical JSON shape used by the engine’s import / export pipeline. The engine registers converters for canonical JSON, canonical YAML and the canonical bundle ZIP; a host can register its own. All concrete converters should produce / consume canonical JSON; every other pipeline concern (schema validation, hashing, upsert, activation) stays on the existing import path.

ContentType property

string ContentType { get; }

MIME type of the content this converter produces / consumes.

DisplayName property

string DisplayName { get; }

Human-friendly name, for example for a format picker.

FileExtension property

string FileExtension { get; }

Canonical file extension including the leading dot (e.g., “.json”, “.yaml”, “.zip”).

FormatId property

string FormatId { get; }

Stable, machine-readable identifier (e.g., “canonical-json”, “canonical-yaml”, “canonical-bundle”).

IsBinary property

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.

SupportsExport property

bool SupportsExport { get; }

True when the converter supports encoding a stored definition into its format.

SupportsImport property

bool SupportsImport { get; }

True when the converter supports decoding its format into canonical JSON.

ExportAsync(WorkflowDefinitionRecord, CancellationToken) method

Task<WorkflowSourceExportResult> ExportAsync(WorkflowDefinitionRecord record, CancellationToken cancellationToken = default)

Converts a stored definition to the format.

Parameters

Returns

The content, its media type and a file name.

ImportAsync(byte[], CancellationToken) method

Task<WorkflowSourceImportResult> ImportAsync(byte[] content, CancellationToken cancellationToken = default)

Converts content of the format to a canonical definition.

Parameters

Returns

The canonical definition, or the diagnostics of a failed conversion.

IWorkflowSourceFormatRegistry interface

public interface IWorkflowSourceFormatRegistry

Resolves converters by IWorkflowSourceFormatConverter.FormatId; used by the multi-format import / export endpoints to dispatch to the right converter.

GetAll() method

IReadOnlyCollection<IWorkflowSourceFormatConverter> GetAll()

Returns the converters, ordered by display name.

Returns

The converters.

GetRequired(string) method

IWorkflowSourceFormatConverter GetRequired(string formatId)

Finds a converter by format id, ignoring case.

Parameters

Returns

The converter.

Exceptions

TryGet(string) method

IWorkflowSourceFormatConverter? TryGet(string formatId)

Finds a converter by format id, ignoring case.

Parameters

Returns

The converter, or null.

IWorkflowSpecExecutionContext interface

public interface IWorkflowSpecExecutionContext

The execution context of a workflow, without its start request type.

Payload property

IReadOnlyDictionary<string, JsonElement> Payload { get; }

The payload being handled, such as a task completion.

PayloadValues property

WorkflowValueDictionary PayloadValues { get; }

The payload as a value dictionary; a missing key raises an error.

ResultValues property

IReadOnlyDictionary<string, JsonElement> ResultValues { get; }

The kept step results, by key; keys compare ignoring case.

StateValues property

WorkflowValueDictionary StateValues { get; }

The workflow state as a value dictionary; a missing key raises an error.

WorkflowName property

string WorkflowName { get; }

The workflow name.

WorkflowState property

Dictionary<string, JsonElement> WorkflowState { get; }

The workflow state, which steps change.

CompareValue(WorkflowValueSource, string, object) method

bool CompareValue(WorkflowValueSource source, string key, object? expectedValue)

Whether a payload or state value equals a value.

Parameters

Returns

Whether the values are equal.

GetOptionalResult<TResponse>(string) method

TResponse? GetOptionalResult<TResponse>(string resultKey)

Returns a kept result, or the default when none is kept under the key.

Type parameters

Parameters

Returns

The result, or the default.

GetRequiredResult<TResponse>(string) method

TResponse GetRequiredResult<TResponse>(string resultKey)

Returns a kept result.

Type parameters

Parameters

Returns

The result.

IWorkflowStateJsonPolicy interface

public interface IWorkflowStateJsonPolicy

Checks the workflow state JSON against the limits before it is stored.

Validate(string) method

void Validate(string stateJson)

Checks a state against the limits.

Parameters

Exceptions

IWorkflowWakeOutbox interface

public interface IWorkflowWakeOutbox

The outbox of wake notifications, for a driver whose dispatch mode is WorkflowSignalDriverDispatchMode.WakeOutbox.

EnqueueAsync(WorkflowSignalWakeNotification, CancellationToken) method

Task EnqueueAsync(WorkflowSignalWakeNotification notification, CancellationToken cancellationToken = default)

Writes a wake notification to the outbox.

Parameters

Returns

A task that completes when the notification is written.

IWorkflowWakeOutboxLease interface

public interface IWorkflowWakeOutboxLease : IAsyncDisposable

A claimed wake notification of the outbox.

ConsumerName property

string ConsumerName { get; }

The consumer that claimed it.

Notification property

WorkflowSignalWakeNotification Notification { get; }

The claimed notification.

AbandonAsync(CancellationToken) method

Task AbandonAsync(CancellationToken cancellationToken = default)

Releases the notification, so it can be claimed again.

Parameters

Returns

A task that completes when it is released.

CompleteAsync(CancellationToken) method

Task CompleteAsync(CancellationToken cancellationToken = default)

Removes the notification from the outbox.

Parameters

Returns

A task that completes when it is removed.

IWorkflowWakeOutboxReceiver interface

public interface IWorkflowWakeOutboxReceiver

Claims the wake notifications of the outbox.

ReceiveAsync(string, CancellationToken) method

Task<IWorkflowWakeOutboxLease?> ReceiveAsync(string consumerName, CancellationToken cancellationToken = default)

Claims one wake notification of the outbox for a consumer.

Parameters

Returns

The lease of the notification, or null when there is none.

NoopWorkflowExecutionHandler class

public sealed class NoopWorkflowExecutionHandler : IWorkflowExecutionHandler

A placeholder handler for registrations whose steps the engine runs from their definition.

NoopWorkflowExecutionHandler() constructor

public NoopWorkflowExecutionHandler()

Creates an instance of NoopWorkflowExecutionHandler.

CompleteTaskAsync(WorkflowTaskExecutionContext, CancellationToken) method

public Task<WorkflowTaskCompletionPlan> CompleteTaskAsync(WorkflowTaskExecutionContext context, CancellationToken cancellationToken = default)

Never runs.

Parameters

Returns

Never returns.

Exceptions

StartAsync(WorkflowStartExecutionContext, CancellationToken) method

public Task<WorkflowStartExecutionPlan> StartAsync(WorkflowStartExecutionContext context, CancellationToken cancellationToken = default)

Never runs.

Parameters

Returns

Never returns.

Exceptions

NullWorkflowActorRoleResolver class

public sealed class NullWorkflowActorRoleResolver : IWorkflowActorRoleResolver

Default no-op resolver that passes through client-supplied values. Used when no database-backed role resolution is configured.

NullWorkflowActorRoleResolver() constructor

public NullWorkflowActorRoleResolver()

Creates an instance of NullWorkflowActorRoleResolver.

ResolveActorId(string) method

public string ResolveActorId(string? clientActorId)

Returns the client’s actor id, or empty.

Parameters

Returns

The actor id.

ResolveActorRolesAsync(string, IReadOnlyCollection<string>, CancellationToken) method

public Task<IReadOnlyCollection<string>> ResolveActorRolesAsync(string actorId, IReadOnlyCollection<string>? clientRoles, CancellationToken cancellationToken = default)

Resolves user roles from a trusted source (database, identity provider). Falls back to clientRoles when no server-side context is available (e.g., during signal pump processing).

RabbitAddress class

public sealed class RabbitAddress

The address of a RabbitMQ call: the exchange and routing key the message is published to. A command-style peer also gets the command name it dispatches on, how the message frames it, and whether the call waits for a correlated reply; the reply queue and the reply timeout are transport configuration.

RabbitAddress(string, string, string, WorkflowRabbitCommandFraming, bool) constructor

public RabbitAddress(string exchange, string routingKey, string? command = null, WorkflowRabbitCommandFraming framing = Envelope, bool expectReply = true)

Creates the address. Without a command it is a publish with publisher confirms; with one, the call waits for the correlated reply unless expectReply is false.

Parameters

Exceptions

Command property

public WorkflowRabbitCommandDeclaration? Command { get; }

The command-style semantics, or null for a plain publish.

Exchange property

public string Exchange { get; }

The exchange.

RoutingKey property

public string RoutingKey { get; }

The routing key.

RequiredPayloadKeyCancellationCleanupPolicy class

public class RequiredPayloadKeyCancellationCleanupPolicy : IWorkflowCancellationCleanupPolicy

Starts the cleanup workflow only when the cleanup payload carries a non-empty value under a required key: without it there is nothing to clean up.

RequiredPayloadKeyCancellationCleanupPolicy(string) constructor

public RequiredPayloadKeyCancellationCleanupPolicy(string payloadKey)

Starts the cleanup workflow only when the cleanup payload carries a non-empty value under a required key: without it there is nothing to clean up.

PayloadKey property

public string PayloadKey { get; }

The key the cleanup payload must carry a value under.

ShouldStartCleanup(WorkflowCancelRequest) method

public bool ShouldStartCleanup(WorkflowCancelRequest request)

Whether cancelling starts the cleanup workflow of the request.

Parameters

Returns

Whether to start it.

WorkflowActivateTaskStepDefinition<TStartRequest> record

public sealed record WorkflowActivateTaskStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Opens a declared human task.

Parameters

WorkflowActivateTaskStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, IReadOnlyCollection<string>>) constructor

public WorkflowActivateTaskStepDefinition(string TaskName, Func<WorkflowSpecExecutionContext<TStartRequest>, IReadOnlyCollection<string>> RuntimeRolesFactory)

Opens a declared human task.

Parameters

RuntimeRolesExpression property

public WorkflowExpressionDefinition? RuntimeRolesExpression { get; init; }

The roles as an expression, for the canonical definition.

RuntimeRolesFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, IReadOnlyCollection<string>> RuntimeRolesFactory { get; init; }

Computes the roles that replace the task roles; when it yields no role, the task roles apply.

TaskName property

public string TaskName { get; init; }

The declared task to open.

WorkflowActivityAttempt record

public sealed record WorkflowActivityAttempt

One semantic attempt of a step, with its frozen request and how it completed.

WorkflowActivityAttempt() constructor

public WorkflowActivityAttempt()

Creates an instance of WorkflowActivityAttempt.

AttemptId property

public required string AttemptId { get; init; }

The attempt.

AttemptNumber property

public int AttemptNumber { get; init; }

The attempt number, from 1.

CanonicalRequestJson property

public required string CanonicalRequestJson { get; init; }

The canonical request, as JSON.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

CompletionDisposition property

public string? CompletionDisposition { get; init; }

How the completion was applied.

CompletionEventId property

public string? CompletionEventId { get; init; }

The completion event, once it arrived.

CompletionSha256 property

public string? CompletionSha256 { get; init; }

The SHA-256 of the completion.

ContractKind property

public required string ContractKind { get; init; }

The contract kind of the activity.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DeadlineAtUtc property

public DateTime DeadlineAtUtc { get; init; }

The deadline of the attempt, in UTC.

DispatchId property

public required string DispatchId { get; init; }

The dispatch.

ExpectedExecutionVersion property

public long ExpectedExecutionVersion { get; init; }

The execution version the step or attempt was created at.

HandlerBuildSha256 property

public required string HandlerBuildSha256 { get; init; }

The SHA-256 of the handler build.

PriorAttemptId property

public string? PriorAttemptId { get; init; }

The attempt this one follows.

PriorCompletionEventId property

public string? PriorCompletionEventId { get; init; }

The completion of the prior attempt.

ProviderGeneration property

public long? ProviderGeneration { get; init; }

The provider generation that answered.

ProviderReference property

public string? ProviderReference { get; init; }

The provider’s reference of the attempt.

RequestSha256 property

public required string RequestSha256 { get; init; }

The SHA-256 of the request.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the step.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The step execution.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityCancelEntry record

public sealed record WorkflowActivityCancelEntry

An activity cancel request waiting in, or delivered from, the cancel outbox.

WorkflowActivityCancelEntry() constructor

public WorkflowActivityCancelEntry()

Creates an instance of WorkflowActivityCancelEntry.

AttemptId property

public required string AttemptId { get; init; }

The attempt.

CancelFenceVersion property

public long CancelFenceVersion { get; init; }

The cancel fence of the request.

CancelId property

public required string CancelId { get; init; }

The cancel request.

CancelLane property

public required string CancelLane { get; init; }

The lane the cancel goes to.

CanonicalPayloadJson property

public required string CanonicalPayloadJson { get; init; }

The canonical payload, as JSON.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DeliveryAttempts property

public int DeliveryAttempts { get; init; }

The delivery attempts so far.

DeliveryState property

public required string DeliveryState { get; init; }

The delivery state: READY or PUBLISHED.

EventId property

public required string EventId { get; init; }

The cancel event.

PayloadSha256 property

public required string PayloadSha256 { get; init; }

The SHA-256 of the payload.

PublishedAtUtc property

public DateTime? PublishedAtUtc { get; init; }

When it was published, in UTC.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityCompletionEntry record

public sealed record WorkflowActivityCompletionEntry

A received activity completion and the disposition it was recorded with.

WorkflowActivityCompletionEntry() constructor

public WorkflowActivityCompletionEntry()

Creates an instance of WorkflowActivityCompletionEntry.

AppliedAtUtc property

public DateTime? AppliedAtUtc { get; init; }

When it was applied, in UTC.

AttemptId property

public required string AttemptId { get; init; }

The attempt.

CanonicalCompletionJson property

public required string CanonicalCompletionJson { get; init; }

The canonical completion, as JSON.

CompletionSha256 property

public required string CompletionSha256 { get; init; }

The SHA-256 of the completion.

Disposition property

public required string Disposition { get; init; }

How it was recorded.

EventId property

public required string EventId { get; init; }

The completion event.

ReceivedAtUtc property

public DateTime ReceivedAtUtc { get; init; }

When it was received, in UTC.

SafeCode property

public string? SafeCode { get; init; }

The safe code of a refused completion.

WorkflowExecutionId property

public string? WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityDispatchEntry record

public sealed record WorkflowActivityDispatchEntry

An activity dispatch request waiting in, or delivered from, the dispatch outbox.

WorkflowActivityDispatchEntry() constructor

public WorkflowActivityDispatchEntry()

Creates an instance of WorkflowActivityDispatchEntry.

AttemptId property

public required string AttemptId { get; init; }

The attempt.

CanonicalRequestJson property

public required string CanonicalRequestJson { get; init; }

The canonical request, as JSON.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DeliveryAttempts property

public int DeliveryAttempts { get; init; }

The delivery attempts so far.

DeliveryState property

public required string DeliveryState { get; init; }

The delivery state: READY or PUBLISHED.

DispatchId property

public required string DispatchId { get; init; }

The dispatch.

ExecuteLane property

public required string ExecuteLane { get; init; }

The lane the request goes to.

PublishedAtUtc property

public DateTime? PublishedAtUtc { get; init; }

When it was published, in UTC.

RequestSha256 property

public required string RequestSha256 { get; init; }

The SHA-256 of the request.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityEventAppend record

public sealed record WorkflowActivityEventAppend

An execution-history event to append. The store allocates its sequence from the execution’s next event sequence in the same write, in list order.

WorkflowActivityEventAppend() constructor

public WorkflowActivityEventAppend()

Creates an instance of WorkflowActivityEventAppend.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

EventId property

public required string EventId { get; init; }

The event.

EventSha256 property

public required string EventSha256 { get; init; }

The SHA-256 of the event.

EventType property

public required string EventType { get; init; }

The event type.

PayloadJson property

public required string PayloadJson { get; init; }

The event payload, as JSON.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityMapItemState record

public sealed record WorkflowActivityMapItemState

The status fields of a map item that a stop may skip.

WorkflowActivityMapItemState() constructor

public WorkflowActivityMapItemState()

Creates an instance of WorkflowActivityMapItemState.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

MapItemId property

public required string MapItemId { get; init; }

The map item.

Status property

public required string Status { get; init; }

The status.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowActivityMapItemStatusChange record

public sealed record WorkflowActivityMapItemStatusChange

A map item moved to a terminal status; applied only at WorkflowActivityMapItemStatusChange.ExpectedVersionNo.

WorkflowActivityMapItemStatusChange() constructor

public WorkflowActivityMapItemStatusChange()

Creates an instance of WorkflowActivityMapItemStatusChange.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

MapItemId property

public required string MapItemId { get; init; }

The map item.

Status property

public required string Status { get; init; }

The terminal status.

TerminalOutcome property

public string? TerminalOutcome { get; init; }

The final outcome of the item.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

WorkflowActivityMapState record

public sealed record WorkflowActivityMapState

The status fields of a map execution that a stop may fence.

WorkflowActivityMapState() constructor

public WorkflowActivityMapState()

Creates an instance of WorkflowActivityMapState.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

Status property

public required string Status { get; init; }

The status.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityMapStatusChange record

public sealed record WorkflowActivityMapStatusChange

A map execution moved to a terminal status; applied only at WorkflowActivityMapStatusChange.ExpectedVersionNo.

WorkflowActivityMapStatusChange() constructor

public WorkflowActivityMapStatusChange()

Creates an instance of WorkflowActivityMapStatusChange.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

Status property

public required string Status { get; init; }

The terminal status.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

WorkflowActivityRuntimeChange record

public sealed record WorkflowActivityRuntimeChange

A runtime-state version bump, applied only when the stored version still equals WorkflowActivityRuntimeChange.ExpectedVersion.

WorkflowActivityRuntimeChange() constructor

public WorkflowActivityRuntimeChange()

Creates an instance of WorkflowActivityRuntimeChange.

ExpectedVersion property

public long ExpectedVersion { get; init; }

The version the stored runtime state must have.

LastUpdatedOnUtc property

public DateTime LastUpdatedOnUtc { get; init; }

When it changed, in UTC.

RuntimeStatus property

public required string RuntimeStatus { get; init; }

The runtime status.

StateJson property

public string? StateJson { get; init; }

The new snapshot; null keeps the stored one.

Version property

public long Version { get; init; }

The new runtime-state version.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityRuntimeState record

public sealed record WorkflowActivityRuntimeState

The runtime-state fields the activity services read: the execution version and its snapshot.

WorkflowActivityRuntimeState() constructor

public WorkflowActivityRuntimeState()

Creates an instance of WorkflowActivityRuntimeState.

RuntimeProvider property

public required string RuntimeProvider { get; init; }

The runtime provider.

RuntimeStatus property

public required string RuntimeStatus { get; init; }

The runtime status.

StateJson property

public required string StateJson { get; init; }

The state snapshot, as JSON.

Version property

public long Version { get; init; }

The runtime-state version.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityStep record

public sealed record WorkflowActivityStep

One logical external-activity step: its binding, current attempt, retry and cancel fences.

WorkflowActivityStep() constructor

public WorkflowActivityStep()

Creates an instance of WorkflowActivityStep.

AbsoluteDeadlineAtUtc property

public DateTime? AbsoluteDeadlineAtUtc { get; init; }

The deadline over all attempts, in UTC.

CancelFenceVersion property

public long CancelFenceVersion { get; init; }

The cancel fence, raised by each cancel.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

ContractVersion property

public required string ContractVersion { get; init; }

The contract version of the activity.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

CurrentAttemptId property

public required string CurrentAttemptId { get; init; }

The current attempt.

DeadlineAtUtc property

public DateTime DeadlineAtUtc { get; init; }

The deadline of the current attempt, in UTC.

DestinationCode property

public required string DestinationCode { get; init; }

The destination of the activity.

ExpectedExecutionVersion property

public long ExpectedExecutionVersion { get; init; }

The execution version the step or attempt was created at.

FailureCategory property

public string? FailureCategory { get; init; }

The category of the last failure.

LogicalStepKey property

public required string LogicalStepKey { get; init; }

The step in the definition.

MapItemId property

public string? MapItemId { get; init; }

The map item the step runs for, when it runs in a map.

OperationCode property

public required string OperationCode { get; init; }

The operation of the activity.

ResultJson property

public string? ResultJson { get; init; }

The result, as JSON.

ResultSha256 property

public string? ResultSha256 { get; init; }

The SHA-256 of the result.

RetryAuthorizedBy property

public string? RetryAuthorizedBy { get; init; }

Who authorized a manual retry.

RetryNotBeforeAtUtc property

public DateTime? RetryNotBeforeAtUtc { get; init; }

The earliest time of the next retry, in UTC.

RetryPolicyJson property

public string? RetryPolicyJson { get; init; }

The retry policy, as JSON.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the step.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The step execution.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowActivityStepChange record

public sealed record WorkflowActivityStepChange

A changed step, written only when its stored version still equals WorkflowActivityStepChange.ExpectedVersionNo.

WorkflowActivityStepChange() constructor

public WorkflowActivityStepChange()

Creates an instance of WorkflowActivityStepChange.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

Step property

public required WorkflowActivityStep Step { get; init; }

The new step row.

WorkflowActivityStopTargetKind enum

public enum WorkflowActivityStopTargetKind

What a stop request targets.

ValueDescription
Execution = 0A whole execution.
Scope = 1A scope.
Step = 2One step.
Map = 3A map execution.

WorkflowAssignmentPermissionContext record

public sealed record WorkflowAssignmentPermissionContext

What a permission check knows about a task action.

WorkflowAssignmentPermissionContext() constructor

public WorkflowAssignmentPermissionContext()

Creates an instance of WorkflowAssignmentPermissionContext.

Action property

public required WorkflowTaskAction Action { get; init; }

The action.

ActorId property

public required string ActorId { get; init; }

Who acts.

ActorRoles property

public IReadOnlyCollection<string> ActorRoles { get; init; }

The roles of the actor.

CurrentAssignee property

public string? CurrentAssignee { get; init; }

The current assignee of the task.

EffectiveRoles property

public IReadOnlyCollection<string> EffectiveRoles { get; init; }

The roles that may work the task.

TargetRoles property

public IReadOnlyCollection<string> TargetRoles { get; init; }

The roles the task is assigned to, for WorkflowTaskAction.AssignRoles.

TargetUserId property

public string? TargetUserId { get; init; }

The user the task is assigned to, for WorkflowTaskAction.AssignOther.

WorkflowAssignmentPermissionDecision record

public sealed record WorkflowAssignmentPermissionDecision

The outcome of a permission check.

WorkflowAssignmentPermissionDecision() constructor

public WorkflowAssignmentPermissionDecision()

Creates an instance of WorkflowAssignmentPermissionDecision.

Allowed property

public required bool Allowed { get; init; }

Whether the action is allowed.

Reason property

public string? Reason { get; init; }

Why it is refused.

WorkflowBackendConfigurationExtensions class

public static class WorkflowBackendConfigurationExtensions

Reads the configured workflow backend.

GetWorkflowBackendProvider(IConfiguration) extension method

public static string GetWorkflowBackendProvider(this IConfiguration configuration)

Returns WorkflowBackend:Provider; Postgres when not set.

Parameters

Returns

The backend name.

WorkflowBackendNames class

public static class WorkflowBackendNames

The names of the durable stores, for WorkflowBackend:Provider.

Mongo constant

public const string Mongo = "Mongo"

The MongoDB store.

Oracle constant

public const string Oracle = "Oracle"

The name reserved for an Oracle store, which is not available in this release.

Postgres constant

public const string Postgres = "Postgres"

The PostgreSQL store.

WorkflowBackendOptions class

public sealed class WorkflowBackendOptions

The workflow store the host uses (WorkflowBackend).

WorkflowBackendOptions() constructor

public WorkflowBackendOptions()

Creates an instance of WorkflowBackendOptions.

SectionName constant

public const string SectionName = "WorkflowBackend"

The configuration section the options bind from: WorkflowBackend.

Provider property

public string Provider { get; set; }

The store: Postgres (the default, also when unset) or Mongo. The store package registers itself only when it is the selected provider.

WorkflowBackendRegistrationMarker record

public sealed record WorkflowBackendRegistrationMarker : IWorkflowBackendRegistrationMarker

The registration marker of a store library.

Parameters

WorkflowBackendRegistrationMarker(string) constructor

public WorkflowBackendRegistrationMarker(string BackendName)

The registration marker of a store library.

Parameters

BackendName property

public string BackendName { get; init; }

The backend name.

WorkflowBusinessIdAttribute class

public sealed class WorkflowBusinessIdAttribute : Attribute

Marks the property of a start request whose value is the business reference key of the instance. At most one property of a start request carries it; registration fails when two do.

Applies to: Property. Allow multiple: no. Inherited: yes.

WorkflowBusinessIdAttribute() constructor

public WorkflowBusinessIdAttribute()

Creates an instance of WorkflowBusinessIdAttribute.

WorkflowBusinessReferenceAssignmentStepDefinition<TStartRequest> record

public sealed record WorkflowBusinessReferenceAssignmentStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Sets the business reference of the instance.

Parameters

WorkflowBusinessReferenceAssignmentStepDefinition(Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>) constructor

public WorkflowBusinessReferenceAssignmentStepDefinition(Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?> BusinessReferenceFactory)

Sets the business reference of the instance.

Parameters

BusinessReferenceDeclaration property

public WorkflowBusinessReferenceDeclaration? BusinessReferenceDeclaration { get; init; }

The business reference as an expression, for the canonical definition.

BusinessReferenceFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?> BusinessReferenceFactory { get; init; }

Computes the business reference.

WorkflowBusinessReferenceExtensions class

public static class WorkflowBusinessReferenceExtensions

Builds, normalizes and compares business references.

MaxBusinessReferenceKeyLength constant

public const int MaxBusinessReferenceKeyLength = 128

The longest business reference key; a longer one is shortened with a hash.

BuildCanonicalBusinessReferenceKey(IDictionary<string, object>) method

public static string? BuildCanonicalBusinessReferenceKey(IDictionary<string, object?> parts)

Builds a key from parts: name=value pairs ordered by name, URI-escaped and joined with |.

Parameters

Returns

The key, or null when no part has a value.

ConvertBusinessReferenceValueToString(object) method

public static string? ConvertBusinessReferenceValueToString(object? value)

Writes a part value as invariant text.

Parameters

Returns

The text, or null for null.

MatchesBusinessReferenceFilter(WorkflowBusinessReference, string, IDictionary<string, object>) extension method

public static bool MatchesBusinessReferenceFilter(this WorkflowBusinessReference? businessReference, string? key, IDictionary<string, object?> parts)

Whether a reference matches a filter: the same key when one is given, and the same text value for every part given.

Parameters

Returns

Whether it matches.

NormalizeBusinessReference(WorkflowBusinessReference) method

public static WorkflowBusinessReference? NormalizeBusinessReference(WorkflowBusinessReference? businessReference)

Normalizes a reference: drops parts without a name, builds the key from the parts when it is not set, and shortens a long key.

Parameters

Returns

The normalized reference, or null when it has neither key nor part.

NormalizeBusinessReferenceKey(string) method

public static string? NormalizeBusinessReferenceKey(string? key)

Shortens a key longer than the maximum with a hash.

Parameters

Returns

The key, or null when it is empty.

ToBusinessReference(IDictionary<string, object>) extension method

public static WorkflowBusinessReference? ToBusinessReference(this IDictionary<string, object?> value)

Reads a reference from a dictionary with key and parts.

Parameters

Returns

The normalized reference, or null.

ToObjectDictionary(WorkflowBusinessReference) extension method

public static IDictionary<string, object?> ToObjectDictionary(this WorkflowBusinessReference? businessReference)

Writes a reference as a dictionary with key and parts.

Parameters

Returns

The dictionary; empty for none.

WorkflowBusinessReferencePartAttribute class

public sealed class WorkflowBusinessReferencePartAttribute : Attribute

Marks a property of a start request as a part of the business reference of the instance. Without a WorkflowBusinessIdAttributeproperty, the key is built from the parts. Part names must be unique, ignoring case.

Applies to: Property. Allow multiple: no. Inherited: yes.

WorkflowBusinessReferencePartAttribute(string) constructor

public WorkflowBusinessReferencePartAttribute(string? partName = null)

Marks the property as a business reference part.

Parameters

PartName property

public string? PartName { get; }

The part name, or null to use the property name.

WorkflowCaller record

public sealed record WorkflowCaller

A workflow’s caller: the user its service calls go as, with the roles the caller’s token carried.

Parameters

WorkflowCaller(string, IReadOnlyList<string>) constructor

public WorkflowCaller(string UserId, IReadOnlyList<string>? Roles)

A workflow’s caller: the user its service calls go as, with the roles the caller’s token carried.

Parameters

Roles property

public IReadOnlyList<string>? Roles { get; init; }

The roles of the caller’s token, when known.

UserId property

public string UserId { get; init; }

The user.

WorkflowCallerSnapshot class

public static class WorkflowCallerSnapshot

Reads and writes the caller kept in an engine runtime snapshot and carried in signal payloads.

SignalPayloadKey constant

public const string SignalPayloadKey = "caller"

Signal payload key that carries the caller to a continuation.

Read(JsonElement) method

public static WorkflowCaller? Read(JsonElement element)

Reads a caller from a signal payload entry.

Read(string) method

public static WorkflowCaller? Read(string? runtimeStateJson)

Reads the caller kept in an engine runtime snapshot.

ToSignalPayload(WorkflowCaller) method

public static JsonElement ToSignalPayload(WorkflowCaller caller)

Writes a caller as a signal payload entry.

Parameters

Returns

The payload entry.

Write(string, WorkflowCaller) method

public static string Write(string runtimeStateJson, WorkflowCaller? caller)

Keeps the caller in an engine runtime snapshot; a snapshot without a caller is returned unchanged.

WorkflowCancellationCleanupPolicyServiceCollectionExtensions class

public static class WorkflowCancellationCleanupPolicyServiceCollectionExtensions

Registers the rule that decides whether cancelling an instance starts its cleanup workflow.

AddWorkflowCancellationCleanupPolicy<TPolicy>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowCancellationCleanupPolicy<TPolicy>(this IServiceCollection services) where TPolicy : class, IWorkflowCancellationCleanupPolicy

Replaces the registered IWorkflowCancellationCleanupPolicywith TPolicy, a singleton.

Type parameters

Parameters

Returns

The same service collection, for chaining.

WorkflowCanonicalCompilationResult record

public sealed record WorkflowCanonicalCompilationResult

The outcome of compiling a C# workflow to a canonical definition.

WorkflowCanonicalCompilationResult() constructor

public WorkflowCanonicalCompilationResult()

Creates an instance of WorkflowCanonicalCompilationResult.

Definition property

public WorkflowCanonicalDefinition? Definition { get; init; }

The canonical definition, when the compilation succeeded.

Diagnostics property

public IReadOnlyCollection<WorkflowCanonicalizationDiagnostic> Diagnostics { get; init; }

Why parts of the workflow have no canonical form.

Succeeded property

public bool Succeeded { get; }

Whether the compilation gave a definition without diagnostics.

WorkflowName property

public required string WorkflowName { get; init; }

The workflow name.

WorkflowVersion property

public required string WorkflowVersion { get; init; }

The workflow version.

WorkflowCanonicalDefinitionCompiler class

public static class WorkflowCanonicalDefinitionCompiler

Compiles C# workflows to canonical definitions at runtime.

Compile<TStartRequest>(IDeclarativeWorkflow<TStartRequest>, IWorkflowFunctionCatalog) method

public static WorkflowCanonicalCompilationResult Compile<TStartRequest>(IDeclarativeWorkflow<TStartRequest> workflow, IWorkflowFunctionCatalog? functionCatalog = null) where TStartRequest : class

Compiles a workflow. A delegate step or condition has no canonical form and gives a diagnostic instead.

Type parameters

Parameters

Returns

The definition, or the diagnostics.

WorkflowCanonicalDefinitionValidator class

public static class WorkflowCanonicalDefinitionValidator

Validates canonical definitions and their parts (WFVAL codes).

Validate(WorkflowCanonicalDefinition, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) method

public static WorkflowCanonicalValidationResult Validate(WorkflowCanonicalDefinition definition, IWorkflowFunctionCatalog? functionCatalog = null, IWorkflowExternalActivityRegistry? externalActivityRegistry = null)

Validates a definition.

Parameters

Returns

The findings.

ValidateBusinessReference(WorkflowBusinessReferenceDeclaration, IWorkflowFunctionCatalog) method

public static WorkflowCanonicalValidationResult ValidateBusinessReference(WorkflowBusinessReferenceDeclaration businessReference, IWorkflowFunctionCatalog? functionCatalog = null)

Validates a business reference declaration.

Parameters

Returns

The findings.

ValidateExpression(WorkflowExpressionDefinition, IWorkflowFunctionCatalog) method

public static WorkflowCanonicalValidationResult ValidateExpression(WorkflowExpressionDefinition expression, IWorkflowFunctionCatalog? functionCatalog = null)

Validates an expression.

Parameters

Returns

The findings.

ValidateTask(WorkflowTaskDeclaration, IWorkflowFunctionCatalog) method

public static WorkflowCanonicalValidationResult ValidateTask(WorkflowTaskDeclaration task, IWorkflowFunctionCatalog? functionCatalog = null)

Validates a task declaration.

Parameters

Returns

The findings.

WorkflowCanonicalEvaluationContext record

public sealed record WorkflowCanonicalEvaluationContext

What a canonical expression reads: the roots of its paths, and the function runtime.

WorkflowCanonicalEvaluationContext() constructor

public WorkflowCanonicalEvaluationContext()

Creates an instance of WorkflowCanonicalEvaluationContext.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference (businessReference).

FunctionRuntime property

public IWorkflowFunctionRuntime? FunctionRuntime { get; init; }

Runs the expression functions.

Payload property

public JsonElement? Payload { get; init; }

The payload being handled (payload).

Result property

public JsonElement? Result { get; init; }

The kept step results (result).

Start property

public JsonElement? Start { get; init; }

The start request (start).

State property

public JsonElement? State { get; init; }

The workflow state (state).

ForResult(JsonElement, IWorkflowFunctionRuntime) method

public static WorkflowCanonicalEvaluationContext ForResult(JsonElement result, IWorkflowFunctionRuntime? functionRuntime = null)

A context with only a result.

Parameters

Returns

The evaluation context.

ForStartRequest<TStartRequest>(TStartRequest, IWorkflowFunctionRuntime) method

public static WorkflowCanonicalEvaluationContext ForStartRequest<TStartRequest>(TStartRequest startRequest, IWorkflowFunctionRuntime? functionRuntime = null)

A context with only the start request.

Type parameters

Parameters

Returns

The evaluation context.

ForState(IReadOnlyDictionary<string, JsonElement>, IReadOnlyDictionary<string, JsonElement>, WorkflowBusinessReference, IWorkflowFunctionRuntime) method

public static WorkflowCanonicalEvaluationContext ForState(IReadOnlyDictionary<string, JsonElement> state, IReadOnlyDictionary<string, JsonElement>? results = null, WorkflowBusinessReference? businessReference = null, IWorkflowFunctionRuntime? functionRuntime = null)

A context with a state and, optionally, results and a business reference.

Parameters

Returns

The evaluation context.

From<TStartRequest>(WorkflowSpecExecutionContext<TStartRequest>) method

public static WorkflowCanonicalEvaluationContext From<TStartRequest>(WorkflowSpecExecutionContext<TStartRequest> context) where TStartRequest : class

The context of an execution context: its start request, state, payload, results and business reference.

Type parameters

Parameters

Returns

The evaluation context.

WorkflowCanonicalExpressionRuntime class

public static class WorkflowCanonicalExpressionRuntime

Evaluates canonical expressions.

Evaluate(WorkflowExpressionDefinition, WorkflowCanonicalEvaluationContext) method

public static object? Evaluate(WorkflowExpressionDefinition expression, WorkflowCanonicalEvaluationContext context)

Evaluates an expression.

Parameters

Returns

The value.

Evaluate<TStartRequest>(WorkflowExpressionDefinition, WorkflowSpecExecutionContext<TStartRequest>) method

public static object? Evaluate<TStartRequest>(WorkflowExpressionDefinition expression, WorkflowSpecExecutionContext<TStartRequest> context) where TStartRequest : class

Evaluates an expression in an execution context.

Type parameters

Parameters

Returns

The value.

EvaluateBusinessReference(WorkflowBusinessReferenceDeclaration, WorkflowCanonicalEvaluationContext) method

public static WorkflowBusinessReference EvaluateBusinessReference(WorkflowBusinessReferenceDeclaration declaration, WorkflowCanonicalEvaluationContext context)

Evaluates a business reference declaration.

Parameters

Returns

The business reference.

EvaluateBusinessReference<TStartRequest>(WorkflowBusinessReferenceDeclaration, WorkflowSpecExecutionContext<TStartRequest>) method

public static WorkflowBusinessReference EvaluateBusinessReference<TStartRequest>(WorkflowBusinessReferenceDeclaration declaration, WorkflowSpecExecutionContext<TStartRequest> context) where TStartRequest : class

Evaluates a business reference declaration in an execution context.

Type parameters

Parameters

Returns

The business reference.

WorkflowCanonicalImportValidationResult record

public sealed record WorkflowCanonicalImportValidationResult

The outcome of validating a canonical definition for import.

WorkflowCanonicalImportValidationResult() constructor

public WorkflowCanonicalImportValidationResult()

Creates an instance of WorkflowCanonicalImportValidationResult.

Definition property

public WorkflowCanonicalDefinition? Definition { get; init; }

The definition, when the JSON could be read.

ModuleErrors property

public IReadOnlyCollection<WorkflowCanonicalValidationError> ModuleErrors { get; init; }

The findings about required modules that are missing or too old.

SchemaErrors property

public IReadOnlyCollection<WorkflowCanonicalValidationError> SchemaErrors { get; init; }

The JSON and schema findings.

SemanticErrors property

public IReadOnlyCollection<WorkflowCanonicalValidationError> SemanticErrors { get; init; }

The semantic findings.

Succeeded property

public bool Succeeded { get; }

Whether the definition was read and has no finding.

WorkflowCanonicalImportValidator class

public static class WorkflowCanonicalImportValidator

Validates canonical definitions before an import.

Validate(string, IReadOnlyCollection<WorkflowInstalledModule>, IWorkflowFunctionCatalog, IWorkflowExternalActivityRegistry) method

public static WorkflowCanonicalImportValidationResult Validate(string json, IReadOnlyCollection<WorkflowInstalledModule>? installedModules = null, IWorkflowFunctionCatalog? functionCatalog = null, IWorkflowExternalActivityRegistry? externalActivityRegistry = null)

Reads and validates a canonical definition: its JSON, its semantics and, when the installed modules are given, its module requirements.

Parameters

Returns

The outcome.

Exceptions

WorkflowCanonicalResultReferences class

public static class WorkflowCanonicalResultReferences

Finds the step results a canonical definition reads through result.<key> paths. The runtime keeps only those across waits, so large replies no later step reads do not grow the persisted state.

CollectReferencedKeys(WorkflowCanonicalDefinition) method

public static IReadOnlySet<string>? CollectReferencedKeys(WorkflowCanonicalDefinition definition)

Collects the result keys the definition’s expressions read, ignoring case; null when an expression reads the whole result root.

Parameters

Returns

The keys, or null.

GetReferencedKeys(WorkflowCanonicalDefinition) method

public static IReadOnlySet<string>? GetReferencedKeys(WorkflowCanonicalDefinition definition)

The referenced result keys (case-insensitive), or null when an expression reads the whole result root, in which case every result must be kept. Cached per definition instance.

WorkflowCanonicalTemplateBindings class

public sealed class WorkflowCanonicalTemplateBindings

The token values of a canonical definition template.

WorkflowCanonicalTemplateBindings() constructor

public WorkflowCanonicalTemplateBindings()

Creates an instance of WorkflowCanonicalTemplateBindings.

AddJson<TValue>(string, TValue) method

public WorkflowCanonicalTemplateBindings AddJson<TValue>(string token, TValue value)

Binds a token to a value, written as canonical JSON.

Type parameters

Parameters

Returns

The same bindings.

AddString(string, string) method

public WorkflowCanonicalTemplateBindings AddString(string token, string value)

Binds a token to a string, written as a JSON string.

Parameters

Returns

The same bindings.

Build() method

public IReadOnlyDictionary<string, string> Build()

Returns the bindings.

Returns

The token values, as JSON text.

WorkflowCanonicalTemplateLoader class

public static class WorkflowCanonicalTemplateLoader

Loads canonical definitions from embedded JSON templates whose {{token}} placeholders take bound JSON values.

LoadEmbeddedDefinition(Assembly, string, IReadOnlyDictionary<string, string>) method

public static WorkflowCanonicalDefinition LoadEmbeddedDefinition(Assembly assembly, string resourceName, IReadOnlyDictionary<string, string> bindings)

Loads and renders a definition template.

Parameters

Returns

The definition.

LoadEmbeddedFragment<TValue>(Assembly, string, IReadOnlyDictionary<string, string>) method

public static TValue LoadEmbeddedFragment<TValue>(Assembly assembly, string resourceName, IReadOnlyDictionary<string, string> bindings)

Loads and renders a template of a part of a definition.

Type parameters

Parameters

Returns

The part.

LoadEmbeddedText(Assembly, string) method

public static string LoadEmbeddedText(Assembly assembly, string resourceName)

Reads an embedded resource as text.

Parameters

Returns

The text.

Exceptions

Render(string, IReadOnlyDictionary<string, string>) method

public static string Render(string template, IReadOnlyDictionary<string, string> bindings)

Replaces every {{token}} of a template with its bound value.

Parameters

Returns

The rendered text.

WorkflowCanonicalValidationError record

public sealed record WorkflowCanonicalValidationError

A finding of the canonical definition validation.

WorkflowCanonicalValidationError() constructor

public WorkflowCanonicalValidationError()

Creates an instance of WorkflowCanonicalValidationError.

Code property

public required string Code { get; init; }

The finding code.

Message property

public required string Message { get; init; }

The message.

Path property

public required string Path { get; init; }

The JSON path of the element.

WorkflowCanonicalValidationResult record

public sealed record WorkflowCanonicalValidationResult

The outcome of a canonical definition validation.

WorkflowCanonicalValidationResult() constructor

public WorkflowCanonicalValidationResult()

Creates an instance of WorkflowCanonicalValidationResult.

Errors property

public IReadOnlyCollection<WorkflowCanonicalValidationError> Errors { get; init; }

The findings.

Succeeded property

public bool Succeeded { get; }

Whether there is no finding.

WorkflowCanonicalizationDiagnostic record

public sealed record WorkflowCanonicalizationDiagnostic

Why a part of a C# workflow has no canonical form.

WorkflowCanonicalizationDiagnostic() constructor

public WorkflowCanonicalizationDiagnostic()

Creates an instance of WorkflowCanonicalizationDiagnostic.

Code property

public required string Code { get; init; }

The diagnostic code.

Message property

public required string Message { get; init; }

The message.

Path property

public required string Path { get; init; }

The path of the part.

WorkflowChildFamilyRetention class

public static class WorkflowChildFamilyRetention

The retention rule for executions joined by child links. A child family is every execution reachable from another through links, parents and children at any depth. Retention reclaims a family as one unit: only when every execution in it that still has an instance is eligible on its own (past its purge time, not under legal hold or HOLD_ALL, no READY outbox row) and every link in it is finished (completed or canceled). One open, held or locked member, or one unfinished link, keeps the whole family, links included. A member without an instance (a child canceled before it started) does not hold its family back. The backends call this with the instances their eligibility query selected and delete the links of the families it keeps.

CanceledLinkStatus constant

public const string CanceledLinkStatus = "CANCELED"

The child was canceled (ConstantsClass.ChildCanceled).

CompletedLinkStatus constant

public const string CompletedLinkStatus = "COMPLETED"

The child completed and its result reached the parent (ConstantsClass.ChildCompleted).

IsFinished(string) method

public static bool IsFinished(string? status)

A finished link changes no more: its child completed or was canceled.

SelectReclaimableAsync(IReadOnlyCollection<string>, Func<IReadOnlyCollection<string>, CancellationToken, Task<IReadOnlyCollection<WorkflowChildLinkRetentionRow>>>, Func<IReadOnlyCollection<string>, CancellationToken, Task<IReadOnlyCollection<string>>>, CancellationToken) method

public static Task<IReadOnlyList<string>> SelectReclaimableAsync(IReadOnlyCollection<string> eligibleExecutionIds, Func<IReadOnlyCollection<string>, CancellationToken, Task<IReadOnlyCollection<WorkflowChildLinkRetentionRow>>> readLinks, Func<IReadOnlyCollection<string>, CancellationToken, Task<IReadOnlyCollection<string>>> readExistingInstanceIds, CancellationToken cancellationToken = default)

The executions of eligibleExecutionIds that retention may reclaim, in their input order: those in no link, and those whose whole child family qualifies. readLinks returns every link that names one of the given executions as parent or child; readExistingInstanceIds returns which of the given executions still have an instance.

public sealed record WorkflowChildLink

The durable link between a parent step and the child workflow execution it started.

public WorkflowChildLink()

Creates an instance of WorkflowChildLink.

ChildDefinitionCode property

public required string ChildDefinitionCode { get; init; }

The child workflow.

ChildDefinitionVersion property

public required string ChildDefinitionVersion { get; init; }

The child workflow version.

ChildWorkflowExecutionId property

public required string ChildWorkflowExecutionId { get; init; }

The child execution.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When the link completed, in UTC.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the link was created, in UTC.

LinkId property

public required string LinkId { get; init; }

The link identifier.

ParentScopeExecutionId property

public required string ParentScopeExecutionId { get; init; }

The parent scope.

ParentStepExecutionId property

public required string ParentStepExecutionId { get; init; }

The parent step that runs the child.

ParentWorkflowExecutionId property

public required string ParentWorkflowExecutionId { get; init; }

The parent execution.

ResultDescriptorJson property

public string? ResultDescriptorJson { get; init; }

The child result descriptor, as JSON, once it completed.

ResultSha256 property

public string? ResultSha256 { get; init; }

The SHA-256 of the child result.

StartRequestSha256 property

public required string StartRequestSha256 { get; init; }

The SHA-256 of the child start request.

Status property

public required string Status { get; init; }

The link status.

VersionNo property

public required long VersionNo { get; init; }

The record version, raised by each change.

WorkflowChildLinkRetentionRow record

public sealed record WorkflowChildLinkRetentionRow

One parent-to-child execution link, as the retention pass reads it.

Parameters

WorkflowChildLinkRetentionRow(string, string, string, string) constructor

public WorkflowChildLinkRetentionRow(string LinkId, string ParentWorkflowExecutionId, string ChildWorkflowExecutionId, string Status)

One parent-to-child execution link, as the retention pass reads it.

Parameters

ChildWorkflowExecutionId property

public string ChildWorkflowExecutionId { get; init; }

The child execution.

LinkId property

public string LinkId { get; init; }

The link.

ParentWorkflowExecutionId property

public string ParentWorkflowExecutionId { get; init; }

The parent execution.

Status property

public string Status { get; init; }

The link status.

WorkflowCompleteStepDefinition<TStartRequest> record

public sealed record WorkflowCompleteStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Completes the instance.

WorkflowCompleteStepDefinition() constructor

public WorkflowCompleteStepDefinition()

Completes the instance.

WorkflowConditionDefinition<TStartRequest> class

public abstract class WorkflowConditionDefinition<TStartRequest> where TStartRequest : class

A condition of a decision.

WorkflowConditionDefinition(string) constructor

protected WorkflowConditionDefinition(string displayName)

Creates a condition.

Parameters

CanonicalExpression property

public virtual WorkflowExpressionDefinition? CanonicalExpression { get; }

The condition as an expression, for the canonical definition; none for a delegate.

DisplayName property

public string DisplayName { get; }

The label of the decision in diagrams.

Evaluate(WorkflowSpecExecutionContext<TStartRequest>) method

public abstract bool Evaluate(WorkflowSpecExecutionContext<TStartRequest> context)

Evaluates the condition.

Parameters

Returns

Whether it holds.

WorkflowConditionalStepDefinition<TStartRequest> record

public sealed record WorkflowConditionalStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Branches on a condition.

Parameters

WorkflowConditionalStepDefinition(WorkflowConditionDefinition<TStartRequest>, WorkflowStepSequence<TStartRequest>, WorkflowStepSequence<TStartRequest>) constructor

public WorkflowConditionalStepDefinition(WorkflowConditionDefinition<TStartRequest> Condition, WorkflowStepSequence<TStartRequest> WhenTrue, WorkflowStepSequence<TStartRequest> WhenElse)

Branches on a condition.

Parameters

Condition property

public WorkflowConditionDefinition<TStartRequest> Condition { get; init; }

The condition.

WhenElse property

public WorkflowStepSequence<TStartRequest> WhenElse { get; init; }

The steps to run otherwise.

WhenTrue property

public WorkflowStepSequence<TStartRequest> WhenTrue { get; init; }

The steps to run when the condition holds.

WorkflowConsoleAttemptRecord record

public sealed record WorkflowConsoleAttemptRecord

An attempt of an external activity step, as the console returns it.

WorkflowConsoleAttemptRecord() constructor

public WorkflowConsoleAttemptRecord()

Creates an instance of WorkflowConsoleAttemptRecord.

AttemptId property

public required string AttemptId { get; init; }

The attempt.

AttemptNumber property

public int AttemptNumber { get; init; }

The attempt number, from 1.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

CompletionDisposition property

public string? CompletionDisposition { get; init; }

How the completion was applied.

CompletionEventId property

public string? CompletionEventId { get; init; }

The completion event, once it arrived.

CompletionSha256 property

public string? CompletionSha256 { get; init; }

The SHA-256 of the completion.

ContractKind property

public required string ContractKind { get; init; }

The contract kind of the activity.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DeadlineAtUtc property

public DateTime DeadlineAtUtc { get; init; }

The deadline of the attempt, in UTC.

DispatchId property

public required string DispatchId { get; init; }

The dispatch of the attempt.

HandlerBuildSha256 property

public required string HandlerBuildSha256 { get; init; }

The SHA-256 of the handler build.

PriorAttemptId property

public string? PriorAttemptId { get; init; }

The attempt this one follows.

PriorCompletionEventId property

public string? PriorCompletionEventId { get; init; }

The completion of the prior attempt.

ProviderGeneration property

public long? ProviderGeneration { get; init; }

The provider generation that answered.

RequestSha256 property

public required string RequestSha256 { get; init; }

The SHA-256 of the request.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the step.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The step execution.

WorkflowConsoleDeliveryRecord record

public sealed record WorkflowConsoleDeliveryRecord

One activity delivery: a dispatch (DISPATCH, its delivery state, created and published times) or a completion (COMPLETION, its disposition, received and applied times).

WorkflowConsoleDeliveryRecord() constructor

public WorkflowConsoleDeliveryRecord()

Creates an instance of WorkflowConsoleDeliveryRecord.

AppliedAtUtc property

public DateTime? AppliedAtUtc { get; init; }

When the dispatch was published or the completion applied, in UTC.

DeliveryState property

public required string DeliveryState { get; init; }

The delivery state of a dispatch, or the disposition of a completion.

Id property

public required string Id { get; init; }

The dispatch or completion identifier.

Kind property

public required string Kind { get; init; }

DISPATCH or COMPLETION.

OccurredAtUtc property

public DateTime OccurredAtUtc { get; init; }

When the dispatch was created or the completion received, in UTC.

WorkflowConsoleExecutionRecord record

public sealed record WorkflowConsoleExecutionRecord

An execution as the console reads it: the instance projection’s identity, status, state and history position.

WorkflowConsoleExecutionRecord() constructor

public WorkflowConsoleExecutionRecord()

Creates an instance of WorkflowConsoleExecutionRecord.

CompletedOnUtc property

public DateTime? CompletedOnUtc { get; init; }

When it completed, in UTC.

CreatedOnUtc property

public DateTime CreatedOnUtc { get; init; }

When the execution started, in UTC.

HistoryFloorSequence property

public long HistoryFloorSequence { get; init; }

The first history sequence still kept.

NextEventSequence property

public long NextEventSequence { get; init; }

The sequence of the next history event.

StateJson property

public required string StateJson { get; init; }

The workflow state, as JSON.

Status property

public required string Status { get; init; }

The status.

WorkflowInstanceId property

public required string WorkflowInstanceId { get; init; }

The execution (workflow instance).

WorkflowName property

public required string WorkflowName { get; init; }

The workflow name.

WorkflowVersion property

public required string WorkflowVersion { get; init; }

The workflow version.

WorkflowConsoleMapItemRecord record

public sealed record WorkflowConsoleMapItemRecord

A map item row, as the console returns it.

WorkflowConsoleMapItemRecord() constructor

public WorkflowConsoleMapItemRecord()

Creates an instance of WorkflowConsoleMapItemRecord.

ItemKey property

public required string ItemKey { get; init; }

The item key.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

MapItemId property

public required string MapItemId { get; init; }

The map item.

Ordinal property

public int Ordinal { get; init; }

The position of the item in the collection.

Status property

public required string Status { get; init; }

The status.

TerminalOutcome property

public string? TerminalOutcome { get; init; }

The final outcome, once the item finished.

WorkflowConsoleMapRecord record

public sealed record WorkflowConsoleMapRecord

A map execution row. The console returns it as is, so the property order is the response shape.

WorkflowConsoleMapRecord() constructor

public WorkflowConsoleMapRecord()

Creates an instance of WorkflowConsoleMapRecord.

AbsoluteDeadlineAtUtc property

public DateTime? AbsoluteDeadlineAtUtc { get; init; }

The deadline of the map, in UTC.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

ExecutionPlanJson property

public required string ExecutionPlanJson { get; init; }

The map plan, as JSON.

ExecutionPlanSha256 property

public required string ExecutionPlanSha256 { get; init; }

The SHA-256 of the map plan.

FailurePolicy property

public required string FailurePolicy { get; init; }

The failure policy.

FanInPolicy property

public required string FanInPolicy { get; init; }

The fan-in policy.

GlobalActivityClass property

public string? GlobalActivityClass { get; init; }

The class of activities whose concurrency is limited across all maps.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

MaxAggregateStateBytes property

public int MaxAggregateStateBytes { get; init; }

The size limit of the collected results, in bytes.

MaxConcurrency property

public int MaxConcurrency { get; init; }

The items in flight at once.

MaxItems property

public int MaxItems { get; init; }

The items allowed.

MinimumSucceeded property

public int? MinimumSucceeded { get; init; }

The items that must succeed under MIN_SUCCEEDED.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the map.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The map step.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution it belongs to.

WorkflowConsoleScopeRecord record

public sealed record WorkflowConsoleScopeRecord

A scope execution row. The console returns it as is, so the property order is the response shape.

WorkflowConsoleScopeRecord() constructor

public WorkflowConsoleScopeRecord()

Creates an instance of WorkflowConsoleScopeRecord.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

ParentScopeExecutionId property

public string? ParentScopeExecutionId { get; init; }

The scope that contains it.

ScopeCode property

public required string ScopeCode { get; init; }

The scope code.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope execution.

ScopeVersion property

public required string ScopeVersion { get; init; }

The scope version.

Status property

public required string Status { get; init; }

The status.

TagsJson property

public required string TagsJson { get; init; }

The scope tags, as JSON.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution it belongs to.

WorkflowConsoleStepRecord record

public sealed record WorkflowConsoleStepRecord

An external activity step row, as the console returns it.

WorkflowConsoleStepRecord() constructor

public WorkflowConsoleStepRecord()

Creates an instance of WorkflowConsoleStepRecord.

AbsoluteDeadlineAtUtc property

public DateTime? AbsoluteDeadlineAtUtc { get; init; }

The deadline over all attempts, in UTC.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

ContractVersion property

public required string ContractVersion { get; init; }

The contract version of the activity.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

CurrentAttemptId property

public required string CurrentAttemptId { get; init; }

The current attempt.

DeadlineAtUtc property

public DateTime DeadlineAtUtc { get; init; }

The deadline of the current attempt, in UTC.

DestinationCode property

public required string DestinationCode { get; init; }

The destination of the activity.

FailureCategory property

public string? FailureCategory { get; init; }

The category of the last failure.

LogicalStepKey property

public required string LogicalStepKey { get; init; }

The step in the definition.

OperationCode property

public required string OperationCode { get; init; }

The operation of the activity.

ResultSha256 property

public string? ResultSha256 { get; init; }

The SHA-256 of the result.

RetryNotBeforeAtUtc property

public DateTime? RetryNotBeforeAtUtc { get; init; }

The earliest time of the next retry, in UTC.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the step.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The step execution.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

WorkflowContentHasher class

public static class WorkflowContentHasher

Computes a deterministic content hash for canonical workflow definitions. Used to detect whether a definition has changed across imports.

ComputeHash(string) method

public static string ComputeHash(string canonicalDefinitionJson)

Computes a SHA-256 hash of the canonical definition JSON. The JSON is normalized to UTF-8 bytes before hashing. Returns a lowercase hex string (64 characters).

WorkflowContinuationLineage record

public sealed record WorkflowContinuationLineage

A provider continuation an attempt left behind, consumed by the next attempt or revoked by a cancel.

WorkflowContinuationLineage() constructor

public WorkflowContinuationLineage()

Creates an instance of WorkflowContinuationLineage.

ConsumedAtUtc property

public DateTime? ConsumedAtUtc { get; init; }

When the next attempt consumed it, in UTC.

ContinuationRef property

public required string ContinuationRef { get; init; }

The provider’s continuation reference.

ContinuationSha256 property

public required string ContinuationSha256 { get; init; }

The SHA-256 of the continuation.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

Generation property

public long Generation { get; init; }

The continuation generation.

LineageId property

public required string LineageId { get; init; }

The lineage.

RevokedAtUtc property

public DateTime? RevokedAtUtc { get; init; }

When a cancel revoked it, in UTC.

RevokedByCancelFence property

public long? RevokedByCancelFence { get; init; }

The cancel fence that revoked it.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the step.

SourceAttemptId property

public required string SourceAttemptId { get; init; }

The attempt that left the continuation.

SourceCompletionEventId property

public required string SourceCompletionEventId { get; init; }

The completion that carried it.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The step execution.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowContinuationLineageChange record

public sealed record WorkflowContinuationLineageChange

A changed lineage, written only when its stored version still equals WorkflowContinuationLineageChange.ExpectedVersionNo.

WorkflowContinuationLineageChange() constructor

public WorkflowContinuationLineageChange()

Creates an instance of WorkflowContinuationLineageChange.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

Lineage property

public required WorkflowContinuationLineage Lineage { get; init; }

The new lineage row.

WorkflowContinuationPlan record

public sealed record WorkflowContinuationPlan

A workflow a plan starts next, at once or at a due time.

WorkflowContinuationPlan() constructor

public WorkflowContinuationPlan()

Creates an instance of WorkflowContinuationPlan.

DueAtUtc property

public DateTime? DueAtUtc { get; init; }

When to start, in UTC; at once when not set.

Request property

public required StartWorkflowRequest Request { get; init; }

The start request.

WorkflowContinueWithStepDefinition<TStartRequest> record

public sealed record WorkflowContinueWithStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Starts another workflow as an independent instance and continues at once.

Parameters

WorkflowContinueWithStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest>) constructor

public WorkflowContinueWithStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest> StartWorkflowRequestFactory)

Starts another workflow as an independent instance and continues at once.

Parameters

InvocationDeclaration property

public WorkflowWorkflowInvocationDeclaration? InvocationDeclaration { get; init; }

The workflow to start, for the canonical definition.

StartWorkflowRequestFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest> StartWorkflowRequestFactory { get; init; }

Builds the start request of the workflow to run.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowCoreFunctionProvider class

public sealed class WorkflowCoreFunctionProvider : IWorkflowFunctionProvider

Provides the core expression functions (module workflow.functions.core).

WorkflowCoreFunctionProvider() constructor

public WorkflowCoreFunctionProvider()

Creates an instance of WorkflowCoreFunctionProvider.

GetFunctions() method

public IReadOnlyCollection<WorkflowFunctionDescriptor> GetFunctions()

Returns the functions.

Returns

The functions.

WorkflowDecisionStepDefinition<TStartRequest> record

public sealed record WorkflowDecisionStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Branches on a value condition.

Parameters

WorkflowDecisionStepDefinition(WorkflowValueEqualsConditionDefinition, WorkflowStepSequence<TStartRequest>, WorkflowStepSequence<TStartRequest>) constructor

public WorkflowDecisionStepDefinition(WorkflowValueEqualsConditionDefinition Condition, WorkflowStepSequence<TStartRequest> WhenTrue, WorkflowStepSequence<TStartRequest> WhenFalse)

Branches on a value condition.

Parameters

Condition property

public WorkflowValueEqualsConditionDefinition Condition { get; init; }

The condition.

WhenFalse property

public WorkflowStepSequence<TStartRequest> WhenFalse { get; init; }

The steps to run otherwise.

WhenTrue property

public WorkflowStepSequence<TStartRequest> WhenTrue { get; init; }

The steps to run when the condition holds.

WorkflowDefinitionActivationRecord record

public sealed record WorkflowDefinitionActivationRecord

A governed activation.

WorkflowDefinitionActivationRecord() constructor

public WorkflowDefinitionActivationRecord()

Creates an instance of WorkflowDefinitionActivationRecord.

ActorId property

public required string ActorId { get; init; }

Who activates.

AllowRollback property

public bool AllowRollback { get; init; }

Allows activating a lower version than the active one; required for such a rollback, refused otherwise.

ExpectedActiveSha256 property

public string? ExpectedActiveSha256 { get; init; }

The content hash the caller expects the active version to have.

ExpectedActiveVersion property

public string? ExpectedActiveVersion { get; init; }

The version the caller expects to be active; must match, or be unset when none is.

ReasonCode property

public required string ReasonCode { get; init; }

Why.

RollbackOfAuditId property

public string? RollbackOfAuditId { get; init; }

The audit record of the activation the rollback reverts.

WorkflowName property

public required string WorkflowName { get; init; }

The workflow name.

WorkflowVersion property

public required string WorkflowVersion { get; init; }

The version to activate.

WorkflowDefinitionRecord record

public sealed record WorkflowDefinitionRecord

A versioned, persisted canonical workflow definition record.

WorkflowDefinitionRecord() constructor

public WorkflowDefinitionRecord()

Creates an instance of WorkflowDefinitionRecord.

ActivatedOnUtc property

public DateTime? ActivatedOnUtc { get; init; }

When this version was last activated (set as active).

BaseVersion property

public required string BaseVersion { get; init; }

The version the definition declares.

BuildIteration property

public int BuildIteration { get; init; }

The build iteration within the base version; 0 for a version imported as declared.

CanonicalDefinitionJson property

public required string CanonicalDefinitionJson { get; init; }

The full canonical definition as serialized JSON.

CompatibilitySha256 property

public string CompatibilitySha256 { get; init; }

The compatibility SHA-256; zeros when none was given.

ContentHash property

public required string ContentHash { get; init; }

SHA-256 hash of the canonical definition JSON (lowercase hex, 64 chars).

CreatedOnUtc property

public DateTime CreatedOnUtc { get; init; }

When this record was created.

DisplayName property

public string? DisplayName { get; init; }

Human-readable workflow name from the definition.

ImportedBy property

public string? ImportedBy { get; init; }

User or system identifier that performed the import.

IsActive property

public bool IsActive { get; init; }

Whether this version is the active version for the workflow name.

IsManaged property

public bool IsManaged { get; init; }

Whether the definition is managed.

ManagedCode property

public string? ManagedCode { get; init; }

The code of a managed definition.

Origin property

public string Origin { get; init; }

Where the definition comes from: OPERATOR_IMPORTED or MANAGED_EMBEDDED.

RenderingJson property

public byte[]? RenderingJson { get; init; }

Optional render graph JSON (for UI rendering).

RenderingPng property

public byte[]? RenderingPng { get; init; }

Optional PNG screenshot.

RenderingSvg property

public byte[]? RenderingSvg { get; init; }

Optional SVG diagram rendering.

ResolvedDependencies property

public IReadOnlyDictionary<string, string>? ResolvedDependencies { get; init; }

The versions of the workflows this one refers to, by name, when a store recorded them; the stores keep the value, and the engine does not set it.

SourceBuildSha256 property

public string SourceBuildSha256 { get; init; }

The source build SHA-256; zeros when none was given.

VersionNo property

public long VersionNo { get; init; }

The record version, raised by each change of the record.

WorkflowName property

public required string WorkflowName { get; init; }

Workflow name (e.g., “ApproveApplication”).

WorkflowVersion property

public required string WorkflowVersion { get; init; }

The version. A version is an immutable identity: importing different content under a stored version is refused.

WorkflowEndpointCallStepDefinition<TStartRequest> record

public sealed record WorkflowEndpointCallStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Defines a transport call of an HTTP endpoint of a named service.

Parameters

WorkflowEndpointCallStepDefinition(string, string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, WorkflowFailureHandlers<TStartRequest>, int?) constructor

public WorkflowEndpointCallStepDefinition(string StepName, string ServiceName, string Method, string Path, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory, string? ResultKey, WorkflowFailureHandlers<TStartRequest>? FailureHandlers = null, int? TimeoutSeconds = null)

Defines a transport call of an HTTP endpoint of a named service.

Parameters

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

The failure and timeout branches; none when not set.

Method property

public string Method { get; init; }

The HTTP method.

Path property

public string Path { get; init; }

The path.

PayloadExpression property

public WorkflowExpressionDefinition? PayloadExpression { get; init; }

The payload as an expression, for the canonical definition.

PayloadFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory { get; init; }

Builds the payload from the context.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

ServiceName property

public string ServiceName { get; init; }

The service.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

The step timeout in seconds, over all attempts; one hour when not set.

WorkflowExecutionActorContext class

public sealed class WorkflowExecutionActorContext

Propagates the authenticated actor ID through async workflow execution chains (e.g., OnComplete -> Call -> transport) where the original request context is not available. Implementations set ActorId and CallerUserId during task-complete/start-workflow processing.

WorkflowExecutionActorContext() constructor

public WorkflowExecutionActorContext()

Creates an instance of WorkflowExecutionActorContext.

ActorId property

public string? ActorId { get; set; }

The actor ID from the task operation request (e.g., numeric user account ID). Used for role resolution and task assignment.

CallerUserId property

public string? CallerUserId { get; set; }

The authenticated caller’s user ID extracted from the HTTP request context. Used by transport implementations for backend service calls.

WorkflowExecutionTaskPlan record

public sealed record WorkflowExecutionTaskPlan

A human task a plan opens.

WorkflowExecutionTaskPlan() constructor

public WorkflowExecutionTaskPlan()

Creates an instance of WorkflowExecutionTaskPlan.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; init; }

The task payload.

Route property

public required string Route { get; init; }

The route of the task.

RuntimeRoles property

public IReadOnlyCollection<string> RuntimeRoles { get; init; }

The roles computed at runtime, which replace the task roles.

SingleOpenSlot property

public string? SingleOpenSlot { get; init; }

The task’s single-open slot (WorkflowTaskDeclaration.SingleOpenSlot); the projection store keeps one open or assigned task per execution and slot.

TaskName property

public required string TaskName { get; init; }

The task name.

TaskRoles property

public IReadOnlyCollection<string> TaskRoles { get; init; }

The roles the task declares.

TaskType property

public required string TaskType { get; init; }

The task type.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

Optional timeout for the task in seconds. Used to compute WorkflowTaskSummary.DeadlineUtc.

WorkflowName property

public string? WorkflowName { get; init; }

The workflow name.

WorkflowRoles property

public IReadOnlyCollection<string> WorkflowRoles { get; init; }

The workflow roles.

WorkflowVersion property

public string? WorkflowVersion { get; init; }

The workflow version.

WorkflowExpr class

public static class WorkflowExpr

Builds the expressions of canonical workflow definitions. The build-time generator evaluates every method except WorkflowExpr.FromValue(object)and WorkflowExpr.Binary(string, WorkflowExpressionDefinition, WorkflowExpressionDefinition), which leave the workflow to the runtime compiler (WF021).

And(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition And(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Both conditions hold: and.

Parameters

Returns

The and expression.

Array(IEnumerable<WorkflowExpressionDefinition>) method

public static WorkflowArrayExpressionDefinition Array(IEnumerable<WorkflowExpressionDefinition> items)

An array of expressions.

Parameters

Returns

The array expression.

Array(params WorkflowExpressionDefinition[]) method

public static WorkflowArrayExpressionDefinition Array(params WorkflowExpressionDefinition[] items)

An array of expressions.

Parameters

Returns

The array expression.

Binary(string, WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Binary(string @operator, WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

A binary operation by operator name: eq, ne, and, or, gt, gte, lt, lte, add, subtract, multiply or divide, compared case-sensitively; another name fails validation. The build-time generator does not evaluate it (WF021); prefer the named methods, and WorkflowExpr.Func(string, params WorkflowExpressionDefinition[])for arithmetic.

Parameters

Returns

The binary expression.

Bool(bool) method

public static WorkflowBooleanExpressionDefinition Bool(bool value)

A Boolean literal.

Parameters

Returns

The Boolean expression.

Eq(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Eq(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: eq, whether they are equal.

Parameters

Returns

The eq expression.

FromValue(object) method

public static WorkflowExpressionDefinition FromValue(object? value)

An expression of a constant value: null, a string, a Boolean, a number, an object or an array. The build-time generator does not evaluate it (WF021), so the workflow is compiled at runtime.

Parameters

Returns

The expression.

Func(string, params WorkflowExpressionDefinition[]) method

public static WorkflowFunctionExpressionDefinition Func(string functionName, params WorkflowExpressionDefinition[] arguments)

A call of a function of the function catalog. Use it for arithmetic, such as Func("add", a, b): the build-time generator evaluates it, where WorkflowExpr.Binary(string, WorkflowExpressionDefinition, WorkflowExpressionDefinition)gives WF021.

Parameters

Returns

The function expression.

Group(WorkflowExpressionDefinition) method

public static WorkflowGroupExpressionDefinition Group(WorkflowExpressionDefinition expression)

A parenthesized expression.

Parameters

Returns

The group expression.

Gt(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Gt(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: gt, whether the left is greater.

Parameters

Returns

The gt expression.

Gte(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Gte(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: gte, whether the left is greater or equal.

Parameters

Returns

The gte expression.

Lt(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Lt(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: lt, whether the left is less.

Parameters

Returns

The lt expression.

Lte(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Lte(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: lte, whether the left is less or equal.

Parameters

Returns

The lte expression.

Ne(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Ne(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Compares two values: ne, whether they differ.

Parameters

Returns

The ne expression.

Not(WorkflowExpressionDefinition) method

public static WorkflowUnaryExpressionDefinition Not(WorkflowExpressionDefinition operand)

The Boolean negation.

Parameters

Returns

The not expression.

Null() method

public static WorkflowNullExpressionDefinition Null()

The null value.

Returns

The null expression.

Number(decimal) method

public static WorkflowNumberExpressionDefinition Number(decimal value)

A decimal literal.

Parameters

Returns

The number expression.

Number(long) method

public static WorkflowNumberExpressionDefinition Number(long value)

An integer literal.

Parameters

Returns

The number expression.

Obj(IEnumerable<WorkflowNamedExpressionDefinition>) method

public static WorkflowObjectExpressionDefinition Obj(IEnumerable<WorkflowNamedExpressionDefinition> properties)

An object of named expressions; a later property replaces an earlier one of the same name, ignoring case.

Parameters

Returns

The object expression.

Obj(params WorkflowNamedExpressionDefinition[]) method

public static WorkflowObjectExpressionDefinition Obj(params WorkflowNamedExpressionDefinition[] properties)

An object of named expressions; a later property replaces an earlier one of the same name, ignoring case.

Parameters

Returns

The object expression.

Or(WorkflowExpressionDefinition, WorkflowExpressionDefinition) method

public static WorkflowBinaryExpressionDefinition Or(WorkflowExpressionDefinition left, WorkflowExpressionDefinition right)

Either condition holds: or.

Parameters

Returns

The or expression.

Path(string) method

public static WorkflowPathExpressionDefinition Path(string path)

Reads a value by dotted path. Its root is start (the start request), state, payload, result or businessReference.

Parameters

Returns

The path expression.

Prop(string, WorkflowExpressionDefinition) method

public static WorkflowNamedExpressionDefinition Prop(string name, WorkflowExpressionDefinition expression)

A named expression: a property of WorkflowExpr.Obj(params WorkflowNamedExpressionDefinition[]).

Parameters

Returns

The named expression.

String(string) method

public static WorkflowStringExpressionDefinition String(string value)

A string literal.

Parameters

Returns

The string expression.

WorkflowExpressionConditionDefinition<TStartRequest> class

public sealed class WorkflowExpressionConditionDefinition<TStartRequest> : WorkflowConditionDefinition<TStartRequest> where TStartRequest : class

A condition evaluated by a delegate, with its expression when it has one.

WorkflowExpressionConditionDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, bool>, WorkflowExpressionDefinition) constructor

public WorkflowExpressionConditionDefinition(string displayName, Func<WorkflowSpecExecutionContext<TStartRequest>, bool> evaluator, WorkflowExpressionDefinition? canonicalExpression = null)

Creates the condition.

Parameters

CanonicalExpression property

public override WorkflowExpressionDefinition? CanonicalExpression { get; }

The condition as an expression, for the canonical definition; none for a delegate.

Evaluate(WorkflowSpecExecutionContext<TStartRequest>) method

public override bool Evaluate(WorkflowSpecExecutionContext<TStartRequest> context)

Evaluates the condition.

Parameters

Returns

Whether it holds.

WorkflowExternalActivityRegistration record

public sealed record WorkflowExternalActivityRegistration

An external activity of the signed registry manifest.

WorkflowExternalActivityRegistration() constructor

public WorkflowExternalActivityRegistration()

Creates an instance of WorkflowExternalActivityRegistration.

CancelLane property

public string? CancelLane { get; init; }

The lane the cancel requests go to, when there is one.

CompletionLane property

public string? CompletionLane { get; init; }

The lane the completions come back on, when it differs.

ContractKind property

public required string ContractKind { get; init; }

The contract kind.

ContractVersion property

public required string ContractVersion { get; init; }

The contract version.

DestinationCode property

public required string DestinationCode { get; init; }

The destination.

ExecuteLane property

public required string ExecuteLane { get; init; }

The lane the execute requests go to.

HandlerBuildSha256 property

public required string HandlerBuildSha256 { get; init; }

The SHA-256 of the handler build the manifest pins.

OperationCode property

public required string OperationCode { get; init; }

The operation.

RequestSchemaId property

public required string RequestSchemaId { get; init; }

The schema of the request.

RequestSchemaVersion property

public required int RequestSchemaVersion { get; init; }

The version of the request schema.

ResultSchemaId property

public string? ResultSchemaId { get; init; }

The schema of the result, when there is one.

ResultSchemaVersion property

public int? ResultSchemaVersion { get; init; }

The version of the result schema.

WorkflowExternalActivityStepDefinition<TStartRequest> record

public sealed record WorkflowExternalActivityStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs an external activity of the host’s signed registry.

Parameters

WorkflowExternalActivityStepDefinition(string, string, string, string, WorkflowExpressionDefinition, string, int?) constructor

public WorkflowExternalActivityStepDefinition(string StepName, string DestinationCode, string OperationCode, string ContractVersion, WorkflowExpressionDefinition RequestExpression, string? ResultKey, int? DeadlineSeconds)

Runs an external activity of the host’s signed registry.

Parameters

ContractVersion property

public string ContractVersion { get; init; }

The contract version of the activity in the registry.

DeadlineSeconds property

public int? DeadlineSeconds { get; init; }

The deadline in seconds.

DestinationCode property

public string DestinationCode { get; init; }

The destination of the activity in the registry.

OperationCode property

public string OperationCode { get; init; }

The operation of the activity in the registry.

RequestExpression property

public WorkflowExpressionDefinition RequestExpression { get; init; }

The request.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowExternalActivityWrite record

public sealed record WorkflowExternalActivityWrite

The changes one external-activity decision makes, written atomically.

WorkflowExternalActivityWrite() constructor

public WorkflowExternalActivityWrite()

Creates an instance of WorkflowExternalActivityWrite.

ChangedAttempts property

public IReadOnlyList<WorkflowActivityAttempt> ChangedAttempts { get; init; }

Changed attempts.

ChangedDispatches property

public IReadOnlyList<WorkflowActivityDispatchEntry> ChangedDispatches { get; init; }

Changed dispatches.

ChangedLineages property

public IReadOnlyList<WorkflowContinuationLineageChange> ChangedLineages { get; init; }

Changed lineages.

ChangedMapItems property

public IReadOnlyList<WorkflowActivityMapItemStatusChange> ChangedMapItems { get; init; }

Map item status changes.

ChangedMaps property

public IReadOnlyList<WorkflowActivityMapStatusChange> ChangedMaps { get; init; }

Map status changes.

ChangedSteps property

public IReadOnlyList<WorkflowActivityStepChange> ChangedSteps { get; init; }

Changed steps.

Events property

public IReadOnlyList<WorkflowActivityEventAppend> Events { get; init; }

History events to append, in order.

NewAttempt property

public WorkflowActivityAttempt? NewAttempt { get; init; }

A new attempt.

NewCancels property

public IReadOnlyList<WorkflowActivityCancelEntry> NewCancels { get; init; }

New cancel requests.

NewCompletion property

public WorkflowActivityCompletionEntry? NewCompletion { get; init; }

A new completion.

NewDispatch property

public WorkflowActivityDispatchEntry? NewDispatch { get; init; }

A new dispatch.

NewLineages property

public IReadOnlyList<WorkflowContinuationLineage> NewLineages { get; init; }

New lineages.

NewReprocess property

public WorkflowScopeReprocess? NewReprocess { get; init; }

A new reprocess request.

NewStep property

public WorkflowActivityStep? NewStep { get; init; }

A new step.

RuntimeChanges property

public IReadOnlyList<WorkflowActivityRuntimeChange> RuntimeChanges { get; init; }

Runtime-state changes.

WorkflowExternalSignalStepDefinition<TStartRequest> record

public sealed record WorkflowExternalSignalStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Pauses the instance until a caller raises the signal for it.

Parameters

WorkflowExternalSignalStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, string>, string) constructor

public WorkflowExternalSignalStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, string> SignalNameFactory, string? ResultKey)

Pauses the instance until a caller raises the signal for it.

Parameters

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

SignalNameExpression property

public WorkflowExpressionDefinition? SignalNameExpression { get; init; }

The signal name as an expression, for the canonical definition.

SignalNameFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, string> SignalNameFactory { get; init; }

Computes the signal name.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowFailureHandlers<TStartRequest> record

public sealed record WorkflowFailureHandlers<TStartRequest> where TStartRequest : class

The failure and timeout branches of a step.

Parameters

WorkflowFailureHandlers(WorkflowStepSequence<TStartRequest>, WorkflowStepSequence<TStartRequest>) constructor

public WorkflowFailureHandlers(WorkflowStepSequence<TStartRequest> WhenFailure, WorkflowStepSequence<TStartRequest> WhenTimeout)

The failure and timeout branches of a step.

Parameters

FailureConfigured property

public bool FailureConfigured { get; init; }

Whether the author gave a failure branch at all. A given empty branch means “ignore and continue”; one not given leaves the failure unhandled.

HasAnyBranch property

public bool HasAnyBranch { get; }

Whether either branch has steps.

HasFailureBranch property

public bool HasFailureBranch { get; }

Whether the failure branch has steps.

HasTimeoutBranch property

public bool HasTimeoutBranch { get; }

Whether the timeout branch has steps.

TimeoutConfigured property

public bool TimeoutConfigured { get; init; }

Whether the author gave a timeout branch at all. One not given sends a timeout to the failure branch.

WhenFailure property

public WorkflowStepSequence<TStartRequest> WhenFailure { get; init; }

The steps to run when the step fails; empty to ignore the failure and continue.

WhenTimeout property

public WorkflowStepSequence<TStartRequest> WhenTimeout { get; init; }

The steps to run when the step times out.

WorkflowFirstSeenIdentity class

public static class WorkflowFirstSeenIdentity

The identity of a workflow in the first-seen ledger.

Key(string) method

public static string? Key(string? workflowName)

The ledger key of workflowName: its invariant upper-case form, the same equality the code catalogue applies (StringComparer.OrdinalIgnoreCase). null for a missing or blank name, which is never recorded.

WorkflowFirstSeenRecord record

public sealed record WorkflowFirstSeenRecord

A workflow in the first-seen ledger, as first seen.

WorkflowFirstSeenRecord() constructor

public WorkflowFirstSeenRecord()

Creates an instance of WorkflowFirstSeenRecord.

FirstSeenOnUtc property

public required DateTimeOffset FirstSeenOnUtc { get; init; }

When the workflow was first seen (UTC).

FirstSeenSource property

public required string FirstSeenSource { get; init; }

Where the workflow was first seen (WorkflowFirstSeenSources).

WorkflowName property

public required string WorkflowName { get; init; }

The spelling of the workflow name at its first sighting.

WorkflowFirstSeenSources class

public static class WorkflowFirstSeenSources

Where the ledger first saw a workflow.

Catalog constant

public const string Catalog = "catalog"

Registered in code (IWorkflowRegistrationCatalog).

Import constant

public const string Import = "import"

Stored by a definition import.

Store constant

public const string Store = "store"

Found in the definition store by the reconciliation pass.

IsKnown(string) method

public static bool IsKnown(string? source)

Whether a source is one of the known sources.

Parameters

Returns

Whether it is.

WorkflowFlowBuilder<TStartRequest> class

public sealed class WorkflowFlowBuilder<TStartRequest> where TStartRequest : class

Adds the steps of a flow: the first steps of a workflow (StartWith), the completion steps of a task (OnComplete) and the branches of decisions, calls, loops and forks. Every method returns the same builder.

WorkflowFlowBuilder() constructor

public WorkflowFlowBuilder()

Creates an instance of WorkflowFlowBuilder<TStartRequest>.

ActivateTask(string, Func<WorkflowSpecExecutionContext<TStartRequest>, IReadOnlyCollection<string>>) method

public WorkflowFlowBuilder<TStartRequest> ActivateTask(string taskName, Func<WorkflowSpecExecutionContext<TStartRequest>, IReadOnlyCollection<string>>? runtimeRolesFactory = null)

Adds a step that opens the declared human task taskName; the instance waits until a user completes it and then runs the task’s completion steps. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

ActivateTask(string, WorkflowExpressionDefinition) method

public WorkflowFlowBuilder<TStartRequest> ActivateTask(string taskName, WorkflowExpressionDefinition runtimeRolesExpression)

Adds a step that opens the declared human task taskName with roles computed from the state; the instance waits until a user completes it and then runs the task’s completion steps.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, WorkflowExpressionDefinition, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, EndpointAddress, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, EndpointAddress address, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The request has no payload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, WorkflowExpressionDefinition, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, HttpAddress, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, HttpAddress address, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The request has no payload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, RabbitAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

Call(string, RabbitAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, RabbitAddress, WorkflowExpressionDefinition, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, RabbitAddress, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, RabbitAddress address, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The request has no payload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call(string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call(string stepName, string serviceName, string path, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls the HTTP endpoint path of the service serviceName (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest, TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest, TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TRequest>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TRequest>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TRequest> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, WorkflowExpressionDefinition, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, WorkflowExpressionDefinition payloadExpression, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, EndpointAddress, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, EndpointAddress address, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP endpoint of a named service (an endpoint address). The request has no payload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, WorkflowExpressionDefinition, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, WorkflowExpressionDefinition payloadExpression, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, HttpAddress, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, HttpAddress address, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that calls an HTTP target named in configuration (an http address). The request has no payload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, RabbitAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, RabbitAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, RabbitAddress, WorkflowExpressionDefinition, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, RabbitAddress address, WorkflowExpressionDefinition payloadExpression, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The payload is the value of payloadExpression. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, RabbitAddress, string, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string stepName, RabbitAddress address, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that sends a request message over RabbitMQ (a rabbit address). The request has no payload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Call<TResponse>(string, string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, int?) method

public WorkflowFlowBuilder<TStartRequest> Call<TResponse>(string resultKey, string stepName, string serviceName, string path, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, int? timeoutSeconds = null)

Adds a step that calls the HTTP endpoint path of the service serviceName (an endpoint address). The payload is built by payloadFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Complete() method

public WorkflowFlowBuilder<TStartRequest> Complete()

Adds a step that completes the instance.

Returns

The same builder, for chaining.

ContinueWith(string, WorkflowReference) method

public WorkflowFlowBuilder<TStartRequest> ContinueWith(string stepName, WorkflowReference workflowReference)

Adds a step that starts another workflow as an independent instance and continues at once; its result is not returned and its failure does not affect this instance. The new instance starts without a payload.

Parameters

Returns

The same builder, for chaining.

ContinueWith(string, WorkflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>) method

public WorkflowFlowBuilder<TStartRequest> ContinueWith(string stepName, WorkflowReference workflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?>? businessReferenceFactory = null)

Adds a step that starts another workflow as an independent instance and continues at once; its result is not returned and its failure does not affect this instance. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

ContinueWith(string, WorkflowReference, WorkflowExpressionDefinition, WorkflowBusinessReferenceDeclaration) method

public WorkflowFlowBuilder<TStartRequest> ContinueWith(string stepName, WorkflowReference workflowReference, WorkflowExpressionDefinition payloadExpression, WorkflowBusinessReferenceDeclaration? businessReferenceDeclaration = null)

Adds a step that starts another workflow as an independent instance and continues at once; its result is not returned and its failure does not affect this instance.

Parameters

Returns

The same builder, for chaining.

ContinueWith(string, WorkflowWorkflowInvocationDeclaration) method

public WorkflowFlowBuilder<TStartRequest> ContinueWith(string stepName, WorkflowWorkflowInvocationDeclaration invocationDeclaration)

Adds a step that starts another workflow as an independent instance and continues at once; its result is not returned and its failure does not affect this instance.

Parameters

Returns

The same builder, for chaining.

ContinueWith<TPayload>(string, WorkflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload>, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>) method

public WorkflowFlowBuilder<TStartRequest> ContinueWith<TPayload>(string stepName, WorkflowReference workflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload> payloadFactory, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?>? businessReferenceFactory = null)

Adds a step that starts another workflow as an independent instance and continues at once; its result is not returned and its failure does not affect this instance. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Type parameters

Parameters

Returns

The same builder, for chaining.

ExternalActivity(string, string, string, string, WorkflowExpressionDefinition, string, int?) method

public WorkflowFlowBuilder<TStartRequest> ExternalActivity(string stepName, string destinationCode, string operationCode, string contractVersion, WorkflowExpressionDefinition requestExpression, string? resultKey = null, int? deadlineSeconds = null)

Adds a step that runs an external activity of the host’s signed external activity registry. A host without a registry manifest runs no external activity.

Parameters

Returns

The same builder, for chaining.

Fork(string, params Action<WorkflowFlowBuilder<TStartRequest>>[]) method

public WorkflowFlowBuilder<TStartRequest> Fork(string stepName, params Action<WorkflowFlowBuilder<TStartRequest>>[] branches)

Adds a step that runs the branches concurrently and continues when the last branch has finished. A WorkflowFlowBuilder<TStartRequest>.TerminateFork()step in a branch ends the fork early.

Parameters

Returns

The same builder, for chaining.

Map(string, WorkflowExpressionDefinition, WorkflowExpressionDefinition, WorkflowExpressionDefinition, string, int, int, int, Action<WorkflowFlowBuilder<TStartRequest>>, string, string, string, int?, string, WorkflowRetryPolicyDeclaration, int?) method

public WorkflowFlowBuilder<TStartRequest> Map(string stepName, WorkflowExpressionDefinition collectionExpression, WorkflowExpressionDefinition itemKeyExpression, WorkflowExpressionDefinition itemResultExpression, string itemStateKey, int maxConcurrency, int maxItems, int maxAggregateStateBytes, Action<WorkflowFlowBuilder<TStartRequest>> configureBody, string fanInPolicy = "ALL_SUCCEEDED", string failurePolicy = "FAIL_FAST", string? resultKey = null, int? minimumSucceeded = null, string? globalActivityClass = null, WorkflowRetryPolicyDeclaration? retryPolicy = null, int? deadlineSeconds = null)

Adds a map step: the body runs once per item of a collection, with bounded concurrency and a deterministic fan-in. While its body runs, each item is in the state under itemStateKey. A map needs the durable stores and services; one whose bounds break the runtime limits fails with MAP_BOUND_INVALID.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, WorkflowExpressionDefinition, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, GraphqlAddress, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, GraphqlAddress address, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The query has no variables. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql(string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql(string stepName, string target, string query, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object?>> variablesFactory, string? operationName = null, int? timeoutSeconds = null)

Adds a step that runs the GraphQL query against the target target. The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> variablesFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, WorkflowExpressionDefinition, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, WorkflowExpressionDefinition, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, WorkflowExpressionDefinition variablesExpression, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are the value of variablesExpression. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, GraphqlAddress, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string stepName, GraphqlAddress address, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The query has no variables. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TResponse>(string, string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TResponse>(string resultKey, string stepName, string target, string query, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object?>> variablesFactory, string? operationName = null, int? timeoutSeconds = null)

Adds a step that runs the GraphQL query against the target target. The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables, TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables, TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables, TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables, TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables, TResponse>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, string, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables, TResponse>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, string? resultKey = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is kept under result.<resultKey>, by default under the step name. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed call runs whenFailure; a timed-out call runs whenTimeout when it is set and fails the step otherwise. result.lastFailure describes the failure.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, WorkflowHandledBranchAction, WorkflowHandledBranchAction, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. onFailure and onTimeout handle a failed and a timed-out call: WorkflowHandledBranchAction.Completecompletes the instance, WorkflowHandledBranchAction.Nonefails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

QueryGraphql<TVariables>(string, GraphqlAddress, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables>, int?) method

public WorkflowFlowBuilder<TStartRequest> QueryGraphql<TVariables>(string stepName, GraphqlAddress address, Func<WorkflowSpecExecutionContext<TStartRequest>, TVariables> variablesFactory, int? timeoutSeconds = null)

Adds a step that runs a GraphQL query (a graphql address). The variables are built by variablesFactory. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload. The response is not kept. A failed or timed-out call fails the step.

Type parameters

Parameters

Returns

The same builder, for chaining.

Repeat(string, WorkflowExpressionDefinition, string, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> Repeat(string stepName, WorkflowExpressionDefinition maxIterationsExpression, string? iterationStateKey, WorkflowExpressionDefinition continueWhileExpression, Action<WorkflowFlowBuilder<TStartRequest>> configureBody)

Adds a loop: the body runs while continueWhileExpression holds, evaluated before each iteration, at most the maximum number of iterations.

Parameters

Returns

The same builder, for chaining.

Repeat(string, int, string, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> Repeat(string stepName, int maxIterations, string? iterationStateKey, WorkflowExpressionDefinition continueWhileExpression, Action<WorkflowFlowBuilder<TStartRequest>> configureBody)

Adds a loop: the body runs while continueWhileExpression holds, evaluated before each iteration, at most the maximum number of iterations.

Parameters

Returns

The same builder, for chaining.

Run(string, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task>) method

public WorkflowFlowBuilder<TStartRequest> Run(string stepName, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task> executeAsync)

Adds a step that runs C# code with the inline step services. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. An exception fails the step.

Parameters

Returns

The same builder, for chaining.

Run(string, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> Run(string stepName, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task> executeAsync, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, Action<WorkflowFlowBuilder<TStartRequest>>? whenTimeout = null)

Adds a step that runs C# code with the inline step services. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it.

Parameters

Returns

The same builder, for chaining.

Run(string, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task>, WorkflowHandledBranchAction, WorkflowHandledBranchAction) method

public WorkflowFlowBuilder<TStartRequest> Run(string stepName, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task> executeAsync, WorkflowHandledBranchAction onFailure, WorkflowHandledBranchAction onTimeout = None)

Adds a step that runs C# code with the inline step services. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it.

Parameters

Returns

The same builder, for chaining.

Set(string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>) method

public WorkflowFlowBuilder<TStartRequest> Set(string key, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> valueFactory)

Adds a step that sets the state value key. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

Set(string, WorkflowExpressionDefinition) method

public WorkflowFlowBuilder<TStartRequest> Set(string key, WorkflowExpressionDefinition valueExpression)

Adds a step that sets the state value key to the value of valueExpression.

Parameters

Returns

The same builder, for chaining.

Set(string, object) method

public WorkflowFlowBuilder<TStartRequest> Set(string key, object? value)

Adds a step that sets the state value key to a constant.

Parameters

Returns

The same builder, for chaining.

SetBusinessReference(Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>) method

public WorkflowFlowBuilder<TStartRequest> SetBusinessReference(Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?> businessReferenceFactory)

Adds a step that sets or changes the business reference of the instance. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

SetBusinessReference(WorkflowBusinessReferenceDeclaration) method

public WorkflowFlowBuilder<TStartRequest> SetBusinessReference(WorkflowBusinessReferenceDeclaration businessReferenceDeclaration)

Adds a step that sets or changes the business reference of the instance: a key expression and named part expressions.

Parameters

Returns

The same builder, for chaining.

SetIfHasValue(string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>) method

public WorkflowFlowBuilder<TStartRequest> SetIfHasValue(string key, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> valueFactory)

Adds a step that sets the state value key only when the value is set: not null and not an empty or white-space string. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

SetIfHasValue(string, WorkflowExpressionDefinition) method

public WorkflowFlowBuilder<TStartRequest> SetIfHasValue(string key, WorkflowExpressionDefinition valueExpression)

Adds a step that sets the state value key only when the value is set: not null and not an empty or white-space string.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowReference, Action<WorkflowFlowBuilder<TStartRequest>>, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowReference workflowReference, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child starts without a payload. The child’s result is kept under result.<resultKey> when resultKey is set. A failure of the child runs whenFailure.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowReference workflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> payloadFactory, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?>? businessReferenceFactory = null, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child’s result is kept under result.<resultKey>, by default under the step name. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowReference, WorkflowExpressionDefinition, WorkflowBusinessReferenceDeclaration, Action<WorkflowFlowBuilder<TStartRequest>>, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowReference workflowReference, WorkflowExpressionDefinition payloadExpression, WorkflowBusinessReferenceDeclaration? businessReferenceDeclaration, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child’s result is kept under result.<resultKey> when resultKey is set. A failure of the child runs whenFailure.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowReference, WorkflowExpressionDefinition, WorkflowBusinessReferenceDeclaration, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowReference workflowReference, WorkflowExpressionDefinition payloadExpression, WorkflowBusinessReferenceDeclaration? businessReferenceDeclaration = null, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child’s result is kept under result.<resultKey> when resultKey is set.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowReference, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowReference workflowReference, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child starts without a payload. The child’s result is kept under result.<resultKey> when resultKey is set.

Parameters

Returns

The same builder, for chaining.

SubWorkflow(string, WorkflowWorkflowInvocationDeclaration, Action<WorkflowFlowBuilder<TStartRequest>>, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowWorkflowInvocationDeclaration invocationDeclaration, Action<WorkflowFlowBuilder<TStartRequest>> whenFailure, string? resultKey = null)

Runs the child workflow; when it fails or ends in a status other than completed, runs whenFailure, which reads the failure as result.lastFailure.

SubWorkflow(string, WorkflowWorkflowInvocationDeclaration, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow(string stepName, WorkflowWorkflowInvocationDeclaration invocationDeclaration, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child’s result is kept under result.<resultKey> when resultKey is set.

Parameters

Returns

The same builder, for chaining.

SubWorkflow<TPayload>(string, WorkflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload>, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference>, string) method

public WorkflowFlowBuilder<TStartRequest> SubWorkflow<TPayload>(string stepName, WorkflowReference workflowReference, Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload> payloadFactory, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowBusinessReference?>? businessReferenceFactory = null, string? resultKey = null)

Adds a step that runs another registered workflow as a child and waits for it. The child’s result is kept under result.<resultKey>, by default under the step name. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Type parameters

Parameters

Returns

The same builder, for chaining.

TerminateFork() method

public WorkflowFlowBuilder<TStartRequest> TerminateFork()

Ends the fork this branch belongs to, as a BPMN terminate end event inside a parallel subprocess does: tasks still open in the other branches are cancelled, their waits are dropped, and the flow continues after the fork. Only valid in a fork branch (WFVAL028).

Wait(string, Func<WorkflowSpecExecutionContext<TStartRequest>, TimeSpan>) method

public WorkflowFlowBuilder<TStartRequest> Wait(string stepName, Func<WorkflowSpecExecutionContext<TStartRequest>, TimeSpan> delayFactory)

Adds a timer step: the instance pauses for the delay and resumes when the timer is due; the host process can restart in between. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

Wait(string, WorkflowExpressionDefinition) method

public WorkflowFlowBuilder<TStartRequest> Wait(string stepName, WorkflowExpressionDefinition delayExpression)

Adds a timer step: the instance pauses for the delay and resumes when the timer is due; the host process can restart in between.

Parameters

Returns

The same builder, for chaining.

WaitForSignal(string, Func<WorkflowSpecExecutionContext<TStartRequest>, string>, string) method

public WorkflowFlowBuilder<TStartRequest> WaitForSignal(string stepName, Func<WorkflowSpecExecutionContext<TStartRequest>, string> signalNameFactory, string? resultKey = null)

Adds a step that pauses the instance until a caller raises the signal for it. The signal’s payload is kept under result.<resultKey> when resultKey is set. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

WaitForSignal(string, WorkflowExpressionDefinition, string) method

public WorkflowFlowBuilder<TStartRequest> WaitForSignal(string stepName, WorkflowExpressionDefinition signalNameExpression, string? resultKey = null)

Adds a step that pauses the instance until a caller raises the signal for it. The signal’s payload is kept under result.<resultKey> when resultKey is set.

Parameters

Returns

The same builder, for chaining.

WaitForSignal(string, string, string) method

public WorkflowFlowBuilder<TStartRequest> WaitForSignal(string stepName, string signalName, string? resultKey = null)

Adds a step that pauses the instance until a caller raises the signal for it. The signal’s payload is kept under result.<resultKey> when resultKey is set.

Parameters

Returns

The same builder, for chaining.

WhenExpression(string, Func<WorkflowSpecExecutionContext<TStartRequest>, bool>, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> WhenExpression(string decisionName, Func<WorkflowSpecExecutionContext<TStartRequest>, bool> evaluator, Action<WorkflowFlowBuilder<TStartRequest>> whenTrue, Action<WorkflowFlowBuilder<TStartRequest>>? whenElse = null)

Adds a decision on a condition. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

WhenExpression(string, WorkflowExpressionDefinition, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> WhenExpression(string decisionName, WorkflowExpressionDefinition conditionExpression, Action<WorkflowFlowBuilder<TStartRequest>> whenTrue, Action<WorkflowFlowBuilder<TStartRequest>>? whenElse = null)

Adds a decision on a boolean expression.

Parameters

Returns

The same builder, for chaining.

WhenPayloadEquals<TValue>(string, TValue, string, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> WhenPayloadEquals<TValue>(string key, TValue expectedValue, string decisionName, Action<WorkflowFlowBuilder<TStartRequest>> whenTrue, Action<WorkflowFlowBuilder<TStartRequest>>? whenElse = null)

Adds a decision that compares a field of the completion payload (payload.<key>) with expectedValue.

Type parameters

Parameters

Returns

The same builder, for chaining.

WhenStateEquals<TValue>(string, TValue, string, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> WhenStateEquals<TValue>(string key, TValue expectedValue, string decisionName, Action<WorkflowFlowBuilder<TStartRequest>> whenTrue, Action<WorkflowFlowBuilder<TStartRequest>>? whenElse = null)

Adds a decision that compares a state value (state.<key>) with expectedValue.

Type parameters

Parameters

Returns

The same builder, for chaining.

WhenStateFlag(string, bool, string, Action<WorkflowFlowBuilder<TStartRequest>>, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowFlowBuilder<TStartRequest> WhenStateFlag(string key, bool expectedValue, string decisionName, Action<WorkflowFlowBuilder<TStartRequest>> whenTrue, Action<WorkflowFlowBuilder<TStartRequest>>? whenElse = null)

Adds a decision on a boolean state value (state.<key>).

Parameters

Returns

The same builder, for chaining.

WorkflowForkStepDefinition<TStartRequest> record

public sealed record WorkflowForkStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs its branches concurrently.

Parameters

WorkflowForkStepDefinition(string, IReadOnlyCollection<WorkflowStepSequence<TStartRequest>>) constructor

public WorkflowForkStepDefinition(string StepName, IReadOnlyCollection<WorkflowStepSequence<TStartRequest>> Branches)

Runs its branches concurrently.

Parameters

Branches property

public IReadOnlyCollection<WorkflowStepSequence<TStartRequest>> Branches { get; init; }

The branches.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowFunctionArguments class

public static class WorkflowFunctionArguments

Argument access for workflow function providers: an exact arity check, then the argument by position.

GetRequiredElement(IReadOnlyCollection<object>, string, int, int) method

public static JsonElement GetRequiredElement(IReadOnlyCollection<object?> arguments, string functionName, int expectedArgumentCount, int argumentIndex)

Returns argument argumentIndex as JSON (default for null) after checking that the function got exactly expectedArgumentCount arguments.

GetRequiredString(IReadOnlyCollection<object>, string, int, int) method

public static string GetRequiredString(IReadOnlyCollection<object?> arguments, string functionName, int expectedArgumentCount, int argumentIndex)

Returns argument argumentIndex as text (empty for null; a non-string JSON value as its raw text) after checking that the function got exactly expectedArgumentCount arguments.

WorkflowFunctionCatalog class

public sealed class WorkflowFunctionCatalog : IWorkflowFunctionCatalog

The function catalog: the functions of every provider, ordered by module and name.

WorkflowFunctionCatalog(IEnumerable<IWorkflowFunctionProvider>) constructor

public WorkflowFunctionCatalog(IEnumerable<IWorkflowFunctionProvider> providers)

Creates the catalog from the functions of every provider.

Parameters

Exceptions

GetFunctions() method

public IReadOnlyCollection<WorkflowFunctionDescriptor> GetFunctions()

Returns the functions.

Returns

The functions.

TryGetFunction(string, out WorkflowFunctionDescriptor) method

public bool TryGetFunction(string functionName, out WorkflowFunctionDescriptor descriptor)

Finds a function by name or alias, ignoring case.

Parameters

Returns

Whether the function exists.

WorkflowFunctionCatalogServiceCollectionExtensions class

public static class WorkflowFunctionCatalogServiceCollectionExtensions

Registers the function catalog and the function providers that workflow expressions call.

AddWorkflowFunctionCatalog(IServiceCollection) extension method

public static IServiceCollection AddWorkflowFunctionCatalog(this IServiceCollection services)

Registers the function catalog and the function runtime, unless they are already registered.

Parameters

Returns

The same service collection, for chaining.

AddWorkflowFunctionProvider<TProvider>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowFunctionProvider<TProvider>(this IServiceCollection services) where TProvider : class, IWorkflowFunctionProvider

Adds TProvider as a function provider, and registers the function catalog. A provider that also implements IWorkflowFunctionRuntimeProviderevaluates its functions at run time too. The modules a provider declares count as installed.

Type parameters

Parameters

Returns

The same service collection, for chaining.

WorkflowFunctionDescriptors class

public static class WorkflowFunctionDescriptors

Builds the catalog descriptor of a deterministic workflow function with one example.

Create(string, string, string, string, WorkflowFunctionReturnDescriptor, WorkflowFunctionExample, params WorkflowFunctionArgumentDescriptor[]) method

public static WorkflowFunctionDescriptor Create(string moduleName, string moduleVersion, string functionName, string summary, WorkflowFunctionReturnDescriptor returnDescriptor, WorkflowFunctionExample example, params WorkflowFunctionArgumentDescriptor[] arguments)

Creates a function descriptor.

Parameters

Returns

The descriptor.

Create(string, string, string, string, string, string, string, string, params WorkflowFunctionArgumentDescriptor[]) method

public static WorkflowFunctionDescriptor Create(string moduleName, string moduleVersion, string functionName, string summary, string returnType, string returnDescription, string exampleExpression, string exampleDescription, params WorkflowFunctionArgumentDescriptor[] arguments)

Creates a function descriptor from text parts.

Parameters

Returns

The descriptor.

WorkflowGraphqlCallStepDefinition<TStartRequest> record

public sealed record WorkflowGraphqlCallStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Defines a transport call to a GraphQL endpoint.

Parameters

WorkflowGraphqlCallStepDefinition(string, string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object>>, string, WorkflowFailureHandlers<TStartRequest>, int?) constructor

public WorkflowGraphqlCallStepDefinition(string StepName, string Target, string Query, string? OperationName, Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object?>> VariablesFactory, string? ResultKey, WorkflowFailureHandlers<TStartRequest>? FailureHandlers = null, int? TimeoutSeconds = null)

Defines a transport call to a GraphQL endpoint.

Parameters

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

The failure and timeout branches; none when not set.

OperationName property

public string? OperationName { get; init; }

The operation to run, for a query document with several.

Query property

public string Query { get; init; }

The GraphQL query.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

Target property

public string Target { get; init; }

The target, as the transport configuration names it.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

The step timeout in seconds, over all attempts; one hour when not set.

VariablesExpression property

public WorkflowExpressionDefinition? VariablesExpression { get; init; }

The variables as an expression, for the canonical definition.

VariablesFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, IDictionary<string, object?>> VariablesFactory { get; init; }

Builds the query variables from the context.

WorkflowHandledBranchAction enum

public enum WorkflowHandledBranchAction

What a call does on a failure or a timeout when no branch is given.

ValueDescription
None = 0No handling: the failure or the timeout fails the step.
Complete = 1Completes the instance.

WorkflowHistoryCompactionResult record

public sealed record WorkflowHistoryCompactionResult

The outcome of a history compaction.

WorkflowHistoryCompactionResult() constructor

public WorkflowHistoryCompactionResult()

Creates an instance of WorkflowHistoryCompactionResult.

DeletedEvents property

public required int DeletedEvents { get; init; }

The events deleted.

HistoryFloorSequence property

public required long HistoryFloorSequence { get; init; }

The first sequence still kept.

WorkflowHistoryCursor record

public sealed record WorkflowHistoryCursor

The history position of an execution: the first sequence still stored, the next one to allocate, and the retention flags that decide whether its prefix may be compacted.

WorkflowHistoryCursor() constructor

public WorkflowHistoryCursor()

Creates an instance of WorkflowHistoryCursor.

HistoryFloorSequence property

public required long HistoryFloorSequence { get; init; }

The first sequence still kept.

LegalHold property

public bool LegalHold { get; init; }

Whether the execution is under a legal hold, which keeps its history.

NextEventSequence property

public required long NextEventSequence { get; init; }

The sequence of the next event.

RetentionPolicy property

public string? RetentionPolicy { get; init; }

The retention policy: STANDARD or HOLD_ALL.

WorkflowHistoryEvent record

public sealed record WorkflowHistoryEvent

One durable execution-history event, as the history store returns it.

WorkflowHistoryEvent() constructor

public WorkflowHistoryEvent()

Creates an instance of WorkflowHistoryEvent.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the event was recorded, in UTC.

DetailCompacted property

public bool DetailCompacted { get; init; }

Whether the event detail was compacted.

EventId property

public required string EventId { get; init; }

The event identifier.

EventSequence property

public required long EventSequence { get; init; }

The sequence of the event.

EventSha256 property

public required string EventSha256 { get; init; }

The SHA-256 of the event.

EventType property

public required string EventType { get; init; }

The event type.

PayloadJson property

public required string PayloadJson { get; init; }

The event payload, as JSON.

RetentionHeld property

public bool RetentionHeld { get; init; }

Whether retention holds the event.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution.

WorkflowHttpCallStepDefinition<TStartRequest> record

public sealed record WorkflowHttpCallStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Defines a transport call to an HTTP endpoint.

Parameters

WorkflowHttpCallStepDefinition(string, string, string, string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, WorkflowFailureHandlers<TStartRequest>, int?) constructor

public WorkflowHttpCallStepDefinition(string StepName, string Target, string Method, string Path, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory, string? ResultKey, WorkflowFailureHandlers<TStartRequest>? FailureHandlers = null, int? TimeoutSeconds = null)

Defines a transport call to an HTTP endpoint.

Parameters

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

The failure and timeout branches; none when not set.

Method property

public string Method { get; init; }

The HTTP method.

Path property

public string Path { get; init; }

The path.

PayloadExpression property

public WorkflowExpressionDefinition? PayloadExpression { get; init; }

The payload as an expression, for the canonical definition.

PayloadFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory { get; init; }

Builds the payload from the context.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

Target property

public string Target { get; init; }

The target, as the transport configuration names it.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

The step timeout in seconds, over all attempts; one hour when not set.

WorkflowHumanTask class

public static class WorkflowHumanTask

Starts the definition of a human task.

For<TStartRequest>(string, string, string, IEnumerable<string>) method

public static WorkflowHumanTaskBuilder<TStartRequest> For<TStartRequest>(string taskName, string taskType, string route, IEnumerable<string>? taskRoles = null) where TStartRequest : class

Starts the definition of a human task.

Type parameters

Parameters

Returns

A task builder.

WorkflowHumanTaskBuilder<TStartRequest> class

public sealed class WorkflowHumanTaskBuilder<TStartRequest> where TStartRequest : class

Builds a human task: its payload, roles, route, timeout and completion steps.

Type parameters

WorkflowHumanTaskBuilder(string, string, string) constructor

public WorkflowHumanTaskBuilder(string taskName, string taskType, string route)

Starts the definition of a human task.

Parameters

Exceptions

Build() method

public WorkflowHumanTaskDefinition<TStartRequest> Build()

Builds the task definition without completion steps.

Returns

The task definition.

Exceptions

OnComplete(Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowHumanTaskDefinition<TStartRequest> OnComplete(Action<WorkflowFlowBuilder<TStartRequest>> configure)

Sets the steps that run after a user completes the task, and builds the task definition. In these steps payload.* paths read the completion payload.

Parameters

Returns

The task definition.

Exceptions

SingleOpen(string) method

public WorkflowHumanTaskBuilder<TStartRequest> SingleOpen(string slot)

Keeps at most one open or assigned task in slot per workflow execution: while one is open, the projection store refuses to open another task that declares the same slot (WorkflowTaskSingleOpenSlot.AlreadyOpenCode).

WithPayload(Func<WorkflowSpecExecutionContext<TStartRequest>, Dictionary<string, JsonElement>>) method

public WorkflowHumanTaskBuilder<TStartRequest> WithPayload(Func<WorkflowSpecExecutionContext<TStartRequest>, Dictionary<string, JsonElement>> buildPayload)

Sets the data the task shows with a delegate. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

WithPayload(WorkflowExpressionDefinition) method

public WorkflowHumanTaskBuilder<TStartRequest> WithPayload(WorkflowExpressionDefinition buildPayloadExpression)

Sets the data the task shows to the value of an object expression.

Parameters

Returns

The same builder, for chaining.

WithPayload<TPayload>(Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload>) method

public WorkflowHumanTaskBuilder<TStartRequest> WithPayload<TPayload>(Func<WorkflowSpecExecutionContext<TStartRequest>, TPayload> buildPayload)

Sets the data the task shows to the serialized value a delegate builds. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Type parameters

Parameters

Returns

The same builder, for chaining.

WithRoles(IEnumerable<string>) method

public WorkflowHumanTaskBuilder<TStartRequest> WithRoles(IEnumerable<string>? taskRoles)

Sets the roles that may work the task, replacing the workflow roles. Empty and duplicate roles are dropped; roles compare ignoring case.

Parameters

Returns

The same builder, for chaining.

WithRoles(params string[]) method

public WorkflowHumanTaskBuilder<TStartRequest> WithRoles(params string[] taskRoles)

Sets the roles that may work the task, replacing the workflow roles. Empty and duplicate roles are dropped; roles compare ignoring case.

Parameters

Returns

The same builder, for chaining.

WithRoute(Func<WorkflowSpecExecutionContext<TStartRequest>, string>) method

public WorkflowHumanTaskBuilder<TStartRequest> WithRoute(Func<WorkflowSpecExecutionContext<TStartRequest>, string> resolveRoute)

Computes the route of the task with a delegate. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

WithRoute(WorkflowExpressionDefinition) method

public WorkflowHumanTaskBuilder<TStartRequest> WithRoute(WorkflowExpressionDefinition resolveRouteExpression)

Computes the route of the task from an expression.

Parameters

Returns

The same builder, for chaining.

WithTimeout(int) method

public WorkflowHumanTaskBuilder<TStartRequest> WithTimeout(int seconds)

Sets an optional timeout for the human task. When expired, the task’s DeadlineUtc is exceeded and it becomes stale. Default when not called: null (no deadline — task runs until completed or purged by retention).

WithTimeout(int, Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowHumanTaskBuilder<TStartRequest> WithTimeout(int seconds, Action<WorkflowFlowBuilder<TStartRequest>> whenTimeout)

Sets an interrupting timeout: when the task is still open after seconds, the engine closes it as expired and runs whenTimeout instead of the completion flow.

WorkflowHumanTaskDefinition<TStartRequest> class

public sealed class WorkflowHumanTaskDefinition<TStartRequest> where TStartRequest : class

Defines a human task (user task) within a workflow. Human tasks pause workflow execution and wait for a user to complete them.

WorkflowHumanTaskDefinition() constructor

public WorkflowHumanTaskDefinition()

Creates an instance of WorkflowHumanTaskDefinition<TStartRequest>.

BuildPayload property

public required Func<WorkflowSpecExecutionContext<TStartRequest>, Dictionary<string, JsonElement>> BuildPayload { get; init; }

Builds the payload of an opened task.

Descriptor property

public required WorkflowTaskDescriptor Descriptor { get; init; }

The task descriptor: name, type, route and roles.

OnComplete property

public required WorkflowStepSequence<TStartRequest> OnComplete { get; init; }

The steps that run after a user completes the task.

OnTimeout property

public WorkflowStepSequence<TStartRequest>? OnTimeout { get; init; }

Runs when the task is still open at WorkflowHumanTaskDefinition<TStartRequest>.TimeoutSeconds: the engine closes the task as expired and continues here instead of WorkflowHumanTaskDefinition<TStartRequest>.OnComplete(a BPMN interrupting timer).

PayloadExpression property

public WorkflowExpressionDefinition? PayloadExpression { get; init; }

The payload expression, when the payload is declared as an expression.

ResolveRoute property

public required Func<WorkflowSpecExecutionContext<TStartRequest>, string> ResolveRoute { get; init; }

Computes the route of an opened task.

RouteExpression property

public WorkflowExpressionDefinition? RouteExpression { get; init; }

The route expression, when the route is declared as an expression.

SingleOpenSlot property

public string? SingleOpenSlot { get; init; }

Optional single-open slot: the projection store keeps at most one open or assigned task per execution in it.

TaskName property

public required string TaskName { get; init; }

The task name.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

Optional timeout for the human task in seconds. When null, no deadline is set — the task runs indefinitely until completed or purged by retention. When set, the task’s DeadlineUtc is computed as CreatedOnUtc + TimeoutSeconds.

WorkflowInlineStepDefinition<TStartRequest> record

public sealed record WorkflowInlineStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs C# code with the inline step services.

Parameters

WorkflowInlineStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task>, WorkflowFailureHandlers<TStartRequest>) constructor

public WorkflowInlineStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task> ExecuteAsync, WorkflowFailureHandlers<TStartRequest>? FailureHandlers = null)

Runs C# code with the inline step services.

Parameters

ExecuteAsync property

public Func<WorkflowSpecExecutionContext<TStartRequest>, WorkflowInlineStepServices, CancellationToken, Task> ExecuteAsync { get; init; }

The code to run, with the context, the inline step services and a cancellation token.

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

The failure and timeout branches; none when not set.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowInlineStepServices class

public sealed class WorkflowInlineStepServices

The transports an inline step (Run) can call.

Parameters

WorkflowInlineStepServices(IWorkflowEndpointTransport, IWorkflowGraphqlTransport, IWorkflowHttpTransport) constructor

public WorkflowInlineStepServices(IWorkflowEndpointTransport endpointTransport, IWorkflowGraphqlTransport graphqlTransport, IWorkflowHttpTransport httpTransport)

The transports an inline step (Run) can call.

Parameters

EndpointTransport property

public IWorkflowEndpointTransport EndpointTransport { get; }

The endpoint transport.

GraphqlTransport property

public IWorkflowGraphqlTransport GraphqlTransport { get; }

The GraphQL transport.

HttpTransport property

public IWorkflowHttpTransport HttpTransport { get; }

The HTTP transport.

CallAsync(EndpointAddress, object, CancellationToken) method

public Task<WorkflowEndpointResponse> CallAsync(EndpointAddress address, object? payload, CancellationToken cancellationToken = default)

Calls an endpoint of a named service.

Parameters

Returns

The response.

CallAsync(HttpAddress, object, CancellationToken) method

public Task<WorkflowHttpResponse> CallAsync(HttpAddress address, object? payload, CancellationToken cancellationToken = default)

Calls a named HTTP target.

Parameters

Returns

The response.

QueryAsync(GraphqlAddress, object, CancellationToken) method

public Task<WorkflowGraphqlResponse> QueryAsync(GraphqlAddress address, object? variables, CancellationToken cancellationToken = default)

Runs a GraphQL query.

Parameters

Returns

The response.

WorkflowInstalledModule record

public sealed record WorkflowInstalledModule

A function module installed in the engine.

Parameters

WorkflowInstalledModule(string, string) constructor

public WorkflowInstalledModule(string ModuleName, string Version)

A function module installed in the engine.

Parameters

ModuleName property

public string ModuleName { get; init; }

The module name.

Version property

public string Version { get; init; }

The module version.

WorkflowJsonExtensions class

public static class WorkflowJsonExtensions

Reads, converts and writes the JSON values of workflow state, payloads and results. Keys and property names compare ignoring case.

AsJsonElement<T>(T) extension method

public static JsonElement AsJsonElement<T>(this T value)

Writes a value as JSON, with the web defaults.

Type parameters

Parameters

Returns

The JSON value.

AsWorkflowJsonDictionary(object) extension method

public static Dictionary<string, JsonElement> AsWorkflowJsonDictionary(this object? value)

Converts an object, or a dictionary of JSON values, to a dictionary of JSON values; null gives an empty one.

Parameters

Returns

The dictionary.

Exceptions

AsWorkflowObjectDictionary(object) extension method

public static Dictionary<string, object?> AsWorkflowObjectDictionary(this object? value)

Converts an object or a dictionary to a dictionary of objects whose keys compare ignoring case; null gives an empty one.

Parameters

Returns

The dictionary.

Assign<T>(Dictionary<string, JsonElement>, string, T) extension method

public static Dictionary<string, JsonElement> Assign<T>(this Dictionary<string, JsonElement> source, string key, T value)

Sets a value.

Type parameters

Parameters

Returns

The same dictionary.

AssignIfHasValue(Dictionary<string, JsonElement>, string, string) extension method

public static Dictionary<string, JsonElement> AssignIfHasValue(this Dictionary<string, JsonElement> source, string key, string? value)

Sets a text value unless it is empty or white space.

Parameters

Returns

The same dictionary.

CloneJson(IReadOnlyDictionary<string, JsonElement>) extension method

public static Dictionary<string, JsonElement> CloneJson(this IReadOnlyDictionary<string, JsonElement> source)

Copies values into a new dictionary whose keys compare ignoring case.

Parameters

Returns

The copy.

Get<T>(JsonElement) extension method

public static T Get<T>(this JsonElement value)

Converts a JSON value.

Type parameters

Parameters

Returns

The converted value.

Exceptions

GetOptional<T>(IReadOnlyDictionary<string, JsonElement>, string) extension method

public static T? GetOptional<T>(this IReadOnlyDictionary<string, JsonElement> source, string key)

Reads a value, or the default when it is missing or null.

Type parameters

Parameters

Returns

The value, or the default.

Exceptions

GetOptionalProperty<T>(JsonElement, string) extension method

public static T? GetOptionalProperty<T>(this JsonElement element, string propertyName)

Reads a property, or the default when it is missing or null.

Type parameters

Parameters

Returns

The value, or the default.

Exceptions

GetRequiredProperty<T>(JsonElement, string) extension method

public static T GetRequiredProperty<T>(this JsonElement element, string propertyName)

Reads a property.

Type parameters

Parameters

Returns

The value.

Exceptions

TryGet(JsonElement, Type, out object) method

public static bool TryGet(JsonElement value, Type targetType, out object? result)

Converts a JSON value to a type; null converts to null.

Parameters

Returns

Whether the value could be converted.

TryGet<T>(JsonElement, out T) method

public static bool TryGet<T>(JsonElement value, out T? result)

Converts a JSON value; null converts to the default.

Type parameters

Parameters

Returns

Whether the value could be converted.

TryGetPropertyIgnoreCase(JsonElement, string, out JsonElement) extension method

public static bool TryGetPropertyIgnoreCase(this JsonElement element, string propertyName, out JsonElement value)

Finds a property of a JSON object by name, ignoring case.

Parameters

Returns

Whether the property exists.

WorkflowDict(IReadOnlyDictionary<string, JsonElement>, string, string) extension method

public static WorkflowValueDictionary WorkflowDict(this IReadOnlyDictionary<string, JsonElement> source, string workflowName, string missingMessageKey)

Wraps values in a value dictionary.

Parameters

Returns

The value dictionary.

WorkflowMapExecutionChange record

public sealed record WorkflowMapExecutionChange

A changed map execution, written only when its stored version still equals WorkflowMapExecutionChange.ExpectedVersionNo.

WorkflowMapExecutionChange() constructor

public WorkflowMapExecutionChange()

Creates an instance of WorkflowMapExecutionChange.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

Map property

public required WorkflowMapExecutionRecord Map { get; init; }

The new map row.

WorkflowMapExecutionRecord record

public sealed record WorkflowMapExecutionRecord

One durable map execution: its frozen plan, bounds, fan-in and failure policies and status.

WorkflowMapExecutionRecord() constructor

public WorkflowMapExecutionRecord()

Creates an instance of WorkflowMapExecutionRecord.

AbsoluteDeadlineAtUtc property

public DateTime? AbsoluteDeadlineAtUtc { get; init; }

The deadline of the map, in UTC.

CompletedAtUtc property

public DateTime? CompletedAtUtc { get; init; }

When it completed, in UTC.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

ExecutionPlanJson property

public required string ExecutionPlanJson { get; init; }

The map plan, as JSON.

ExecutionPlanSha256 property

public required string ExecutionPlanSha256 { get; init; }

The SHA-256 of the map plan.

FailurePolicy property

public required string FailurePolicy { get; init; }

The failure policy.

FanInPolicy property

public required string FanInPolicy { get; init; }

The fan-in policy.

GlobalActivityClass property

public string? GlobalActivityClass { get; init; }

The class of activities whose concurrency is limited across all maps.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

MaxAggregateStateBytes property

public int MaxAggregateStateBytes { get; init; }

The size limit of the collected results, in bytes.

MaxConcurrency property

public int MaxConcurrency { get; init; }

The items in flight at once.

MaxItems property

public int MaxItems { get; init; }

The items allowed.

MinimumSucceeded property

public int? MinimumSucceeded { get; init; }

The items that must succeed under MIN_SUCCEEDED.

ScopeExecutionId property

public required string ScopeExecutionId { get; init; }

The scope of the map.

Status property

public required string Status { get; init; }

The status.

StepExecutionId property

public required string StepExecutionId { get; init; }

The map step.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowMapItemChange record

public sealed record WorkflowMapItemChange

A changed map item, written only when its stored version still equals WorkflowMapItemChange.ExpectedVersionNo.

WorkflowMapItemChange() constructor

public WorkflowMapItemChange()

Creates an instance of WorkflowMapItemChange.

ExpectedVersionNo property

public long ExpectedVersionNo { get; init; }

The version the stored row must have.

Item property

public required WorkflowMapItemRecord Item { get; init; }

The new item row.

WorkflowMapItemRecord record

public sealed record WorkflowMapItemRecord

One item of a map: its descriptor, claim lease and fence, progress state and terminal outcome.

WorkflowMapItemRecord() constructor

public WorkflowMapItemRecord()

Creates an instance of WorkflowMapItemRecord.

ActiveStepExecutionId property

public string? ActiveStepExecutionId { get; init; }

The step the item runs now.

ClaimExpiresAtUtc property

public DateTime? ClaimExpiresAtUtc { get; init; }

When the claim lease expires, in UTC.

ClaimFence property

public long ClaimFence { get; init; }

The claim fence, raised by each claim.

ClaimOwner property

public string? ClaimOwner { get; init; }

The worker that holds the claim.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DescriptorJson property

public required string DescriptorJson { get; init; }

The item descriptor, as JSON.

DescriptorSha256 property

public required string DescriptorSha256 { get; init; }

The SHA-256 of the item descriptor.

ExecutionStateJson property

public string? ExecutionStateJson { get; init; }

The progress of the item, as JSON.

ItemKey property

public required string ItemKey { get; init; }

The item key.

MapExecutionId property

public required string MapExecutionId { get; init; }

The map execution.

MapItemId property

public required string MapItemId { get; init; }

The map item.

Ordinal property

public int Ordinal { get; init; }

The position of the item in the collection.

SafeResultDescriptorJson property

public string? SafeResultDescriptorJson { get; init; }

The safe result descriptor, as JSON.

Status property

public required string Status { get; init; }

The status.

TerminalOutcome property

public string? TerminalOutcome { get; init; }

The final outcome, once the item finished.

UpdatedAtUtc property

public DateTime UpdatedAtUtc { get; init; }

When the row last changed, in UTC.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowMapStepDefinition<TStartRequest> record

public sealed record WorkflowMapStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs its body once per item of a collection.

Parameters

WorkflowMapStepDefinition(string, WorkflowExpressionDefinition, WorkflowExpressionDefinition, WorkflowExpressionDefinition, string, int, int, int, WorkflowStepSequence<TStartRequest>) constructor

public WorkflowMapStepDefinition(string StepName, WorkflowExpressionDefinition CollectionExpression, WorkflowExpressionDefinition ItemKeyExpression, WorkflowExpressionDefinition ItemResultExpression, string ItemStateKey, int MaxConcurrency, int MaxItems, int MaxAggregateStateBytes, WorkflowStepSequence<TStartRequest> Body)

Runs its body once per item of a collection.

Parameters

Body property

public WorkflowStepSequence<TStartRequest> Body { get; init; }

The steps of the body.

CollectionExpression property

public WorkflowExpressionDefinition CollectionExpression { get; init; }

The collection to map over.

DeadlineSeconds property

public int? DeadlineSeconds { get; init; }

The deadline of the map in seconds.

FailurePolicy property

public string FailurePolicy { get; init; }

What a failed item does; FAIL_FAST by default.

FanInPolicy property

public string FanInPolicy { get; init; }

When the map completes; ALL_SUCCEEDED by default.

GlobalActivityClass property

public string? GlobalActivityClass { get; init; }

A class of activities whose concurrency is limited across all maps.

ItemKeyExpression property

public WorkflowExpressionDefinition ItemKeyExpression { get; init; }

The key of an item, evaluated with the item in the state.

ItemResultExpression property

public WorkflowExpressionDefinition ItemResultExpression { get; init; }

The result of an item, evaluated after its body.

ItemStateKey property

public string ItemStateKey { get; init; }

The state key that holds the current item.

MaxAggregateStateBytes property

public int MaxAggregateStateBytes { get; init; }

The size limit of the collected results, in bytes.

MaxConcurrency property

public int MaxConcurrency { get; init; }

The items in flight at once.

MaxItems property

public int MaxItems { get; init; }

The items allowed in the collection.

MinimumSucceeded property

public int? MinimumSucceeded { get; init; }

The items that must succeed under MIN_SUCCEEDED.

ResultKey property

public string? ResultKey { get; init; }

The key the collected results are kept under.

RetryPolicy property

public WorkflowRetryPolicyDeclaration RetryPolicy { get; init; }

The retry policy of an item.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowMapWrite record

public sealed record WorkflowMapWrite

The changes one map decision makes, written atomically.

WorkflowMapWrite() constructor

public WorkflowMapWrite()

Creates an instance of WorkflowMapWrite.

ChangedItems property

public IReadOnlyList<WorkflowMapItemChange> ChangedItems { get; init; }

Changed items.

ChangedMaps property

public IReadOnlyList<WorkflowMapExecutionChange> ChangedMaps { get; init; }

Changed maps.

NewItems property

public IReadOnlyList<WorkflowMapItemRecord> NewItems { get; init; }

New items.

NewMap property

public WorkflowMapExecutionRecord? NewMap { get; init; }

A new map.

WorkflowModuleCatalogServiceCollectionExtensions class

public static class WorkflowModuleCatalogServiceCollectionExtensions

Registers the module catalog and installed modules.

AddWorkflowModule(IServiceCollection, string, string) extension method

public static IServiceCollection AddWorkflowModule(this IServiceCollection services, string moduleName, string version)

Records moduleName at version as installed, and registers the module catalog.

Parameters

Returns

The same service collection, for chaining.

AddWorkflowModuleCatalog(IServiceCollection) extension method

public static IServiceCollection AddWorkflowModuleCatalog(this IServiceCollection services)

Registers the module catalog, unless it is already registered.

Parameters

Returns

The same service collection, for chaining.

WorkflowModuleRequirementValidationError record

public sealed record WorkflowModuleRequirementValidationError

A finding of a module requirement check.

Parameters

WorkflowModuleRequirementValidationError(string, string, string) constructor

public WorkflowModuleRequirementValidationError(string Code, string Path, string Message)

A finding of a module requirement check.

Parameters

Code property

public string Code { get; init; }

The finding code.

Message property

public string Message { get; init; }

The message.

Path property

public string Path { get; init; }

The path of the requirement.

WorkflowModuleVersionExpression class

public static class WorkflowModuleVersionExpression

Parses module version expressions such as >=1.0.0 <2.0.0.

TryParse(string, out WorkflowModuleVersionRequirement, out string) method

public static bool TryParse(string? expression, out WorkflowModuleVersionRequirement requirement, out string? error)

Parses an expression of clauses separated by spaces or commas; each clause is an optional operator and a major.minor.patch version.

Parameters

Returns

Whether the expression is valid.

WorkflowModuleVersionOperator enum

public enum WorkflowModuleVersionOperator

The comparison of a module version clause.

ValueDescription
Equal = 0Exactly the version (= or no operator).
GreaterThan = 1Above the version (>).
GreaterThanOrEqual = 2The version or above (>=).
LessThan = 3Below the version (<).
LessThanOrEqual = 4The version or below (<=).

WorkflowModuleVersionRequirement record

public sealed record WorkflowModuleVersionRequirement

A module version requirement: every clause must hold.

WorkflowModuleVersionRequirement() constructor

public WorkflowModuleVersionRequirement()

Creates an instance of WorkflowModuleVersionRequirement.

Clauses property

public required IReadOnlyCollection<WorkflowModuleVersionRequirementClause> Clauses { get; init; }

The clauses.

IsSatisfiedBy(string) method

public bool IsSatisfiedBy(string installedVersion)

Whether an installed version meets every clause.

Parameters

Returns

Whether it does; false for a version that is not semantic.

WorkflowModuleVersionRequirementClause record

public sealed record WorkflowModuleVersionRequirementClause

One clause of a module version requirement.

Parameters

WorkflowModuleVersionRequirementClause(WorkflowModuleVersionOperator, Version) constructor

public WorkflowModuleVersionRequirementClause(WorkflowModuleVersionOperator Operator, Version Version)

One clause of a module version requirement.

Parameters

Operator property

public WorkflowModuleVersionOperator Operator { get; init; }

The comparison.

Version property

public Version Version { get; init; }

The version compared with.

WorkflowModuleVersioning class

public static class WorkflowModuleVersioning

Checks module requirements against the installed modules.

Satisfies(WorkflowInstalledModule, WorkflowRequiredModuleDeclaration) method

public static bool Satisfies(WorkflowInstalledModule installedModule, WorkflowRequiredModuleDeclaration requirement)

Whether an installed module meets a requirement: the same name, ignoring case, and a version that meets every clause.

Parameters

Returns

Whether it does.

ValidateRequirementSyntax(WorkflowRequiredModuleDeclaration, string) method

public static IReadOnlyCollection<WorkflowModuleRequirementValidationError> ValidateRequirementSyntax(WorkflowRequiredModuleDeclaration requirement, string path)

Checks a requirement’s syntax: a module name (WFVAL070) and a valid version expression (WFVAL071).

Parameters

Returns

The findings; empty for a valid requirement.

WorkflowOutboxEntry record

public sealed record WorkflowOutboxEntry

One outbox message waiting for delivery. WorkflowOutboxEntry.Channelis the message type or lane it is published on; WorkflowOutboxEntry.MessageIdis the id the receiver de-duplicates on.

WorkflowOutboxEntry() constructor

public WorkflowOutboxEntry()

Creates an instance of WorkflowOutboxEntry.

AggregateId property

public string? AggregateId { get; init; }

The aggregate the entry belongs to, when it has one.

Channel property

public required string Channel { get; init; }

The message type or lane the entry is published on.

DeliveryAttempts property

public int DeliveryAttempts { get; init; }

The delivery attempts so far.

EntryKey property

public required string EntryKey { get; init; }

The key of the entry in its outbox.

Kind property

public required WorkflowOutboxKind Kind { get; init; }

The outbox.

MessageId property

public required string MessageId { get; init; }

The id the receiver de-duplicates on.

PayloadJson property

public required string PayloadJson { get; init; }

The payload, as JSON.

PayloadSha256 property

public required string PayloadSha256 { get; init; }

The SHA-256 of the payload.

WorkflowOutboxKind enum

public enum WorkflowOutboxKind

The durable outboxes an integration publisher drains.

ValueDescription
Durable = 0Durable workflow messages (start results, root continuations, prestart acknowledgements, child links).
ActivityDispatch = 1External-activity dispatch requests.
ActivityCancel = 2External-activity cancel requests.

WorkflowOutboxMessage record

public sealed record WorkflowOutboxMessage

A message appended to the durable outbox in the same write as the state change it announces. The store appends it in the READY delivery state.

WorkflowOutboxMessage() constructor

public WorkflowOutboxMessage()

Creates an instance of WorkflowOutboxMessage.

AggregateId property

public required string AggregateId { get; init; }

The aggregate the message belongs to.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the message was created, in UTC.

EventId property

public required string EventId { get; init; }

The message identifier.

MessageType property

public required string MessageType { get; init; }

The message type.

PayloadJson property

public required string PayloadJson { get; init; }

The payload, as JSON.

PayloadSha256 property

public required string PayloadSha256 { get; init; }

The SHA-256 of the payload.

WorkflowPendingSignalPlan record

public sealed record WorkflowPendingSignalPlan

A signal a plan waits for or sends.

WorkflowPendingSignalPlan() constructor

public WorkflowPendingSignalPlan()

Creates an instance of WorkflowPendingSignalPlan.

AutoDispatch property

public bool AutoDispatch { get; init; }

Whether the engine sends the signal itself; true by default. An external signal is waited for, not sent.

DueAtUtc property

public DateTime? DueAtUtc { get; init; }

When the signal is due, in UTC; at once when not set.

DurableDispatch property

public bool DurableDispatch { get; init; }

Whether a durable dispatcher sends it, such as for an external activity step.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; init; }

The signal payload.

ResumeState property

public IReadOnlyDictionary<string, JsonElement> ResumeState { get; init; }

The state the resume continues with.

SignalType property

public required string SignalType { get; init; }

The signal type.

WaitingToken property

public required string WaitingToken { get; init; }

The token of the wait the signal resumes.

WorkflowPrestartTerminalFence record

public sealed record WorkflowPrestartTerminalFence

A terminal command that arrived before its start request: the start is fenced and never creates a root.

WorkflowPrestartTerminalFence() constructor

public WorkflowPrestartTerminalFence()

Creates an instance of WorkflowPrestartTerminalFence.

AssociationGeneration property

public long AssociationGeneration { get; init; }

The generation of the association.

AssociationId property

public required string AssociationId { get; init; }

The association.

AssociationSha256 property

public required string AssociationSha256 { get; init; }

The SHA-256 of the association.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

RootScopeExecutionId property

public required string RootScopeExecutionId { get; init; }

The root scope.

StartRequestId property

public required string StartRequestId { get; init; }

The start request.

StartRequestSha256 property

public required string StartRequestSha256 { get; init; }

The SHA-256 of the start request.

TerminalCommandEventId property

public required string TerminalCommandEventId { get; init; }

The terminal command.

TerminalCommandSha256 property

public required string TerminalCommandSha256 { get; init; }

The SHA-256 of the terminal command.

TerminalFenceId property

public required string TerminalFenceId { get; init; }

The fence.

TerminalFenceSha256 property

public required string TerminalFenceSha256 { get; init; }

The SHA-256 of the fence.

TerminalFenceVersion property

public long TerminalFenceVersion { get; init; }

The fence version.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowProjectionRetentionBatch record

public sealed record WorkflowProjectionRetentionBatch

The outcome of one retention pass over the projections.

WorkflowProjectionRetentionBatch() constructor

public WorkflowProjectionRetentionBatch()

Creates an instance of WorkflowProjectionRetentionBatch.

PurgedInstances property

public int PurgedInstances { get; init; }

The instances purged.

PurgedTaskEvents property

public int PurgedTaskEvents { get; init; }

The task events purged.

PurgedTasks property

public int PurgedTasks { get; init; }

The tasks purged.

PurgedWorkflowInstanceIds property

public IReadOnlyCollection<string> PurgedWorkflowInstanceIds { get; init; }

The instances purged.

StaleInstancesMarked property

public int StaleInstancesMarked { get; init; }

The instances marked stale.

StaleTasksMarked property

public int StaleTasksMarked { get; init; }

The tasks marked stale.

StaleWorkflowInstanceIds property

public IReadOnlyCollection<string> StaleWorkflowInstanceIds { get; init; }

The instances marked stale.

WorkflowRabbitCallStepDefinition<TStartRequest> record

public sealed record WorkflowRabbitCallStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Defines a RabbitMQ call: a message published to an exchange with a routing key and, for a command-style peer, a command that may wait for a correlated reply.

Parameters

WorkflowRabbitCallStepDefinition(string, string, string, WorkflowRabbitCommandDeclaration, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, string, WorkflowFailureHandlers<TStartRequest>, int?) constructor

public WorkflowRabbitCallStepDefinition(string StepName, string Exchange, string RoutingKey, WorkflowRabbitCommandDeclaration? Command, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory, string? ResultKey, WorkflowFailureHandlers<TStartRequest>? FailureHandlers = null, int? TimeoutSeconds = null)

Defines a RabbitMQ call: a message published to an exchange with a routing key and, for a command-style peer, a command that may wait for a correlated reply.

Parameters

Command property

public WorkflowRabbitCommandDeclaration? Command { get; init; }

The command-style semantics; none for a plain publish.

Exchange property

public string Exchange { get; init; }

The exchange.

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

The failure and timeout branches; none when not set.

PayloadExpression property

public WorkflowExpressionDefinition? PayloadExpression { get; init; }

The payload as an expression, for the canonical definition.

PayloadFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, object?> PayloadFactory { get; init; }

Builds the payload from the context.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

RoutingKey property

public string RoutingKey { get; init; }

The routing key.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

TimeoutSeconds property

public int? TimeoutSeconds { get; init; }

The step timeout in seconds, over all attempts; one hour when not set.

WorkflowReference class

public sealed class WorkflowReference

Refers to the workflow a sub-workflow or continue-with step runs.

WorkflowReference(Func<IWorkflowSpecExecutionContext, string>, Func<IWorkflowSpecExecutionContext, string>) constructor

public WorkflowReference(Func<IWorkflowSpecExecutionContext, string> workflowNameFactory, Func<IWorkflowSpecExecutionContext, string?>? workflowVersionFactory = null)

Refers to a workflow computed from the context. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it.

Parameters

WorkflowReference(string, string) constructor

public WorkflowReference(string workflowName, string? workflowVersion = null)

Refers to a workflow by name and optionally version; it has a canonical form.

Parameters

StaticWorkflowName property

public string? StaticWorkflowName { get; }

The workflow name, when it was given as a value.

StaticWorkflowVersion property

public string? StaticWorkflowVersion { get; }

The version, when it was given as a value.

WorkflowNameFactory property

public Func<IWorkflowSpecExecutionContext, string> WorkflowNameFactory { get; }

Computes the workflow name.

WorkflowVersionFactory property

public Func<IWorkflowSpecExecutionContext, string?>? WorkflowVersionFactory { get; }

Computes the version.

BuildStartWorkflowRequest(IWorkflowSpecExecutionContext, object, WorkflowBusinessReference) method

public StartWorkflowRequest BuildStartWorkflowRequest(IWorkflowSpecExecutionContext context, object? payload, WorkflowBusinessReference? businessReference = null)

Builds the start request of the referred workflow.

Parameters

Returns

The start request.

TryBuildCanonicalInvocationDeclaration(WorkflowExpressionDefinition, WorkflowBusinessReferenceDeclaration) method

public WorkflowWorkflowInvocationDeclaration? TryBuildCanonicalInvocationDeclaration(WorkflowExpressionDefinition? payloadExpression = null, WorkflowBusinessReferenceDeclaration? businessReference = null)

Builds the canonical invocation, when the workflow was given as a value.

Parameters

Returns

The invocation, or null for a computed workflow.

WorkflowRegisteredSignalInboxEntry record

public sealed record WorkflowRegisteredSignalInboxEntry

A received external signal, kept for exact replay and for a wait registered after it arrived.

WorkflowRegisteredSignalInboxEntry() constructor

public WorkflowRegisteredSignalInboxEntry()

Creates an instance of WorkflowRegisteredSignalInboxEntry.

CanonicalRequestJson property

public required string CanonicalRequestJson { get; init; }

The canonical request, as JSON.

Disposition property

public required string Disposition { get; init; }

How the signal was handled.

PayloadJson property

public required string PayloadJson { get; init; }

The payload, as JSON.

PayloadSha256 property

public required string PayloadSha256 { get; init; }

The SHA-256 of the payload.

ReceivedAtUtc property

public DateTime ReceivedAtUtc { get; init; }

When it was received, in UTC.

RequestSha256 property

public required string RequestSha256 { get; init; }

The SHA-256 of the request.

ResolvedAtUtc property

public DateTime? ResolvedAtUtc { get; init; }

When it was resolved, in UTC.

ServiceAudience property

public required string ServiceAudience { get; init; }

The service audience allowed to raise it.

SignalCode property

public required string SignalCode { get; init; }

The signal code.

SignalEventId property

public required string SignalEventId { get; init; }

The signal event.

SignalKey property

public required string SignalKey { get; init; }

The signal key.

SignalRegistrationId property

public string? SignalRegistrationId { get; init; }

The wait that took the signal, when one did.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowRegisteredSignalWait record

public sealed record WorkflowRegisteredSignalWait

A registered wait for one external signal, raced by its deadline timer.

WorkflowRegisteredSignalWait() constructor

public WorkflowRegisteredSignalWait()

Creates an instance of WorkflowRegisteredSignalWait.

ExpectedExecutionVersion property

public long ExpectedExecutionVersion { get; init; }

The execution version the wait was registered at.

PayloadJson property

public string? PayloadJson { get; init; }

The signal payload, as JSON.

PayloadSha256 property

public string? PayloadSha256 { get; init; }

The SHA-256 of the signal payload.

RegisteredAtUtc property

public DateTime RegisteredAtUtc { get; init; }

When the wait was registered, in UTC.

ResolvedAtUtc property

public DateTime? ResolvedAtUtc { get; init; }

When it was resolved, in UTC.

ResolvedByEventId property

public string? ResolvedByEventId { get; init; }

The signal that resolved the wait.

ResolvedByTimerId property

public string? ResolvedByTimerId { get; init; }

The deadline timer that resolved the wait.

ServiceAudience property

public required string ServiceAudience { get; init; }

The service audience allowed to raise it.

SignalCode property

public required string SignalCode { get; init; }

The signal code.

SignalKey property

public required string SignalKey { get; init; }

The signal key.

SignalRegistrationId property

public required string SignalRegistrationId { get; init; }

The registered wait.

Status property

public required string Status { get; init; }

The status.

VersionNo property

public long VersionNo { get; init; }

The row version, raised by each change.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowRegisteredSignalWrite record

public sealed record WorkflowRegisteredSignalWrite

The changes one registered-signal operation makes, written atomically. A changed wait is written only when its stored version still equals WorkflowRegisteredSignalWrite.ChangedWaitExpectedVersion.

WorkflowRegisteredSignalWrite() constructor

public WorkflowRegisteredSignalWrite()

Creates an instance of WorkflowRegisteredSignalWrite.

ChangedInbox property

public WorkflowRegisteredSignalInboxEntry? ChangedInbox { get; init; }

A changed inbox entry.

ChangedTimer property

public WorkflowSignalDeadlineTimer? ChangedTimer { get; init; }

A changed timer.

ChangedWait property

public WorkflowRegisteredSignalWait? ChangedWait { get; init; }

A changed wait.

ChangedWaitExpectedVersion property

public long ChangedWaitExpectedVersion { get; init; }

The version the stored wait must have.

NewInbox property

public WorkflowRegisteredSignalInboxEntry? NewInbox { get; init; }

A new inbox entry.

NewTimer property

public WorkflowSignalDeadlineTimer? NewTimer { get; init; }

A new timer.

NewWait property

public WorkflowRegisteredSignalWait? NewWait { get; init; }

A new wait.

WorkflowRegistration record

public sealed record WorkflowRegistration

A registered workflow: its definition, its start request type and its execution handler.

WorkflowRegistration() constructor

public WorkflowRegistration()

Creates an instance of WorkflowRegistration.

BindStartRequest property

public required Func<IDictionary<string, object?>, object> BindStartRequest { get; init; }

Binds a start payload to the start request type.

BusinessReferenceKeyPropertyName property

public string? BusinessReferenceKeyPropertyName { get; init; }

The start request property marked with WorkflowBusinessIdAttribute, when one is.

Definition property

public required WorkflowDefinitionDescriptor Definition { get; init; }

The definition descriptor: name, version, display name, roles and tasks.

ExtractBusinessReference property

public required Func<object, WorkflowBusinessReference?> ExtractBusinessReference { get; init; }

Reads the business reference of a start request: its key and its parts.

HandlerType property

public Type? HandlerType { get; init; }

The execution handler type, or null for a workflow without a handler.

StartRequestType property

public required Type StartRequestType { get; init; }

The type the start payload binds to; a dictionary for a workflow without a start request type.

WorkflowType property

public required Type WorkflowType { get; init; }

The workflow type.

WorkflowRegistrationServiceCollectionExtensions class

public static class WorkflowRegistrationServiceCollectionExtensions

Registers workflow definitions: each registration records the definition, its start request type and, when given, its execution handler.

AddWorkflowRegistration<TWorkflow, TRegistrationArgument>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowRegistration<TWorkflow, TRegistrationArgument>(this IServiceCollection services) where TWorkflow : class, IWorkflow, new() where TRegistrationArgument : class

Registers TWorkflow with an execution handler or a start request type. When TRegistrationArgument implements IWorkflowExecutionHandler, it is the handler (registered scoped); otherwise it is the start request type, and the workflow must implement IWorkflow<TStartRequest>for it.

Type parameters

Parameters

Returns

The same service collection, for chaining.

AddWorkflowRegistration<TWorkflow, TStartRequest, THandler>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowRegistration<TWorkflow, TStartRequest, THandler>(this IServiceCollection services) where TWorkflow : class, IWorkflow<TStartRequest>, new() where TStartRequest : class where THandler : class, IWorkflowExecutionHandler

Registers TWorkflow with its start request type and its execution handler, which is registered scoped.

Type parameters

Parameters

Returns

The same service collection, for chaining.

AddWorkflowRegistration<TWorkflow>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowRegistration<TWorkflow>(this IServiceCollection services) where TWorkflow : class, IWorkflow, new()

Registers TWorkflow. The start request type comes from the IWorkflow<TStartRequest>the workflow implements; without one, the start payload binds to a dictionary.

Type parameters

Parameters

Returns

The same service collection, for chaining.

WorkflowRenderEdge record

public sealed record WorkflowRenderEdge

An edge of a render graph, before layout.

WorkflowRenderEdge() constructor

public WorkflowRenderEdge()

Creates an instance of WorkflowRenderEdge.

Id property

public required string Id { get; init; }

The edge identifier.

Kind property

public string? Kind { get; init; }

The edge kind.

Label property

public string? Label { get; init; }

The label.

SourceNodeId property

public required string SourceNodeId { get; init; }

The source node.

SourcePortId property

public string? SourcePortId { get; init; }

The source port, when the edge leaves a port.

TargetNodeId property

public required string TargetNodeId { get; init; }

The target node.

TargetPortId property

public string? TargetPortId { get; init; }

The target port, when the edge enters a port.

WorkflowRenderEdgeSection record

public sealed record WorkflowRenderEdgeSection

A routed section of an edge.

WorkflowRenderEdgeSection() constructor

public WorkflowRenderEdgeSection()

Creates an instance of WorkflowRenderEdgeSection.

BendPoints property

public IReadOnlyCollection<WorkflowRenderPoint> BendPoints { get; init; }

The bends between them.

EndPoint property

public required WorkflowRenderPoint EndPoint { get; init; }

Where the section ends.

StartPoint property

public required WorkflowRenderPoint StartPoint { get; init; }

Where the section starts.

WorkflowRenderGraph record

public sealed record WorkflowRenderGraph

The nodes and edges of a workflow diagram, before layout.

WorkflowRenderGraph() constructor

public WorkflowRenderGraph()

Creates an instance of WorkflowRenderGraph.

Edges property

public required IReadOnlyCollection<WorkflowRenderEdge> Edges { get; init; }

The edges.

Id property

public required string Id { get; init; }

The graph identifier.

Nodes property

public required IReadOnlyCollection<WorkflowRenderNode> Nodes { get; init; }

The nodes.

WorkflowRenderLayoutDirection enum

public enum WorkflowRenderLayoutDirection

The direction of the flow in a diagram.

ValueDescription
TopToBottom = 0From top to bottom.
LeftToRight = 1From left to right.

WorkflowRenderLayoutEffort enum

public enum WorkflowRenderLayoutEffort

How hard the layout works on node order and placement.

ValueDescription
Draft = 0The fastest layout.
Balanced = 1A balance of speed and quality.
Best = 2The best layout, the slowest.

WorkflowRenderLayoutProviderNames class

public static class WorkflowRenderLayoutProviderNames

The layout provider names.

ElkJs constant

public const string ElkJs = "ElkJs"

The name reserved for an ElkJS layout provider. No released package provides one; a request that names it fails as not registered.

ElkSharp constant

public const string ElkSharp = "ElkSharp"

The ElkSharp layered layout, the default.

Msagl constant

public const string Msagl = "Msagl"

The name reserved for an MSAGL layout provider. No released package provides one; a request that names it fails as not registered.

WorkflowRenderLayoutRequest record

public sealed record WorkflowRenderLayoutRequest

The settings of a layout.

WorkflowRenderLayoutRequest() constructor

public WorkflowRenderLayoutRequest()

Creates an instance of WorkflowRenderLayoutRequest.

Direction property

public WorkflowRenderLayoutDirection Direction { get; init; }

The flow direction; left to right by default.

Effort property

public WorkflowRenderLayoutEffort Effort { get; init; }

The layout effort; WorkflowRenderLayoutEffort.Bestby default.

LayerSpacing property

public double LayerSpacing { get; init; }

The space between layers; 60 by default.

NodeSpacing property

public double NodeSpacing { get; init; }

The space between nodes of a layer; 40 by default.

OrderingIterations property

public int? OrderingIterations { get; init; }

The node ordering iterations; the engine’s choice when not set.

PlacementIterations property

public int? PlacementIterations { get; init; }

The node placement iterations; the engine’s choice when not set.

WorkflowRenderLayoutResult record

public sealed record WorkflowRenderLayoutResult

A laid-out diagram: positioned nodes and routed edges.

WorkflowRenderLayoutResult() constructor

public WorkflowRenderLayoutResult()

Creates an instance of WorkflowRenderLayoutResult.

Edges property

public required IReadOnlyCollection<WorkflowRenderRoutedEdge> Edges { get; init; }

The routed edges.

GraphId property

public required string GraphId { get; init; }

The graph identifier.

Nodes property

public required IReadOnlyCollection<WorkflowRenderPositionedNode> Nodes { get; init; }

The positioned nodes.

WorkflowRenderNode record

public sealed record WorkflowRenderNode

A node of a render graph, before layout.

WorkflowRenderNode() constructor

public WorkflowRenderNode()

Creates an instance of WorkflowRenderNode.

Height property

public double Height { get; init; }

The node height; 72 by default.

IconKey property

public string? IconKey { get; init; }

The icon of the node.

Id property

public required string Id { get; init; }

The node identifier.

Kind property

public required string Kind { get; init; }

The node kind, such as Start, End, HumanTask, TransportCall or Decision.

Label property

public required string Label { get; init; }

The label.

ParentNodeId property

public string? ParentNodeId { get; init; }

The node that contains this one, when it is nested.

Ports property

public IReadOnlyCollection<WorkflowRenderPort> Ports { get; init; }

The ports of the node.

Route property

public string? Route { get; init; }

The route of a human task node.

SemanticKey property

public string? SemanticKey { get; init; }

The name of what the node stands for, such as the task or step name.

SemanticType property

public string? SemanticType { get; init; }

What the node stands for, such as Task or Decision.

TaskType property

public string? TaskType { get; init; }

The task type of a human task node.

Width property

public double Width { get; init; }

The node width; 160 by default.

WorkflowRenderPoint record

public sealed record WorkflowRenderPoint

A point of a laid-out diagram.

WorkflowRenderPoint() constructor

public WorkflowRenderPoint()

Creates an instance of WorkflowRenderPoint.

X property

public required double X { get; init; }

The horizontal position.

Y property

public required double Y { get; init; }

The vertical position.

WorkflowRenderPort record

public sealed record WorkflowRenderPort

A port of a render node.

WorkflowRenderPort() constructor

public WorkflowRenderPort()

Creates an instance of WorkflowRenderPort.

Height property

public double Height { get; init; }

The port height; 8 by default.

Id property

public required string Id { get; init; }

The port identifier.

Side property

public string? Side { get; init; }

The side of the node the port is on.

Width property

public double Width { get; init; }

The port width; 8 by default.

WorkflowRenderPositionedNode record

public sealed record WorkflowRenderPositionedNode

A positioned node.

WorkflowRenderPositionedNode() constructor

public WorkflowRenderPositionedNode()

Creates an instance of WorkflowRenderPositionedNode.

Height property

public double Height { get; init; }

The node height.

IconKey property

public string? IconKey { get; init; }

The icon of the node.

Id property

public required string Id { get; init; }

The node identifier.

Kind property

public required string Kind { get; init; }

The node kind, such as Start, End, HumanTask, TransportCall or Decision.

Label property

public required string Label { get; init; }

The label.

ParentNodeId property

public string? ParentNodeId { get; init; }

The node that contains this one, when it is nested.

Ports property

public IReadOnlyCollection<WorkflowRenderPositionedPort> Ports { get; init; }

The positioned ports.

Route property

public string? Route { get; init; }

The route of a human task node.

SemanticKey property

public string? SemanticKey { get; init; }

The name of what the node stands for, such as the task or step name.

SemanticType property

public string? SemanticType { get; init; }

What the node stands for, such as Task or Decision.

TaskType property

public string? TaskType { get; init; }

The task type of a human task node.

Width property

public double Width { get; init; }

The node width.

X property

public double X { get; init; }

The left edge of the node.

Y property

public double Y { get; init; }

The top edge of the node.

WorkflowRenderPositionedPort record

public sealed record WorkflowRenderPositionedPort

A positioned port.

WorkflowRenderPositionedPort() constructor

public WorkflowRenderPositionedPort()

Creates an instance of WorkflowRenderPositionedPort.

Height property

public double Height { get; init; }

The port height.

Id property

public required string Id { get; init; }

The port identifier.

Side property

public string? Side { get; init; }

The side of the node the port is on.

Width property

public double Width { get; init; }

The port width.

X property

public double X { get; init; }

The left edge of the port.

Y property

public double Y { get; init; }

The top edge of the port.

WorkflowRenderRoutedEdge record

public sealed record WorkflowRenderRoutedEdge

A routed edge.

WorkflowRenderRoutedEdge() constructor

public WorkflowRenderRoutedEdge()

Creates an instance of WorkflowRenderRoutedEdge.

Id property

public required string Id { get; init; }

The edge identifier.

Kind property

public string? Kind { get; init; }

The edge kind.

Label property

public string? Label { get; init; }

The label.

Sections property

public IReadOnlyCollection<WorkflowRenderEdgeSection> Sections { get; init; }

The routed sections.

SourceNodeId property

public required string SourceNodeId { get; init; }

The source node.

SourcePortId property

public string? SourcePortId { get; init; }

The source port, when the edge leaves a port.

TargetNodeId property

public required string TargetNodeId { get; init; }

The target node.

TargetPortId property

public string? TargetPortId { get; init; }

The target port, when the edge enters a port.

WorkflowRenderingOptions class

public sealed class WorkflowRenderingOptions

The layout engine of rendered workflow diagrams (WorkflowRendering).

WorkflowRenderingOptions() constructor

public WorkflowRenderingOptions()

Creates an instance of WorkflowRenderingOptions.

SectionName constant

public const string SectionName = "WorkflowRendering"

The configuration section the options bind from: WorkflowRendering.

LayoutProvider property

public string? LayoutProvider { get; set; }

The diagram layout provider, for example ElkSharp; ElkSharp when not set. A render request can name its own provider.

WorkflowRepeatStepDefinition<TStartRequest> record

public sealed record WorkflowRepeatStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs its body while a condition holds, at most a number of times.

Parameters

WorkflowRepeatStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, int>, WorkflowStepSequence<TStartRequest>, Func<WorkflowSpecExecutionContext<TStartRequest>, bool>) constructor

public WorkflowRepeatStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, int> MaxIterationsFactory, WorkflowStepSequence<TStartRequest> Body, Func<WorkflowSpecExecutionContext<TStartRequest>, bool>? ContinueWhileEvaluator = null)

Runs its body while a condition holds, at most a number of times.

Parameters

Body property

public WorkflowStepSequence<TStartRequest> Body { get; init; }

The steps of the body.

ContinueWhileEvaluator property

public Func<WorkflowSpecExecutionContext<TStartRequest>, bool>? ContinueWhileEvaluator { get; init; }

The condition to run another iteration; none when not set.

ContinueWhileExpression property

public WorkflowExpressionDefinition? ContinueWhileExpression { get; init; }

The condition as an expression, for the canonical definition.

IterationStateKey property

public string? IterationStateKey { get; init; }

The state key that holds the iteration number; not kept when not set.

MaxIterationsExpression property

public WorkflowExpressionDefinition? MaxIterationsExpression { get; init; }

The maximum as an expression, for the canonical definition.

MaxIterationsFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, int> MaxIterationsFactory { get; init; }

Computes the maximum number of iterations.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowRetentionOverride record

public sealed record WorkflowRetentionOverride

Optional override passed from the admin UI to bypass the projection’s pre-computed StaleAfterUtc / PurgeAfterUtc values and force retention based on the instance’s age directly.

WorkflowRetentionOverride() constructor

public WorkflowRetentionOverride()

Creates an instance of WorkflowRetentionOverride.

CompletedOlderThanUtc property

public DateTime? CompletedOlderThanUtc { get; init; }

Purge completed/cancelled instances whose CompletedOnUtc <= this threshold.

RunningOlderThanUtc property

public DateTime? RunningOlderThanUtc { get; init; }

Mark running (Open) instances whose CreatedOnUtc <= this threshold as stale.

WorkflowRootExecutionStart record

public sealed record WorkflowRootExecutionStart

The rows a committed start creates for its root execution: the instance, its runtime state, the root scope, the open association and the first history event (sequence 1).

WorkflowRootExecutionStart() constructor

public WorkflowRootExecutionStart()

Creates an instance of WorkflowRootExecutionStart.

AssociationGeneration property

public long AssociationGeneration { get; init; }

The generation of the association.

AssociationId property

public required string AssociationId { get; init; }

The association.

AssociationSha256 property

public required string AssociationSha256 { get; init; }

The SHA-256 of the association.

BusinessReferenceSha256 property

public required string BusinessReferenceSha256 { get; init; }

The SHA-256 of the business reference.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DefinitionCode property

public required string DefinitionCode { get; init; }

The workflow definition.

DefinitionSha256 property

public required string DefinitionSha256 { get; init; }

The SHA-256 of the definition.

DefinitionVersion property

public required string DefinitionVersion { get; init; }

The definition version.

FirstEvent property

public required WorkflowHistoryEvent FirstEvent { get; init; }

The first history event (sequence 1).

InitialStateJson property

public required string InitialStateJson { get; init; }

The initial state, as JSON.

InstanceStatus property

public required string InstanceStatus { get; init; }

The instance status.

OpenStatus property

public required string OpenStatus { get; init; }

The status of the open association.

RetentionPolicy property

public required string RetentionPolicy { get; init; }

The retention policy.

RootScopeCode property

public required string RootScopeCode { get; init; }

The root scope code.

RootScopeExecutionId property

public required string RootScopeExecutionId { get; init; }

The root scope.

RootScopeVersion property

public required string RootScopeVersion { get; init; }

The root scope version.

RuntimeProvider property

public required string RuntimeProvider { get; init; }

The runtime provider.

RuntimeStatus property

public required string RuntimeStatus { get; init; }

The runtime status.

StartRequestId property

public required string StartRequestId { get; init; }

The start request.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowRuntimeDefinition record

public sealed record WorkflowRuntimeDefinition

A workflow the engine can run: its registration, descriptor and, for a declarative workflow, its canonical definition.

WorkflowRuntimeDefinition() constructor

public WorkflowRuntimeDefinition()

Creates an instance of WorkflowRuntimeDefinition.

CanonicalDefinition property

public WorkflowCanonicalDefinition? CanonicalDefinition { get; init; }

The canonical definition of a declarative workflow.

Descriptor property

public required WorkflowDefinitionDescriptor Descriptor { get; init; }

The definition descriptor: name, version, roles and tasks.

ExecutionKind property

public required WorkflowRuntimeExecutionKind ExecutionKind { get; init; }

How the engine runs it.

Registration property

public required WorkflowRegistration Registration { get; init; }

The registration.

WorkflowRuntimeExecutionKind enum

public enum WorkflowRuntimeExecutionKind

How the engine runs a registered workflow.

ValueDescription
DefinitionOnly = 0The registration has a definition only; the engine creates no handler.
CustomHandler = 1The registration names its own execution handler.
Declarative = 2The engine runs the canonical definition compiled from the workflow’s C# specification.

WorkflowRuntimeExecutionResult record

public sealed record WorkflowRuntimeExecutionResult

The outcome of a runtime step of an instance.

WorkflowRuntimeExecutionResult() constructor

public WorkflowRuntimeExecutionResult()

Creates an instance of WorkflowRuntimeExecutionResult.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference after the step.

CancelledTaskTokens property

public IReadOnlyCollection<string> CancelledTaskTokens { get; init; }

Runtime task tokens of open tasks the engine closed because another fork branch ended the fork.

Continuations property

public IReadOnlyCollection<WorkflowContinuationPlan> Continuations { get; init; }

The workflows to start next.

ExpiredTaskTokens property

public IReadOnlyCollection<string> ExpiredTaskTokens { get; init; }

Runtime task tokens of open tasks the engine closed because their timeout fired.

Ignored property

public bool Ignored { get; init; }

Whether the runtime ignored the step, such as a duplicate or stale signal.

InstanceStatus property

public required string InstanceStatus { get; init; }

The instance status.

PendingSignals property

public IReadOnlyCollection<WorkflowPendingSignalPlan> PendingSignals { get; init; }

The signals to wait for or send.

RuntimeInstanceId property

public string? RuntimeInstanceId { get; init; }

The runtime instance.

RuntimeProvider property

public required string RuntimeProvider { get; init; }

The runtime provider.

RuntimeState property

public object? RuntimeState { get; init; }

The runtime state to store.

RuntimeStatus property

public string? RuntimeStatus { get; init; }

The runtime status.

Tasks property

public IReadOnlyCollection<WorkflowExecutionTaskPlan> Tasks { get; init; }

The tasks to open.

WorkflowState property

public IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }

The workflow state after the step.

WorkflowRuntimePayloadKeys class

public static class WorkflowRuntimePayloadKeys

The payload keys the engine reserves.

ProjectionWorkflowInstanceIdPayloadKey constant

public const string ProjectionWorkflowInstanceIdPayloadKey = "__stellaops.projectionWorkflowInstanceId"

The reserved key of the projection’s instance id.

ReservedKeyPrefix constant

public const string ReservedKeyPrefix = "__stellaops."

Prefix for engine-reserved state and task-payload keys. Reserved keys are engine bookkeeping: they are stripped before a payload is handed to a caller and are never authored in a workflow definition.

RuntimeProviderPayloadKey constant

public const string RuntimeProviderPayloadKey = "runtimeProvider"

The key of the runtime provider.

RuntimeTaskTokenPayloadKey constant

public const string RuntimeTaskTokenPayloadKey = "runtimeTaskToken"

The key of the runtime task token.

WorkflowRuntimeProviderNames class

public static class WorkflowRuntimeProviderNames

The names of the runtime providers.

Engine constant

public const string Engine = "Stella.Engine"

The durable engine runtime: Stella.Engine.

InProcess constant

public const string InProcess = "Stella.InProcess"

The in-process runtime: Stella.InProcess.

WorkflowRuntimeStateConcurrencyException class

public sealed class WorkflowRuntimeStateConcurrencyException : Exception

Raised when a runtime state write loses its version check: another write changed the instance first.

WorkflowRuntimeStateConcurrencyException(string, long, long) constructor

public WorkflowRuntimeStateConcurrencyException(string workflowInstanceId, long expectedVersion, long actualVersion)

Creates the exception.

Parameters

ActualVersion property

public long ActualVersion { get; }

The version found.

ExpectedVersion property

public long ExpectedVersion { get; }

The version the write expected.

WorkflowInstanceId property

public string WorkflowInstanceId { get; }

The instance.

WorkflowRuntimeStateRecord record

public sealed record WorkflowRuntimeStateRecord

The runtime state of an instance, versioned for optimistic concurrency.

WorkflowRuntimeStateRecord() constructor

public WorkflowRuntimeStateRecord()

Creates an instance of WorkflowRuntimeStateRecord.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference.

CompletedOnUtc property

public DateTime? CompletedOnUtc { get; init; }

When it completed, in UTC.

CreatedOnUtc property

public DateTime CreatedOnUtc { get; init; }

When the instance started, in UTC.

LastUpdatedOnUtc property

public DateTime LastUpdatedOnUtc { get; init; }

When it last changed, in UTC.

PurgeAfterUtc property

public DateTime? PurgeAfterUtc { get; init; }

When it may be purged, in UTC.

RuntimeInstanceId property

public required string RuntimeInstanceId { get; init; }

The runtime instance.

RuntimeProvider property

public string RuntimeProvider { get; init; }

The runtime provider.

RuntimeStatus property

public string RuntimeStatus { get; init; }

The runtime status; Open by default.

StaleAfterUtc property

public DateTime? StaleAfterUtc { get; init; }

When it becomes stale, in UTC.

StateJson property

public string StateJson { get; init; }

The runtime state, as JSON.

Version property

public long Version { get; init; }

The version; a write must raise it by one from the stored version.

WorkflowInstanceId property

public required string WorkflowInstanceId { get; init; }

The instance.

WorkflowName property

public required string WorkflowName { get; init; }

The workflow name.

WorkflowVersion property

public required string WorkflowVersion { get; init; }

The workflow version.

WorkflowScopeReprocess record

public sealed record WorkflowScopeReprocess

An operator request to run a scope again as a tagged successor occurrence.

WorkflowScopeReprocess() constructor

public WorkflowScopeReprocess()

Creates an instance of WorkflowScopeReprocess.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

OccurrenceNumber property

public int OccurrenceNumber { get; init; }

The occurrence number of the new scope.

ReasonCode property

public required string ReasonCode { get; init; }

Why.

ReprocessId property

public required string ReprocessId { get; init; }

The reprocess request.

RequestedBy property

public required string RequestedBy { get; init; }

Who requested it.

SourceScopeExecutionId property

public required string SourceScopeExecutionId { get; init; }

The scope to run again.

Status property

public required string Status { get; init; }

The status.

SuccessorScopeExecutionId property

public required string SuccessorScopeExecutionId { get; init; }

The new scope occurrence.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowSignalDeadlineTimer record

public sealed record WorkflowSignalDeadlineTimer

The deadline timer of a registered wait.

WorkflowSignalDeadlineTimer() constructor

public WorkflowSignalDeadlineTimer()

Creates an instance of WorkflowSignalDeadlineTimer.

CreatedAtUtc property

public DateTime CreatedAtUtc { get; init; }

When the row was created, in UTC.

DueAtUtc property

public DateTime DueAtUtc { get; init; }

When the timer is due, in UTC.

ExpectedWaitVersion property

public long ExpectedWaitVersion { get; init; }

The wait version the timer resolves.

FiredAtUtc property

public DateTime? FiredAtUtc { get; init; }

When the timer fired, in UTC.

SignalRegistrationId property

public required string SignalRegistrationId { get; init; }

The registered wait.

Status property

public required string Status { get; init; }

The status.

TimerId property

public required string TimerId { get; init; }

The timer.

WorkflowSignalDriverConfigurationExtensions class

public static class WorkflowSignalDriverConfigurationExtensions

Reads the configured signal driver.

GetWorkflowSignalDriverProvider(IConfiguration) extension method

public static string GetWorkflowSignalDriverProvider(this IConfiguration configuration)

Returns WorkflowSignalDriver:Provider; Native when not set.

Parameters

Returns

The driver name.

WorkflowSignalDriverDispatchMode enum

public enum WorkflowSignalDriverDispatchMode

When the engine tells the signal driver that a signal is available.

ValueDescription
NativeTransactional = 0The engine calls the driver right after it stores the signal.
PostCommitNotification = 1The engine calls the driver after the workflow changes commit, or at once when no change scope is open.
WakeOutbox = 2The engine writes the wake notification to the IWorkflowWakeOutboxinstead of calling the driver.

WorkflowSignalDriverNames class

public static class WorkflowSignalDriverNames

The names of the signal drivers, for WorkflowSignalDriver:Provider.

Native constant

public const string Native = "Native"

The signal driver of the durable store itself.

Redis constant

public const string Redis = "Redis"

The Redis wake driver.

WorkflowSignalDriverOptions class

public sealed class WorkflowSignalDriverOptions

The signal driver the host uses (WorkflowSignalDriver).

WorkflowSignalDriverOptions() constructor

public WorkflowSignalDriverOptions()

Creates an instance of WorkflowSignalDriverOptions.

SectionName constant

public const string SectionName = "WorkflowSignalDriver"

The configuration section the options bind from: WorkflowSignalDriver.

Provider property

public string Provider { get; set; }

The signal driver: Native (the store’s own signal queue; the default, also when unset) or Redis.

WorkflowSignalDriverRegistrationMarker record

public sealed record WorkflowSignalDriverRegistrationMarker : IWorkflowSignalDriverRegistrationMarker

The registration marker of a signal driver.

Parameters

WorkflowSignalDriverRegistrationMarker(string) constructor

public WorkflowSignalDriverRegistrationMarker(string DriverName)

The registration marker of a signal driver.

Parameters

DriverName property

public string DriverName { get; init; }

The driver name.

WorkflowSignalEnvelope record

public sealed record WorkflowSignalEnvelope

A signal for a workflow instance, as the signal store keeps it.

WorkflowSignalEnvelope() constructor

public WorkflowSignalEnvelope()

Creates an instance of WorkflowSignalEnvelope.

DueAtUtc property

public DateTime? DueAtUtc { get; init; }

When the signal becomes available, in UTC; at once when not set.

ExpectedVersion property

public required long ExpectedVersion { get; init; }

The runtime-state version the signal was raised against.

OccurredAtUtc property

public DateTime OccurredAtUtc { get; init; }

When the signal was raised, in UTC.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; init; }

The signal payload.

RuntimeProvider property

public required string RuntimeProvider { get; init; }

The runtime provider of the instance.

SignalId property

public required string SignalId { get; init; }

The signal identifier.

SignalType property

public required string SignalType { get; init; }

The signal type; see WorkflowSignalTypes.

WaitingToken property

public string? WaitingToken { get; init; }

The wait the signal resumes, when it targets one.

WorkflowInstanceId property

public required string WorkflowInstanceId { get; init; }

The instance the signal is for.

WorkflowSignalExecutionContext record

public sealed record WorkflowSignalExecutionContext

What the runtime gets to resume an instance with a signal.

WorkflowSignalExecutionContext() constructor

public WorkflowSignalExecutionContext()

Creates an instance of WorkflowSignalExecutionContext.

Definition property

public required WorkflowDefinitionDescriptor Definition { get; init; }

The definition descriptor.

Registration property

public required WorkflowRegistration Registration { get; init; }

The workflow registration.

RuntimeState property

public required WorkflowRuntimeStateRecord RuntimeState { get; init; }

The runtime state of the instance.

Signal property

public required WorkflowSignalEnvelope Signal { get; init; }

The signal.

WorkflowSignalPayloadKeys class

public static class WorkflowSignalPayloadKeys

The payload keys of the engine’s own signals.

ExternalActivityContractVersionPayloadKey constant

public const string ExternalActivityContractVersionPayloadKey = "contractVersion"

The key of the contract version of an external activity.

ExternalActivityDestinationPayloadKey constant

public const string ExternalActivityDestinationPayloadKey = "destinationCode"

The key of the destination of an external activity.

ExternalActivityLogicalStepKeyPayloadKey constant

public const string ExternalActivityLogicalStepKeyPayloadKey = "logicalStepKey"

The key of the step of an external activity.

ExternalActivityOperationPayloadKey constant

public const string ExternalActivityOperationPayloadKey = "operationCode"

The key of the operation of an external activity.

ExternalActivityRequestPayloadKey constant

public const string ExternalActivityRequestPayloadKey = "request"

The key of the request of an external activity.

ExternalSignalNamePayloadKey constant

public const string ExternalSignalNamePayloadKey = "signalName"

The key of the signal name of an external signal.

MapMaterializationPlanPayloadKey constant

public const string MapMaterializationPlanPayloadKey = "mapMaterializationPlan"

The key of the item plan of a map.

MapResultPayloadKey constant

public const string MapResultPayloadKey = "mapResult"

The key of the collected results of a map.

StartWorkflowRequestPayloadKey constant

public const string StartWorkflowRequestPayloadKey = "startWorkflowRequest"

The key of the start request of a sub-workflow or continue-with signal.

WorkflowSignalResumeContext record

public sealed record WorkflowSignalResumeContext

What an execution handler gets to resume an instance with a signal.

WorkflowSignalResumeContext() constructor

public WorkflowSignalResumeContext()

Creates an instance of WorkflowSignalResumeContext.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference.

Continuations property

public IReadOnlyCollection<WorkflowContinuationPlan> Continuations { get; init; }

The continuations already planned.

ResumeState property

public IReadOnlyDictionary<string, JsonElement> ResumeState { get; init; }

The state the wait recorded.

Signal property

public required WorkflowSignalEnvelope Signal { get; init; }

The signal.

WorkflowState property

public required IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }

The workflow state.

WorkflowSignalTypes class

public static class WorkflowSignalTypes

The types of the engine’s signals.

ExternalActivity constant

public const string ExternalActivity = "ExternalActivity"

An external activity reported its outcome.

ExternalSignal constant

public const string ExternalSignal = "ExternalSignal"

A caller raised a signal for the instance.

InternalContinue constant

public const string InternalContinue = "InternalContinue"

The engine continues the instance by itself.

MapCompleted constant

public const string MapCompleted = "MapCompleted"

A map step finished.

RetryDue constant

public const string RetryDue = "RetryDue"

A retry is due.

SubWorkflowCompleted constant

public const string SubWorkflowCompleted = "SubWorkflowCompleted"

A child workflow finished.

TaskCompleted constant

public const string TaskCompleted = "TaskCompleted"

A human task was completed.

TimerDue constant

public const string TimerDue = "TimerDue"

A timer is due.

WorkflowSignalWakeNotification record

public sealed record WorkflowSignalWakeNotification

Tells signal consumers that a signal is available.

WorkflowSignalWakeNotification() constructor

public WorkflowSignalWakeNotification()

Creates an instance of WorkflowSignalWakeNotification.

DueAtUtc property

public DateTime? DueAtUtc { get; init; }

When the signal is due, in UTC; due at once when not set.

RuntimeProvider property

public required string RuntimeProvider { get; init; }

The runtime provider of the instance.

SignalId property

public required string SignalId { get; init; }

The signal.

SignalType property

public required string SignalType { get; init; }

The signal type.

WorkflowInstanceId property

public required string WorkflowInstanceId { get; init; }

The workflow instance the signal is for.

WorkflowSourceExportResult record

public sealed record WorkflowSourceExportResult

A definition converted to a source format.

WorkflowSourceExportResult() constructor

public WorkflowSourceExportResult()

Creates an instance of WorkflowSourceExportResult.

Content property

public required byte[] Content { get; init; }

The content.

ContentType property

public required string ContentType { get; init; }

The media type of the content.

SuggestedFileName property

public required string SuggestedFileName { get; init; }

A file name for the content.

WorkflowSourceFormatDiagnostic record

public sealed record WorkflowSourceFormatDiagnostic

A finding of a source format conversion.

WorkflowSourceFormatDiagnostic() constructor

public WorkflowSourceFormatDiagnostic()

Creates an instance of WorkflowSourceFormatDiagnostic.

Code property

public required string Code { get; init; }

The diagnostic code.

Location property

public string? Location { get; init; }

Optional pointer into the source (line:col, XPath, JSON path, or archive entry name).

Message property

public required string Message { get; init; }

The message.

Severity property

public required WorkflowSourceFormatDiagnosticSeverity Severity { get; init; }

The severity.

WorkflowSourceFormatDiagnosticSeverity enum

public enum WorkflowSourceFormatDiagnosticSeverity

The severity of a conversion finding.

ValueDescription
Info = 0Information.
Warning = 1A warning.
Error = 2An error; the converters report one when the conversion fails.

WorkflowSourceImportResult record

public sealed record WorkflowSourceImportResult

Result of converting external content into canonical form. Renderings are only populated by formats that carry them (e.g., the bundle ZIP).

WorkflowSourceImportResult() constructor

public WorkflowSourceImportResult()

Creates an instance of WorkflowSourceImportResult.

CanonicalDefinitionJson property

public string? CanonicalDefinitionJson { get; init; }

The canonical definition, as JSON, when the conversion succeeded.

Diagnostics property

public IReadOnlyCollection<WorkflowSourceFormatDiagnostic> Diagnostics { get; init; }

The findings of the conversion.

RenderingJson property

public byte[]? RenderingJson { get; init; }

The render graph JSON the content carries.

RenderingPng property

public byte[]? RenderingPng { get; init; }

The PNG image the content carries.

RenderingSvg property

public byte[]? RenderingSvg { get; init; }

The SVG diagram the content carries.

Succeeded property

public required bool Succeeded { get; init; }

Whether the conversion succeeded.

WorkflowSpec class

public static class WorkflowSpec

Starts a declarative workflow definition.

For<TStartRequest>() method

public static WorkflowSpecBuilder<TStartRequest> For<TStartRequest>() where TStartRequest : class

Starts the definition of a workflow.

Type parameters

Returns

A spec builder.

WorkflowSpec<TStartRequest> class

public sealed class WorkflowSpec<TStartRequest> where TStartRequest : class

A declarative workflow definition: the initial state, the tasks and the first steps.

Type parameters

WorkflowSpec() constructor

public WorkflowSpec()

Creates an instance of WorkflowSpec<TStartRequest>.

InitialSequence property

public WorkflowStepSequence<TStartRequest> InitialSequence { get; init; }

The first steps, when the workflow starts with steps.

InitialTaskName property

public string? InitialTaskName { get; init; }

The task the workflow starts with, when it starts with a task.

InitializeState property

public required Func<TStartRequest, Dictionary<string, JsonElement>> InitializeState { get; init; }

Builds the initial state from the start request.

InitializeStateExpression property

public WorkflowExpressionDefinition? InitializeStateExpression { get; init; }

The initial state expression, when the state is declared as an expression.

InitializeStateWithRuntime property

public required Func<TStartRequest, IWorkflowFunctionRuntime?, Dictionary<string, JsonElement>> InitializeStateWithRuntime { get; init; }

Builds the initial state from the start request, with the function runtime for expressions that call functions.

TaskDescriptors property

public IReadOnlyCollection<WorkflowTaskDescriptor> TaskDescriptors { get; }

The descriptors of the declared tasks.

TasksByName property

public required IReadOnlyDictionary<string, WorkflowHumanTaskDefinition<TStartRequest>> TasksByName { get; init; }

The declared tasks by name; names compare ignoring case.

GetRequiredTask(string) method

public WorkflowHumanTaskDefinition<TStartRequest> GetRequiredTask(string taskName)

Returns the declared task taskName.

Parameters

Returns

The task definition.

Exceptions

WorkflowSpecBuilder<TStartRequest> class

public sealed class WorkflowSpecBuilder<TStartRequest> where TStartRequest : class

Builds a declarative workflow definition: the initial state, the tasks and the first steps.

Type parameters

WorkflowSpecBuilder() constructor

public WorkflowSpecBuilder()

Creates an instance of WorkflowSpecBuilder<TStartRequest>.

AddTask(WorkflowHumanTaskDefinition<TStartRequest>) method

public WorkflowSpecBuilder<TStartRequest> AddTask(WorkflowHumanTaskDefinition<TStartRequest> task)

Declares a task, which ActivateTask opens. A task of the same name, ignoring case, is replaced.

Parameters

Returns

The same builder, for chaining.

Build() method

public WorkflowSpec<TStartRequest> Build()

Builds the definition and assigns the step identities.

Returns

The workflow definition.

Exceptions

InitializeState(Func<TStartRequest, Dictionary<string, JsonElement>>) method

public WorkflowSpecBuilder<TStartRequest> InitializeState(Func<TStartRequest, Dictionary<string, JsonElement>> initializer)

Sets the initial state from a delegate over the start request. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Parameters

Returns

The same builder, for chaining.

InitializeState(WorkflowExpressionDefinition) method

public WorkflowSpecBuilder<TStartRequest> InitializeState(WorkflowExpressionDefinition initializerExpression)

Sets the initial state to the value of an object expression; start.* paths read the start request.

Parameters

Returns

The same builder, for chaining.

InitializeState<TState>(Func<TStartRequest, TState>) method

public WorkflowSpecBuilder<TStartRequest> InitializeState<TState>(Func<TStartRequest, TState> initializer)

Sets the initial state to the serialized value a delegate builds from the start request. A delegate has no canonical definition: the publisher cannot publish a workflow that uses it. Prefer the expression overload.

Type parameters

Parameters

Returns

The same builder, for chaining.

StartWith(Action<WorkflowFlowBuilder<TStartRequest>>) method

public WorkflowSpecBuilder<TStartRequest> StartWith(Action<WorkflowFlowBuilder<TStartRequest>> configure)

Sets the first steps of the workflow.

Parameters

Returns

The same builder, for chaining.

StartWith(WorkflowHumanTaskDefinition<TStartRequest>) method

public WorkflowSpecBuilder<TStartRequest> StartWith(WorkflowHumanTaskDefinition<TStartRequest> task)

Starts the workflow with a task: declares it and opens it when an instance starts.

Parameters

Returns

The same builder, for chaining.

WorkflowSpecExecutionContext<TStartRequest> class

public sealed class WorkflowSpecExecutionContext<TStartRequest> : IWorkflowSpecExecutionContext where TStartRequest : class

What the delegates of a workflow see: the start request, state, payload, kept results and business reference of the instance.

WorkflowSpecExecutionContext(string, TStartRequest, Dictionary<string, JsonElement>, IReadOnlyDictionary<string, JsonElement>, WorkflowBusinessReference, IWorkflowFunctionRuntime) constructor

public WorkflowSpecExecutionContext(string workflowName, TStartRequest? startRequest, Dictionary<string, JsonElement> workflowState, IReadOnlyDictionary<string, JsonElement> payload, WorkflowBusinessReference? businessReference = null, IWorkflowFunctionRuntime? functionRuntime = null)

Creates a context.

Parameters

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; }

The business reference of the instance.

FunctionRuntime property

public IWorkflowFunctionRuntime? FunctionRuntime { get; }

Runs the expression functions.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; }

The payload being handled, such as a task completion.

PayloadValues property

public WorkflowValueDictionary PayloadValues { get; }

The payload as a value dictionary; a missing key raises an error.

ResultValues property

public IReadOnlyDictionary<string, JsonElement> ResultValues { get; }

The kept step results, by key; keys compare ignoring case.

StartRequest property

public TStartRequest? StartRequest { get; }

The start request, when it is available.

StateValues property

public WorkflowValueDictionary StateValues { get; }

The workflow state as a value dictionary; a missing key raises an error.

WorkflowName property

public string WorkflowName { get; }

The workflow name.

WorkflowState property

public Dictionary<string, JsonElement> WorkflowState { get; }

The workflow state, which steps change.

CompareValue(WorkflowValueSource, string, object) method

public bool CompareValue(WorkflowValueSource source, string key, object? expectedValue)

Whether a payload or state value equals a value: a missing or null value equals null, and text compares ignoring case.

Parameters

Returns

Whether the values are equal.

GetOptionalResult<TResponse>(string) method

public TResponse? GetOptionalResult<TResponse>(string resultKey)

Returns a kept result, or the default when none is kept under the key.

Type parameters

Parameters

Returns

The result, or the default.

GetRequiredResult<TResponse>(string) method

public TResponse GetRequiredResult<TResponse>(string resultKey)

Returns a kept result.

Type parameters

Parameters

Returns

The result.

Exceptions

GetRequiredStartRequest() method

public TStartRequest GetRequiredStartRequest()

Returns the start request.

Returns

The start request.

Exceptions

SetBusinessReference(WorkflowBusinessReference) method

public void SetBusinessReference(WorkflowBusinessReference? businessReference)

Replaces the business reference.

Parameters

SetResult(string, JsonElement) method

public void SetResult(string resultKey, JsonElement value)

Keeps a result under a key, replacing any.

Parameters

WorkflowStartExecutionContext record

public sealed record WorkflowStartExecutionContext

What an execution handler gets to start an instance.

WorkflowStartExecutionContext() constructor

public WorkflowStartExecutionContext()

Creates an instance of WorkflowStartExecutionContext.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference.

Definition property

public required WorkflowDefinitionDescriptor Definition { get; init; }

The definition descriptor.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; init; }

The start payload.

Registration property

public required WorkflowRegistration Registration { get; init; }

The workflow registration.

StartRequest property

public object? StartRequest { get; init; }

The typed start request.

GetRequiredStartRequest<TStartRequest>() method

public TStartRequest GetRequiredStartRequest<TStartRequest>() where TStartRequest : class

Returns the start request as its type.

Type parameters

Returns

The start request.

WorkflowStartExecutionPlan record

public sealed record WorkflowStartExecutionPlan

What starting an instance does: its status, state, tasks, signals and continuations.

WorkflowStartExecutionPlan() constructor

public WorkflowStartExecutionPlan()

Creates an instance of WorkflowStartExecutionPlan.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference after the step.

Continuations property

public IReadOnlyCollection<WorkflowContinuationPlan> Continuations { get; init; }

The workflows to start next.

Deduplication property

public StartWorkflowDeduplication Deduplication { get; init; }

With StartWorkflowDeduplication.OpenBusinessKeyand a business key, the projection store holds the instance’s open-business-key slot while it is open; when another start holds it, the store returns that instance with StartWorkflowResponse.Deduplicatedinstead of creating one, or, when it cannot, throws WorkflowStoreDuplicateExceptionwith WorkflowOpenBusinessKeySlot.AlreadyOpenCode.

InstanceStatus property

public string InstanceStatus { get; init; }

The instance status after the start; Open by default.

PendingSignals property

public IReadOnlyCollection<WorkflowPendingSignalPlan> PendingSignals { get; init; }

The signals to wait for or send.

Tasks property

public IReadOnlyCollection<WorkflowExecutionTaskPlan> Tasks { get; init; }

The tasks to open.

WorkflowState property

public IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }

The workflow state after the step.

WorkflowStartReceipt record

public sealed record WorkflowStartReceipt

The durable decision taken for one start request, with the canonical result once there is one.

WorkflowStartReceipt() constructor

public WorkflowStartReceipt()

Creates an instance of WorkflowStartReceipt.

AssociationGeneration property

public long AssociationGeneration { get; init; }

The generation of the association.

AssociationId property

public required string AssociationId { get; init; }

The association.

AssociationSha256 property

public required string AssociationSha256 { get; init; }

The SHA-256 of the association.

BusinessReferenceSha256 property

public string? BusinessReferenceSha256 { get; init; }

The SHA-256 of the business reference.

CallerIdempotencySha256 property

public string? CallerIdempotencySha256 { get; init; }

The SHA-256 of the caller’s idempotency key.

CanonicalRequestJson property

public string? CanonicalRequestJson { get; init; }

The canonical request, as JSON.

CanonicalResultJson property

public string? CanonicalResultJson { get; init; }

The canonical result, as JSON, once there is one.

DecidedAtUtc property

public DateTime DecidedAtUtc { get; init; }

When the decision was taken, in UTC.

DefinitionCode property

public string? DefinitionCode { get; init; }

The workflow definition.

DefinitionSha256 property

public string? DefinitionSha256 { get; init; }

The SHA-256 of the definition.

DefinitionVersion property

public string? DefinitionVersion { get; init; }

The definition version.

Disposition property

public required string Disposition { get; init; }

The start decision.

ExecutionVersion property

public long? ExecutionVersion { get; init; }

The execution version the start created.

FirstEventSequence property

public long? FirstEventSequence { get; init; }

The sequence of the first history event.

ResultEventId property

public string? ResultEventId { get; init; }

The result event, once there is one.

ResultSha256 property

public string? ResultSha256 { get; init; }

The SHA-256 of the result.

RootScopeExecutionId property

public required string RootScopeExecutionId { get; init; }

The root scope.

SafeCode property

public string? SafeCode { get; init; }

The safe refusal code, when the start was refused.

StartRequestId property

public required string StartRequestId { get; init; }

The start request.

StartRequestSha256 property

public required string StartRequestSha256 { get; init; }

The SHA-256 of the start request.

WorkflowExecutionId property

public required string WorkflowExecutionId { get; init; }

The execution (workflow instance).

WorkflowStateAssignmentStepDefinition<TStartRequest> record

public sealed record WorkflowStateAssignmentStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Sets a state value.

Parameters

WorkflowStateAssignmentStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, object>, bool) constructor

public WorkflowStateAssignmentStepDefinition(string Key, Func<WorkflowSpecExecutionContext<TStartRequest>, object?> ValueFactory, bool OnlyWhenHasValue)

Sets a state value.

Parameters

Key property

public string Key { get; init; }

The state key.

OnlyWhenHasValue property

public bool OnlyWhenHasValue { get; init; }

Whether to set the value only when it is set: not null and not an empty or white-space string.

ValueExpression property

public WorkflowExpressionDefinition? ValueExpression { get; init; }

The value as an expression, for the canonical definition.

ValueFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, object?> ValueFactory { get; init; }

Computes the value.

WorkflowStateJsonPolicy class

public sealed class WorkflowStateJsonPolicy : IWorkflowStateJsonPolicy

The state limits of WorkflowRuntime:StateJson.

Parameters

WorkflowStateJsonPolicy(IOptions<WorkflowStateJsonPolicyOptions>) constructor

public WorkflowStateJsonPolicy(IOptions<WorkflowStateJsonPolicyOptions> options)

The state limits of WorkflowRuntime:StateJson.

Parameters

Validate(string) method

public void Validate(string stateJson)

Checks a state against the limits.

Parameters

Exceptions

Validate(string, WorkflowStateJsonPolicyOptions) method

public static void Validate(string stateJson, WorkflowStateJsonPolicyOptions options)

Checks a state against given limits.

Parameters

Exceptions

WorkflowStateJsonPolicyOptions class

public sealed class WorkflowStateJsonPolicyOptions

Limits of the workflow state JSON (WorkflowRuntime:StateJson). A state that breaks one is refused with a WORKFLOW_STATE_JSON_* code.

WorkflowStateJsonPolicyOptions() constructor

public WorkflowStateJsonPolicyOptions()

Creates an instance of WorkflowStateJsonPolicyOptions.

SectionName constant

public const string SectionName = "WorkflowRuntime:StateJson"

The configuration section the options bind from: WorkflowRuntime:StateJson.

ForbiddenFragments property

public List<string> ForbiddenFragments { get; set; }

Property-name fragments that must never reach persisted state. Names are compared lower-cased, with ‘_’ and ‘-’ removed. Map items and attempt history live in their own tables, not in state.

MaxArrayItems property

public int MaxArrayItems { get; set; }

The most items in one array. The default is 256.

MaxBytes property

public int MaxBytes { get; set; }

The largest state, in UTF-8 bytes; a value below 1024 refuses every state. The default is 262144; the WORKFLOW_STATE_JSON_MAX_BYTES setting overrides it.

MaxDepth property

public int MaxDepth { get; set; }

The deepest nesting of objects and arrays. The default is 16.

MaxStringLength property

public int MaxStringLength { get; set; }

The longest string value, in characters. The default is 4096.

WorkflowStepDefinition<TStartRequest> record

public abstract record WorkflowStepDefinition<TStartRequest> where TStartRequest : class

A step of a workflow, as the builder produces it.

Parameters

WorkflowStepDefinition(string) constructor

protected WorkflowStepDefinition(string? DisplayName)

A step of a workflow, as the builder produces it.

Parameters

DisplayName property

public string? DisplayName { get; init; }

The label of the step in diagrams.

StepId property

public string? StepId { get; set; }

The stable identifier of the step in the definition, assigned when the definition is built.

WorkflowStepSequence<TStartRequest> class

public sealed class WorkflowStepSequence<TStartRequest> where TStartRequest : class

A sequence of steps.

WorkflowStepSequence(IReadOnlyCollection<WorkflowStepDefinition<TStartRequest>>) constructor

public WorkflowStepSequence(IReadOnlyCollection<WorkflowStepDefinition<TStartRequest>> steps)

Creates a sequence.

Parameters

Empty property

public static WorkflowStepSequence<TStartRequest> Empty { get; }

The empty sequence.

Steps property

public IReadOnlyCollection<WorkflowStepDefinition<TStartRequest>> Steps { get; }

The steps, run in order.

WorkflowStoreConcurrencyException class

public sealed class WorkflowStoreConcurrencyException : Exception

A durable store refused a write because the row changed since it was read (version or fence mismatch). Each backend maps its native optimistic-concurrency failure to this exception.

WorkflowStoreConcurrencyException(string, Exception) constructor

public WorkflowStoreConcurrencyException(string message, Exception? innerException = null)

A durable store refused a write because the row changed since it was read (version or fence mismatch). Each backend maps its native optimistic-concurrency failure to this exception.

WorkflowStoreDuplicateException class

public sealed class WorkflowStoreDuplicateException : Exception

A durable store refused a write because a row with the same key already exists. Each backend maps its native unique-key violation to this exception.

WorkflowStoreDuplicateException(string, Exception) constructor

public WorkflowStoreDuplicateException(string message, Exception? innerException = null)

A durable store refused a write because a row with the same key already exists. Each backend maps its native unique-key violation to this exception.

WorkflowSubWorkflowStepDefinition<TStartRequest> record

public sealed record WorkflowSubWorkflowStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Runs another workflow as a child and waits for it.

Parameters

WorkflowSubWorkflowStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest>, string) constructor

public WorkflowSubWorkflowStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest> StartWorkflowRequestFactory, string? ResultKey)

Runs another workflow as a child and waits for it.

Parameters

FailureHandlers property

public WorkflowFailureHandlers<TStartRequest>? FailureHandlers { get; init; }

Runs when the child workflow fails or ends in a status other than completed. Only the failure branch is used; a sub-workflow has no timeout of its own.

InvocationDeclaration property

public WorkflowWorkflowInvocationDeclaration? InvocationDeclaration { get; init; }

The child workflow, for the canonical definition.

ResultKey property

public string? ResultKey { get; init; }

The key the result is kept under (result.<key>); not kept when not set.

StartWorkflowRequestFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, StartWorkflowRequest> StartWorkflowRequestFactory { get; init; }

Builds the start request of the workflow to run.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowTaskAction enum

public enum WorkflowTaskAction

An action on a human task that needs permission.

ValueDescription
AssignSelf = 0The actor assigns the task to themselves.
AssignOther = 1The actor assigns the task to another user.
AssignRoles = 2The actor assigns the task to roles.
Release = 3The actor releases the task.
Complete = 4The actor completes the task.

WorkflowTaskCompletionPlan record

public sealed record WorkflowTaskCompletionPlan

What completing a task or resuming an instance does.

WorkflowTaskCompletionPlan() constructor

public WorkflowTaskCompletionPlan()

Creates an instance of WorkflowTaskCompletionPlan.

BusinessReference property

public WorkflowBusinessReference? BusinessReference { get; init; }

The business reference after the step.

CancelledTaskTokens property

public IReadOnlyCollection<string> CancelledTaskTokens { get; init; }

Runtime task tokens of open tasks the engine closed because another fork branch ended the fork.

Continuations property

public IReadOnlyCollection<WorkflowContinuationPlan> Continuations { get; init; }

The workflows to start next.

ExpiredTaskTokens property

public IReadOnlyCollection<string> ExpiredTaskTokens { get; init; }

Runtime task tokens of open tasks the engine closed because their timeout fired.

InstanceStatus property

public string InstanceStatus { get; init; }

The instance status after the step; Completed by default.

NextTasks property

public IReadOnlyCollection<WorkflowExecutionTaskPlan> NextTasks { get; init; }

The tasks to open next.

PendingSignals property

public IReadOnlyCollection<WorkflowPendingSignalPlan> PendingSignals { get; init; }

The signals to wait for or send.

WorkflowState property

public IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }

The workflow state after the step.

WorkflowTaskExecutionContext record

public sealed record WorkflowTaskExecutionContext

What an execution handler gets to complete a task.

WorkflowTaskExecutionContext() constructor

public WorkflowTaskExecutionContext()

Creates an instance of WorkflowTaskExecutionContext.

CurrentTask property

public required WorkflowTaskSummary CurrentTask { get; init; }

The task being completed.

Definition property

public required WorkflowDefinitionDescriptor Definition { get; init; }

The definition descriptor.

Payload property

public IReadOnlyDictionary<string, JsonElement> Payload { get; init; }

The completion payload.

Registration property

public required WorkflowRegistration Registration { get; init; }

The workflow registration.

RuntimeInstanceId property

public string? RuntimeInstanceId { get; init; }

The runtime instance.

RuntimeStateJson property

public string? RuntimeStateJson { get; init; }

The runtime state, as JSON.

WorkflowInstanceId property

public required string WorkflowInstanceId { get; init; }

The instance.

WorkflowState property

public IReadOnlyDictionary<string, JsonElement> WorkflowState { get; init; }

The workflow state.

WorkflowTerminalInboxEntry record

public sealed record WorkflowTerminalInboxEntry

A received prestart terminal command and the acknowledgement it was answered with, for exact replay.

WorkflowTerminalInboxEntry() constructor

public WorkflowTerminalInboxEntry()

Creates an instance of WorkflowTerminalInboxEntry.

AckEventId property

public required string AckEventId { get; init; }

The acknowledgement.

AckSha256 property

public required string AckSha256 { get; init; }

The SHA-256 of the acknowledgement.

CanonicalAckJson property

public required string CanonicalAckJson { get; init; }

The canonical acknowledgement, as JSON.

CanonicalCommandJson property

public required string CanonicalCommandJson { get; init; }

The canonical command, as JSON.

CommandEventId property

public required string CommandEventId { get; init; }

The command.

CommandSha256 property

public required string CommandSha256 { get; init; }

The SHA-256 of the command.

Disposition property

public required string Disposition { get; init; }

How the command was handled.

ReceivedAtUtc property

public DateTime ReceivedAtUtc { get; init; }

When it was received, in UTC.

StartRequestId property

public required string StartRequestId { get; init; }

The start request.

WorkflowTerminateForkStepDefinition<TStartRequest> record

public sealed record WorkflowTerminateForkStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Ends the fork whose branch reaches it.

WorkflowTerminateForkStepDefinition() constructor

public WorkflowTerminateForkStepDefinition()

Ends the fork whose branch reaches it.

WorkflowTimeoutDefaults class

public static class WorkflowTimeoutDefaults

Default timeout values used across the workflow engine when no explicit timeout is specified.

DefaultTimeoutForServiceTaskCallsSeconds constant

public const int DefaultTimeoutForServiceTaskCallsSeconds = 3600

Default timeout for service task (transport call) steps in seconds. Applied when neither the step declaration nor the transport configuration specifies a timeout. Value: 3600 seconds (1 hour).

DefaultTransportTimeoutSeconds constant

public const int DefaultTransportTimeoutSeconds = 30

Default transport-level timeout in seconds, used as fallback when transport options do not specify a timeout. Value: 30 seconds.

WorkflowTimerDelay class

public static class WorkflowTimerDelay

The delay of a timer step (Wait(stepName, delayExpression)), from the value its delay expression evaluates to; both runtime providers read a delay this way. A number, or a string of digits, is a number of milliseconds: 60000 and "60000" are one minute. Any other string is a time span in the invariant form [-][d.]hh:mm:ss[.fffffff], whatever the current culture: "00:01:00" is one minute and "1.00:00:00" one day. A TimeSpan is taken as it is.

FromValue(object) method

public static TimeSpan FromValue(object? value)

Converts the value of a timer delay expression to a delay.

Parameters

Returns

The delay.

Exceptions

WorkflowTimerStepDefinition<TStartRequest> record

public sealed record WorkflowTimerStepDefinition<TStartRequest> : WorkflowStepDefinition<TStartRequest> where TStartRequest : class

Pauses the instance for a delay.

Parameters

WorkflowTimerStepDefinition(string, Func<WorkflowSpecExecutionContext<TStartRequest>, TimeSpan>) constructor

public WorkflowTimerStepDefinition(string StepName, Func<WorkflowSpecExecutionContext<TStartRequest>, TimeSpan> DelayFactory)

Pauses the instance for a delay.

Parameters

DelayExpression property

public WorkflowExpressionDefinition? DelayExpression { get; init; }

The delay as an expression, for the canonical definition.

DelayFactory property

public Func<WorkflowSpecExecutionContext<TStartRequest>, TimeSpan> DelayFactory { get; init; }

Computes the delay.

StepName property

public string StepName { get; init; }

The step name, shown in diagrams and in result.lastFailure.

WorkflowTrustedAssemblyAttribute class

public sealed class WorkflowTrustedAssemblyAttribute : Attribute

Marks an assembly as a trusted workflow-authoring assembly for the workflow canonicality analyzer (WF001-WF010).

Applies to: Assembly. Allow multiple: no. Inherited: no.

Remarks

Workflow definitions must be declarative so they can be canonicalized to JSON and replayed deterministically. The analyzer therefore rejects imperative C# inside a workflow Spec and refuses to trust calls it cannot walk.

Types in a trusted assembly are treated as canonicalizable leaves: the analyzer allows calls to them, instantiation of them, and member reads on them without walking their bodies. Helper methods that return a type from a trusted assembly are also exempt from WF010, because such a helper is a compile-time construction factory whose body is metaprogramming that runs once while the Spec is built, not runtime workflow logic.

The analyzer trusts the StellaOps.Workflow.* assemblies by default. Any other assembly that supplies workflow builder, expression, spec, or task-definition types opts in by applying this attribute to itself:

[assembly: StellaOps.Workflow.Abstractions.WorkflowTrustedAssembly]

Apply this only to an assembly whose public surface is compile-time workflow construction. Trusting an assembly that performs runtime work suppresses the diagnostics that keep workflow definitions replayable.

An assembly that cannot be annotated — a third-party binary you do not build — can be trusted instead through the stellaops_workflow_trusted_assembly_prefixes analyzer configuration option.

WorkflowTrustedAssemblyAttribute() constructor

public WorkflowTrustedAssemblyAttribute()

Creates an instance of WorkflowTrustedAssemblyAttribute.

WorkflowValue struct

public readonly struct WorkflowValue : IEquatable<WorkflowValue>

One workflow value; converting it to a type it cannot take raises the missing-value error.

Parameters

WorkflowValue(string, string, string, JsonElement) constructor

public WorkflowValue(string Key, string WorkflowName, string MissingMessageKey, JsonElement Value)

One workflow value; converting it to a type it cannot take raises the missing-value error.

Parameters

Key property

public string Key { get; init; }

The key.

MissingMessageKey property

public string MissingMessageKey { get; init; }

The message id of the error.

Value property

public JsonElement Value { get; init; }

The value.

WorkflowName property

public string WorkflowName { get; init; }

The workflow, for the error.

Get<T>() method

public T Get<T>()

Converts the value.

Type parameters

Returns

The converted value.

Exceptions

WorkflowValueConditionDefinition<TStartRequest> class

public sealed class WorkflowValueConditionDefinition<TStartRequest> : WorkflowConditionDefinition<TStartRequest> where TStartRequest : class

A condition that a payload or state value equals a value.

WorkflowValueConditionDefinition(WorkflowValueSource, string, object, string) constructor

public WorkflowValueConditionDefinition(WorkflowValueSource source, string key, object? expectedValue, string displayName)

Creates the condition.

Parameters

CanonicalExpression property

public override WorkflowExpressionDefinition CanonicalExpression { get; }

The condition as an expression, for the canonical definition; none for a delegate.

ExpectedValue property

public object? ExpectedValue { get; }

The value to compare with.

Key property

public string Key { get; }

The key.

Source property

public WorkflowValueSource Source { get; }

Where the value is read.

Evaluate(WorkflowSpecExecutionContext<TStartRequest>) method

public override bool Evaluate(WorkflowSpecExecutionContext<TStartRequest> context)

Evaluates the condition.

Parameters

Returns

Whether it holds.

WorkflowValueDictionary struct

public readonly struct WorkflowValueDictionary : IEquatable<WorkflowValueDictionary>

Workflow values by key; a missing key raises an error that names the key and the workflow.

Parameters

WorkflowValueDictionary(IReadOnlyDictionary<string, JsonElement>, string, string) constructor

public WorkflowValueDictionary(IReadOnlyDictionary<string, JsonElement> Values, string WorkflowName, string MissingMessageKey)

Workflow values by key; a missing key raises an error that names the key and the workflow.

Parameters

MissingMessageKey property

public string MissingMessageKey { get; init; }

The message id of the error.

Values property

public IReadOnlyDictionary<string, JsonElement> Values { get; init; }

The values.

WorkflowName property

public string WorkflowName { get; init; }

The workflow, for the error.

this[string] indexer

public WorkflowValue this[string key] { get; }

Returns the value of a key.

Parameters

Returns

The value.

Exceptions

WorkflowValueEqualsConditionDefinition record

public sealed record WorkflowValueEqualsConditionDefinition

A condition that a payload or state value equals a value.

Parameters

WorkflowValueEqualsConditionDefinition(WorkflowValueSource, string, object, string) constructor

public WorkflowValueEqualsConditionDefinition(WorkflowValueSource Source, string Key, object? ExpectedValue, string DisplayName)

A condition that a payload or state value equals a value.

Parameters

CanonicalExpression property

public WorkflowExpressionDefinition CanonicalExpression { get; }

The condition as an eq expression over payload.<key> or state.<key>.

DisplayName property

public string DisplayName { get; init; }

The label of the step in diagrams.

ExpectedValue property

public object? ExpectedValue { get; init; }

The value to compare with.

Key property

public string Key { get; init; }

The state key.

Source property

public WorkflowValueSource Source { get; init; }

Where the value is read: the payload or the state.

WorkflowValueNotFoundException class

public class WorkflowValueNotFoundException : InvalidOperationException

Raised when a workflow value is missing or cannot take the requested type.

WorkflowValueNotFoundException(string, params object[]) constructor

public WorkflowValueNotFoundException(string messageKey, params object[] args)

Creates the exception.

Parameters

MessageKey property

public string MessageKey { get; }

The message id.

WorkflowValueSource enum

public enum WorkflowValueSource

Where a value condition reads its value.

ValueDescription
Payload = 1The payload being handled.
State = 2The workflow state.

WorkflowVersioning class

public static class WorkflowVersioning

Parses and compares semantic workflow versions (major.minor.patch).

SemanticComparer property

public static IComparer<string> SemanticComparer { get; }

Compares version text semantically.

FormatVersion(string, int) method

public static string FormatVersion(string baseVersion, int buildIteration)

Formats a version with build metadata suffix. FormatVersion(“1.0.0”, 0) returns “1.0.0”. FormatVersion(“1.0.0”, 2) returns “1.0.0+2”.

GetBaseVersion(string) method

public static string GetBaseVersion(string version)

Extracts the base version (without build metadata) from a version string. “1.0.0+2” returns “1.0.0”. “1.0.0” returns “1.0.0”.

GetBuildIteration(string) method

public static int GetBuildIteration(string version)

Extracts the build iteration from a version string. “1.0.0+2” returns 2. “1.0.0” returns 0.

TryParseSemanticVersion(string, out Version) method

public static bool TryParseSemanticVersion(string? value, out Version version)

Parses major.minor.patch version text.

Parameters

Returns

Whether it is valid.

WorkflowWebserviceServiceCollectionExtensions class

public static class WorkflowWebserviceServiceCollectionExtensions

Extension methods for registering workflow webservice API implementations in DI.

AddWorkflowCanonicalDefinitionApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowCanonicalDefinitionApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowCanonicalDefinitionApi

Registers the workflow canonical definition API.

AddWorkflowDefinitionDeploymentApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowDefinitionDeploymentApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowDefinitionDeploymentApi

Registers the workflow definition deployment API.

AddWorkflowDefinitionQueryApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowDefinitionQueryApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowDefinitionQueryApi

Registers the workflow definition query API.

AddWorkflowDiagramApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowDiagramApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowDiagramApi

Registers the workflow diagram API.

AddWorkflowFunctionCatalogApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowFunctionCatalogApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowFunctionCatalogApi

Registers the workflow function catalog API.

AddWorkflowRetentionApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowRetentionApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowRetentionApi

Registers the workflow retention API.

AddWorkflowRuntimeApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowRuntimeApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowRuntimeApi

Registers a specific workflow webservice API interface.

AddWorkflowServiceMetadataApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowServiceMetadataApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowServiceMetadataApi

Registers the workflow service metadata API.

AddWorkflowSignalDeadLetterApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowSignalDeadLetterApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowSignalDeadLetterApi

Registers the workflow signal dead-letter API.

AddWorkflowSignalPumpTelemetryApi<TImplementation>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowSignalPumpTelemetryApi<TImplementation>(this IServiceCollection services) where TImplementation : class, IWorkflowSignalPumpTelemetryApi

Registers the workflow signal pump telemetry API.

AddWorkflowWebserviceApis<TRuntime>(IServiceCollection) extension method

public static IServiceCollection AddWorkflowWebserviceApis<TRuntime>(this IServiceCollection services) where TRuntime : class, IWorkflowRuntimeApi

Registers all workflow webservice API interfaces using the provided implementation types. Only interfaces whose implementations are supplied will be registered.