# Class WorkflowRuntimeConfigurationExtension OptimaJet.Workflow.Core.Runtime.WorkflowRuntimeConfigurationExtension Provides fluent configuration methods for [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public static class WorkflowRuntimeConfigurationExtension ``` ## Methods `public static WorkflowRuntime SetCancellationTokenHandling(this WorkflowRuntime runtime, CancellationTokenHandling value)` Sets [WorkflowRuntimeSettings.CancellationTokenHandling](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/) for the runtime. This controls whether an already-requested cancellation stops continuation after an activity or is ignored at that checkpoint. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `value` | `CancellationTokenHandling` | The [CancellationTokenHandling](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/CancellationTokenHandling/) mode to use. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static IWorkflowBuilder WithDefaultBuildSteps(this IWorkflowBuilder builder, WorkflowRuntime runtime)` Registers the default build steps on an [IWorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/IWorkflowBuilder/). Schemes built afterward support scheme inlining, queued subprocess starts, activity timeouts, and community-edition labeling. ### Parameters | Name | Type | Description | | --- | --- | --- | | `builder` | `IWorkflowBuilder` | The instance of the builder. | | `runtime` | `WorkflowRuntime` | The runtime instance. This method currently does not read this parameter. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | ### Remarks Adds [InlineSchemesStep](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/InlineSchemesStep/), [SubprocessStartInTimerQueueStep](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/SubprocessStartInTimerQueueStep/), [ActivitiesTimeoutsBuildStep](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/ActivitiesTimeoutsBuildStep/), and the community-edition labeling step when the corresponding step is not already registered. `public static WorkflowRuntime WithBuilder(this WorkflowRuntime runtime, IWorkflowBuilder builder)` Assigns the specified [IWorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/IWorkflowBuilder/) to [WorkflowRuntime.Builder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/), registers any missing default build steps, and associates the builder with the runtime. The runtime can then use the builder to load, parse, build, and prepare process schemes for execution. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `builder` | `IWorkflowBuilder` | The instance of the builder [IWorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/IWorkflowBuilder/). | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static WorkflowRuntime WithPersistenceProvider(this WorkflowRuntime runtime, IPersistenceProvider persistenceProvider)` Assigns the specified [IPersistenceProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/IPersistenceProvider/) to [WorkflowRuntime.PersistenceProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and initializes it. The runtime then uses the provider to store and retrieve process state, parameters, timers, and runtime coordination data. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `persistenceProvider` | `IPersistenceProvider` | The instance of the persistence provider [IPersistenceProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/IPersistenceProvider/). | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static WorkflowRuntime SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOn(this WorkflowRuntime runtime)` Sets [WorkflowRuntimeSettings.IsAutoUpdateSchemeBeforeGetAvailableCommands](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/) to [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). An available-command request can then update an obsolete process scheme first when the current activity permits automatic scheme updates. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static WorkflowRuntime SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOff(this WorkflowRuntime runtime)` Sets [WorkflowRuntimeSettings.IsAutoUpdateSchemeBeforeGetAvailableCommands](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/) to [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). Available commands are then calculated against the process's current scheme without an automatic scheme update. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static Task StartAsync(this WorkflowRuntime runtime)` Starts all services of the specified [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and compiles global code actions. The runtime can then execute process operations and run the configured recovery and timer services. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `Task` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static WorkflowRuntime Start(this WorkflowRuntime runtime)` Starts all services of the specified [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and compiles global code actions. The runtime can then execute process operations and run the configured recovery and timer services. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static Task<(WorkflowRuntime runtime, Dictionary compilerErrors)> StartAsync(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions)` Starts all services of the specified [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and compiles global code actions. When `ignoreNotCompiledGlobalActions` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), startup continues with successfully compiled actions and returns errors for the actions that could not be compiled. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `ignoreNotCompiledGlobalActions` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to ignore global code action compilation errors. | ### Returns | Type | Description | | --- | --- | | `Task` | The task result includes the configured runtime and global code action compile errors. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static WorkflowRuntime Start(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions, out Dictionary compilerErrors)` Starts all services of the specified [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and compiles global code actions. When `ignoreNotCompiledGlobalActions` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), startup continues with successfully compiled actions and returns errors for the actions that could not be compiled. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `ignoreNotCompiledGlobalActions` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to ignore global code action compilation errors. | | `compilerErrors` | `Dictionary` | Receives the global code action compiler errors. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static Task ColdStartAsync(this WorkflowRuntime runtime)` Starts the [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) in cold mode and compiles global code actions without starting [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) or the multi-server service timer. Process operations can then be called while automatic timer processing and the multi-server service cycle remain paused. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `Task` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static WorkflowRuntime ColdStart(this WorkflowRuntime runtime)` Starts the [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) in cold mode and compiles global code actions without starting [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) or the multi-server service timer. Process operations can then be called while automatic timer processing and the multi-server service cycle remain paused. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static Task<(WorkflowRuntime runtime, Dictionary compilerErrors)> ColdStartAsync(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions)` Starts the [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) in cold mode and compiles global code actions without starting [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) or the multi-server service timer. Process operations remain available while background work is paused; when `ignoreNotCompiledGlobalActions` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), compilation errors are returned without stopping startup. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `ignoreNotCompiledGlobalActions` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to ignore global code action compilation errors. | ### Returns | Type | Description | | --- | --- | | `Task` | A task that returns the configured runtime and global compiler errors. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static WorkflowRuntime ColdStart(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions, out Dictionary compilerErrors)` Starts the [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) in cold mode and compiles global code actions without starting [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) or the multi-server service timer. Process operations remain available while background work is paused; when `ignoreNotCompiledGlobalActions` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), compilation errors are returned without stopping startup. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `ignoreNotCompiledGlobalActions` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to ignore global code action compilation errors. | | `compilerErrors` | `Dictionary` | Receives the global code action compiler errors. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `InvalidOperationException` | Thrown when runtime settings are invalid. | `public static IWorkflowBuilder WithCache(this IWorkflowBuilder bulder, IParsedProcessCache cache)` Configures an [IWorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/IWorkflowBuilder/) with the specified [IParsedProcessCache](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Cache/IParsedProcessCache/). Parsed and built process definitions can then be reused instead of being recreated each time a scheme is requested. ### Parameters | Name | Type | Description | | --- | --- | --- | | `bulder` | `IWorkflowBuilder` | The workflow builder instance. | | `cache` | `IParsedProcessCache` | The cache instance for parsed process definitions. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | `public static IWorkflowBuilder WithDefaultCache(this IWorkflowBuilder bulder)` Configures an [IWorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/IWorkflowBuilder/) with the default in-memory [DefaultParcedProcessCache](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Cache/DefaultParcedProcessCache/). Parsed and built process definitions can then be reused for the lifetime of this cache. ### Parameters | Name | Type | Description | | --- | --- | --- | | `bulder` | `IWorkflowBuilder` | The workflow builder instance. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | `public static IWorkflowBuilder WithGenerator(this WorkflowBuilder bulder, IWorkflowGenerator generator) where TSchemeMedium : class` Configures a [WorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/WorkflowBuilder-TSchemeMedium/) with the specified [IWorkflowGenerator](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Generator/IWorkflowGenerator-TSchemeMedium/). The builder can then generate a new source scheme when a requested scheme does not yet exist in storage. ### Parameters | Name | Type | Description | | --- | --- | --- | | `bulder` | `WorkflowBuilder` | The workflow builder instance. | | `generator` | `IWorkflowGenerator` | The workflow scheme generator. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | `public static IWorkflowBuilder WithParser(this WorkflowBuilder bulder, IWorkflowParser parser) where TSchemeMedium : class` Configures a [WorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/WorkflowBuilder-TSchemeMedium/) with the specified [IWorkflowParser](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Parser/IWorkflowParser-TSchemeMedium/). The builder can then convert stored schemes into executable [ProcessDefinition](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/ProcessDefinition/) instances and serialize edited definitions back to the source representation. ### Parameters | Name | Type | Description | | --- | --- | --- | | `bulder` | `WorkflowBuilder` | The workflow builder instance. | | `parser` | `IWorkflowParser` | The workflow scheme parser. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | `public static IWorkflowBuilder WithShemePersistenceProvider(this WorkflowBuilder builder, ISchemePersistenceProvider schemePersistenceProvider) where TSchemeMedium : class` Configures a [WorkflowBuilder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Builder/WorkflowBuilder-TSchemeMedium/) with the specified [ISchemePersistenceProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Persistence/ISchemePersistenceProvider-TSchemeMedium/). The builder can then load and save source schemes and resolve the scheme assigned to a process instance. ### Parameters | Name | Type | Description | | --- | --- | --- | | `builder` | `WorkflowBuilder` | The workflow builder instance. | | `schemePersistenceProvider` | `ISchemePersistenceProvider` | The scheme persistence provider. | ### Returns | Type | Description | | --- | --- | | `IWorkflowBuilder` | The configured builder. | `public static WorkflowRuntime WithTimerManager(this WorkflowRuntime runtime, ITimerManager timerManager)` Assigns the specified [ITimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ITimerManager/) to [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and initializes it. Once the runtime starts, the manager can find due workflow timers and execute their timer transitions. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `timerManager` | `ITimerManager` | The timer manager. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static WorkflowRuntime WithCalendars(this WorkflowRuntime runtime, params ICalendar[] calendars)` Adds [ICalendar](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/ICalendar/) instances whose names are not already present in [WorkflowRuntime.Calendars](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Registered calendars can then be selected by a process or scheme for working-time-aware date and timer calculations. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `calendars` | `ICalendar[]` | The work calendar instances. A calendar whose name is already registered is ignored. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime for fluent chaining. | `public static WorkflowRuntime SetDefaultCalendar(this WorkflowRuntime runtime, string calendarName)` Sets [WorkflowRuntime.DefaultCalendarName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Processes whose instance and scheme do not specify a calendar then use this calendar for date and timer calculations. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `calendarName` | `String` | The work calendar name. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentException` | Thrown when the named calendar is not registered. | `public static WorkflowRuntime EnableCodeActions(this WorkflowRuntime runtime)` Sets [WorkflowRuntime.CodeActionsCompillationEnable](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and [WorkflowRuntime.ExpressionsCompilationEnable](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). Code actions and expressions defined in process schemes can then be compiled and executed. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime returned for fluent chaining; the compilation setting is process-wide. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithExpressionsCompilerOptions(this WorkflowRuntime runtime, ExpressionsCompilerOptions options)` Sets the process-wide [WorkflowRuntime.ExpressionsCompilerOptions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) used by [ExpressionsCompiler](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/ExpressionsCompiler/). These options control parallelism and garbage collection while expressions from process schemes are compiled. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime returned for fluent chaining; the compiler options are process-wide. | | `options` | `ExpressionsCompilerOptions` | The [ExpressionsCompilerOptions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.CodeActions/ExpressionsCompilerOptions/) to use. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime CodeActionsDebugOn(this WorkflowRuntime runtime)` Sets the process-wide [WorkflowRuntime.CodeActionsDebugMode](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). Compiled code actions can then interrupt an attached debugger at an explicit debug break. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime returned for fluent chaining; debug mode is process-wide. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime DisableCodeActions(this WorkflowRuntime runtime)` Sets [WorkflowRuntime.CodeActionsCompillationEnable](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and [WorkflowRuntime.ExpressionsCompilationEnable](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). Code actions and expressions defined in process schemes are then left uncompiled and cannot provide executable implementations. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime returned for fluent chaining; the compilation setting is process-wide. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime RegisterAssemblyForCodeActions(this WorkflowRuntime runtime, Assembly assembly, bool ignoreForDesigner = false, Func designerTypeFilter = null)` Registers an assembly with [WorkflowRuntime.CodeActionsRegisterAssembly(Assembly)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and, unless disabled, with the Designer type registry. Code actions can then reference types from that assembly, and the Designer can expose those types when registration for it is enabled. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime returned for fluent chaining; assembly registration is process-wide. | | `assembly` | `Assembly` | The assembly for registration. | | `ignoreForDesigner` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to skip registering assembly types in the designer; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `designerTypeFilter` | `Func` | Optional filter for types exposed to the designer. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime SetExecutionSearchOrder(this WorkflowRuntime runtime, ExecutionSearchOrder order)` Sets [WorkflowRuntimeSettings.ExecutionSearchOrder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/), which controls lookup of actions, conditions, and rules by name. When the same name exists in local code actions, global code actions, and a provider, the first matching source in this order supplies the implementation. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `order` | `ExecutionSearchOrder` | The [ExecutionSearchOrder](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ExecutionSearchOrder/) to use. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithRuleProvider(this WorkflowRuntime runtime, IWorkflowRuleProvider ruleProvider, List schemes = null)` Adds an [IWorkflowRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowRuleProvider/) to [WorkflowRuntime.RuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Rules exposed by the provider can then be referenced by actors and transition restrictions to check or calculate the workflow participants allowed to execute a transition. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `ruleProvider` | `IWorkflowRuleProvider` | The rule provider to add. | | `schemes` | `List` | Scheme codes for which to register the provider; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or an empty list registers it globally. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `ruleProvider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime ClearRuleProvider(this WorkflowRuntime runtime)` Resets [WorkflowRuntime.RuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [EmptyWorkflowRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/EmptyWorkflowRuleProvider/). Provider-backed rules are then unavailable, while local and global code-action rules can still be resolved. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithActionProvider(this WorkflowRuntime runtime, IWorkflowActionProvider workflowActionProvider, List schemes = null)` Adds an [IWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowActionProvider/) to [WorkflowRuntime.ActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Actions and conditions exposed by the provider can then be referenced by name and executed from process schemes. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `workflowActionProvider` | `IWorkflowActionProvider` | The action provider to add. | | `schemes` | `List` | Scheme codes for which to register the provider; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or an empty list registers it globally. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `workflowActionProvider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime ClearActionProvider(this WorkflowRuntime runtime)` Resets [WorkflowRuntime.ActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [EmptyWorkflowActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/EmptyWorkflowActionProvider/). Provider-backed actions and conditions are then unavailable, while local and global code actions can still be resolved. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithExternalParametersProvider(this WorkflowRuntime runtime, IWorkflowExternalParametersProvider externalParametersProvider, List schemes = null)` Adds an [IWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IWorkflowExternalParametersProvider/) to [WorkflowRuntime.ExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). When process code reads or writes a parameter recognized by the provider, the runtime delegates that access to the provider instead of treating the value as an ordinary process parameter. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `externalParametersProvider` | `IWorkflowExternalParametersProvider` | The external parameters provider to add. | | `schemes` | `List` | Scheme codes for which to register the provider; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or an empty list registers it globally. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `externalParametersProvider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime ClearExternalParametersProvider(this WorkflowRuntime runtime)` Resets [WorkflowRuntime.ExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to [EmptyWorkflowExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/EmptyWorkflowExternalParametersProvider/). Parameter access is then limited to parameters held by the process instance because no external parameter names are recognized. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithLocalizationProvider(this WorkflowRuntime runtime, ILocalizationProvider provider)` Sets the external [ILocalizationProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/ILocalizationProvider/) used by [WorkflowRuntime.Localizer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) and predefined Designer localization. The runtime and Designer can then resolve localized names and translations supplied outside process schemes. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `provider` | `ILocalizationProvider` | The localization provider implementation. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `provider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Remarks Configure the provider before [WorkflowRuntime.Localizer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) is first accessed because the localizer captures its sources when it is initialized. `public static WorkflowRuntime ClearLocalizationProvider(this WorkflowRuntime runtime)` Clears the external localization provider by resetting it to [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). Future localization initialization and Designer requests then stop including translations from that provider. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Remarks If [WorkflowRuntime.Localizer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) has already been initialized, that localizer retains the sources it captured during initialization. `public static WorkflowRuntime WithDesignerAutocompleteProvider(this WorkflowRuntime runtime, IDesignerAutocompleteProvider autocompleteProvider, List schemes = null)` Adds an [IDesignerAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IDesignerAutocompleteProvider/) to [WorkflowRuntime.DesignerAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). The Workflow Designer can then show its suggestions in rule, action, and condition parameter fields. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `autocompleteProvider` | `IDesignerAutocompleteProvider` | The designer autocomplete provider to add. | | `schemes` | `List` | Scheme codes for which to register the provider; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or an empty list registers it globally. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `autocompleteProvider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime ClearDesignerAutocompleteProvider(this WorkflowRuntime runtime)` Resets [WorkflowRuntime.DesignerAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to its default value, [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). The Workflow Designer then receives no custom autocomplete suggestions from the runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithDesignerParameterFormatProvider(this WorkflowRuntime runtime, IDesignerParameterFormatProvider designerParameterFormatProvider, List schemes = null)` Adds an [IDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/IDesignerParameterFormatProvider/) to [WorkflowRuntime.DesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). The Workflow Designer can then build structured forms for editing parameters of the named actions, conditions, and rules supplied by the provider. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `designerParameterFormatProvider` | `IDesignerParameterFormatProvider` | The parameter format provider to add. | | `schemes` | `List` | Scheme codes for which to register the provider; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or an empty list registers it globally. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `designerParameterFormatProvider` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime ClearDesignerParameterFormatProvider(this WorkflowRuntime runtime)` Resets [WorkflowRuntime.DesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) to its default value, [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). Provider-supplied parameter forms are then unavailable, so the Designer falls back to scheme-defined formats or raw parameter editing. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithPlugins(this WorkflowRuntime runtime, List schemes, params IWorkflowPlugin[] plugins)` Registers one or more [IWorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/IWorkflowPlugin/) instances in the workflow runtime. Any execution capabilities, external parameters, and Designer extensions implemented by the plugins then become available to the runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `schemes` | `List` | Scheme codes passed to each plugin and used to scope provider capabilities that support scheme-specific registration. | | `plugins` | `IWorkflowPlugin[]` | Plugin instances. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithPlugin(this WorkflowRuntime runtime, IWorkflowPlugin plugin, List schemes = null)` Registers an [IWorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/IWorkflowPlugin/) and its supported provider capabilities in the workflow runtime. Its execution capabilities, external parameters, and Designer extensions can then be used by workflows when the plugin implements the corresponding contracts. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `plugin` | `IWorkflowPlugin` | The plugin instance. | | `schemes` | `List` | Scheme codes passed to the plugin and used to scope provider capabilities that support scheme-specific registration. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Thrown when `plugin` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime)` Configures [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with a [SingleServerServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/SingleServerServiceRunner/) and configures [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for single-server execution using [DefaultSingleServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/DefaultSingleServerSettingsSource/). When started, this runtime can restore active processes and execute due timers without multi-server coordination. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime to configure for single-server execution. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime, SingleServerSettings settings)` Configures [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with a [SingleServerServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/SingleServerServiceRunner/) and configures [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for single-server execution using the specified [SingleServerSettings](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/SingleServerSettings/). When started, this runtime can restore active processes and execute due timers without multi-server coordination. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime to configure for single-server execution. | | `settings` | `SingleServerSettings` | Single-server settings. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime, ISingleServerSettingsSource settingsSource)` Configures [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with a [SingleServerServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/SingleServerServiceRunner/) and configures [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for single-server execution using the specified [ISingleServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/ISingleServerSettingsSource/). When started, this runtime can restore active processes and execute due timers without multi-server coordination. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime to configure for single-server execution. | | `settingsSource` | `ISingleServerSettingsSource` | Single-server settings source. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithProcessRestorer(this WorkflowRuntime runtime, IProcessRestorer restorer)` Adds an [IProcessRestorer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/IProcessRestorer/) that supplies custom recovery decisions while processes are restored after a runtime or server failure. A matching process can then resume according to the restorer's [RestoreDecision](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/RestoreDecision/) instead of the default recovery decision. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `restorer` | `IProcessRestorer` | The process restorer to add. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithServiceRunner(this WorkflowRuntime runtime, IWorkflowServiceRunner workflowServiceRunner)` Sets [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). The supplied runner then controls service-specific startup, including any restoration, coordination, and timer initialization that it implements. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `workflowServiceRunner` | `IWorkflowServiceRunner` | The [IWorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/IWorkflowServiceRunner/) implementation to use. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithProcessLogger(this WorkflowRuntime runtime, IProcessLogProvider processLogger)` Sets [WorkflowRuntime.ProcessLogger](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). Subsequent process log entries are written to this provider and can be retrieved through its read methods. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `processLogger` | `IProcessLogProvider` | The [IProcessLogProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Logging/IProcessLogProvider/) implementation to use. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime ClearProcessRestorers(this WorkflowRuntime runtime)` Removes all configured [IProcessRestorer](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ProcessRestoring/IProcessRestorer/) instances. Process recovery then uses the built-in default decision for every process. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime AsMultiServer(this WorkflowRuntime runtime, IMultiServerSettingsSource settingsSource)` Configures [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with a [MultiServerServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/MultiServerServiceRunner/) and configures [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for multi-server execution using the specified [IMultiServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/IMultiServerSettingsSource/). When started, the runtime coordinates its liveness, process recovery, and timer work with the other runtime instances that use the same persistence storage. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime to configure for multi-server execution. | | `settingsSource` | `IMultiServerSettingsSource` | Multi-server settings source. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime AsMultiServer(this WorkflowRuntime runtime)` Configures [WorkflowRuntime.WorkflowServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with a [MultiServerServiceRunner](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.ServiceRunners/MultiServerServiceRunner/) and configures [WorkflowRuntime.TimerManager](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) for multi-server execution using [DefaultMultiServerSettingsSource](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Settings/DefaultMultiServerSettingsSource/). When started, the runtime coordinates its liveness, process recovery, and timer work with the other runtime instances that use the same persistence storage. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime to configure for multi-server execution. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithRuntimeSettings(this WorkflowRuntime runtime, WorkflowRuntimeSettings settings)` Replaces [WorkflowRuntime.Settings](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) with the specified [WorkflowRuntimeSettings](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/). Subsequent runtime operations use these values for execution lookup, cancellation, retries, limits, parsing, and timeouts. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `settings` | `WorkflowRuntimeSettings` | The settings to assign. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithCustomActivities(this WorkflowRuntime runtime, List activities)` Adds [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) instances to [WorkflowRuntime.CustomActivities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). These activity types can then be placed in a process through the Workflow Designer and executed by the runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `activities` | `List` | The custom activities to add. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithCustomConditions(this WorkflowRuntime runtime, List conditions)` Adds [FormBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/FormBase/) instances to [WorkflowRuntime.CustomConditions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). These condition forms can then be selected and configured in the Workflow Designer. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `conditions` | `List` | The custom conditions to add. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | `public static WorkflowRuntime WithCustomActivity(this WorkflowRuntime runtime, ActivityBase activity)` Adds an [ActivityBase](https://api.workflowengine.io/core/OptimaJet.Workflow.Core/ActivityBase/) to [WorkflowRuntime.CustomActivities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/). This activity type can then be placed in a process through the Workflow Designer and executed by the runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime instance. | | `activity` | `ActivityBase` | The custom activity to add. | ### Returns | Type | Description | | --- | --- | | `WorkflowRuntime` | The configured runtime. | [Previous WorkflowRuntimeBulkApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeBulkApi/) [Next WorkflowRuntimeGetActorsApi](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeGetActorsApi/)