Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class WorkflowRuntimeConfigurationExtension

OptimaJet.Workflow.Core.Runtime.WorkflowRuntimeConfigurationExtension

public static class WorkflowRuntimeConfigurationExtension

Inheritance

  • System.Object

Methods

public static WorkflowRuntime SetCancellationTokenHandling(this WorkflowRuntime runtime, CancellationTokenHandling value) #
Sets cancellation token handling type

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
value
CancellationTokenHandling
Cancellation token handling type

Returns

Type
Description
WorkflowRuntime
public static IWorkflowBuilder WithDefaultBuildSteps(this IWorkflowBuilder builder, WorkflowRuntime runtime) #
Configures the builder with default build steps

Parameters

Name
Type
Description
builder
IWorkflowBuilder
The instance of the builder
runtime
WorkflowRuntime

Returns

Type
Description
IWorkflowBuilder
Configured instance of builder
public static WorkflowRuntime WithBuilder(this WorkflowRuntime runtime, IWorkflowBuilder builder) #
Configures the runtime with specified builder IWorkflowBuilder

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
builder
IWorkflowBuilder
The instance of the builder IWorkflowBuilder

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithPersistenceProvider(this WorkflowRuntime runtime, IPersistenceProvider persistenceProvider) #
Configures the runtime with specified persistence provider IPersistenceProvider

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
persistenceProvider
IPersistenceProvider
The instance of the persistence provider IPersistenceProvider

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOn(this WorkflowRuntime runtime) #
Set WorkflowRuntime.IsAutoUpdateSchemeBeforeGetAvailableCommands to true

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOff(this WorkflowRuntime runtime) #
Set WorkflowRuntime.IsAutoUpdateSchemeBeforeGetAvailableCommands to false

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static Task<WorkflowRuntime> StartAsync(this WorkflowRuntime runtime) #
Start all workflow runtime services and compile global code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
Task<WorkflowRuntime>
Configured instance of the workflow runtime
public static WorkflowRuntime Start(this WorkflowRuntime runtime) #
Start all workflow runtime services and compile global code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static Task<(WorkflowRuntime runtime, Dictionary<string, string> compilerErrors)> StartAsync(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services and compile global code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
ignoreNotCompiledGlobalActions
Boolean
if true all compillation errors in the global codeactions will be ignored

Returns

Type
Description
Task<String>
Configured instance of the workflow runtime
public static WorkflowRuntime Start(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions, out Dictionary<string, string> compilerErrors) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services and compile global code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
ignoreNotCompiledGlobalActions
Boolean
if true all compillation errors in the global codeactions will be ignored
compilerErrors
Dictionary<String>
compiler errors

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static Task<WorkflowRuntime> ColdStartAsync(this WorkflowRuntime runtime) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services except timers.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
Task<WorkflowRuntime>
Configured instance of the workflow runtime
public static WorkflowRuntime ColdStart(this WorkflowRuntime runtime) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services except timers.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static Task<(WorkflowRuntime runtime, Dictionary<string, string> compilerErrors)> ColdStartAsync(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services except timers.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
ignoreNotCompiledGlobalActions
Boolean

Returns

Type
Description
Task<String>
Configured instance of the workflow runtime
public static WorkflowRuntime ColdStart(this WorkflowRuntime runtime, bool ignoreNotCompiledGlobalActions, out Dictionary<string, string> compilerErrors) #
System use only. The signature of this method can be changed without any notification. Start all workflow runtime services except timers.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
ignoreNotCompiledGlobalActions
Boolean
compilerErrors
Dictionary<String>

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static IWorkflowBuilder WithCache(this IWorkflowBuilder bulder, IParsedProcessCache cache) #
Configures the workflow builder with specified cache for parced processes IParsedProcessCache

Parameters

Name
Type
Description
bulder
IWorkflowBuilder
The instance of the workflow builder
cache
IParsedProcessCache
The instance of the cache for parced processes IParsedProcessCache

Returns

Type
Description
IWorkflowBuilder
Configured instance of the workflow builder
public static IWorkflowBuilder WithDefaultCache(this IWorkflowBuilder bulder) #
Configures the workflow builder with default in memory cache for parced processes IParsedProcessCache

Parameters

Name
Type
Description
bulder
IWorkflowBuilder
The instance of the workflow builder

Returns

Type
Description
IWorkflowBuilder
Configured instance of the workflow builder
public static IWorkflowBuilder WithGenerator<TSchemeMedium>(this WorkflowBuilder<TSchemeMedium> bulder, IWorkflowGenerator<TSchemeMedium> generator) where TSchemeMedium : class #
Configures the workflow builder with specified workflow scheme generatorIWorkflowGenerator<TSchemeMedium>

Parameters

Name
Type
Description
bulder
WorkflowBuilder<TSchemeMedium>
The instance of the workflow builder
generator
IWorkflowGenerator<TSchemeMedium>
The instance of the workflow scheme generator IWorkflowGenerator<TSchemeMedium>

Returns

Type
Description
IWorkflowBuilder
Configured instance of the workflow builder
public static IWorkflowBuilder WithParser<TSchemeMedium>(this WorkflowBuilder<TSchemeMedium> bulder, IWorkflowParser<TSchemeMedium> parser) where TSchemeMedium : class #
Configures the workflow builder with specified workflow scheme parserIWorkflowParser<TSchemeMedium>

Parameters

Name
Type
Description
bulder
WorkflowBuilder<TSchemeMedium>
The instance of the workflow builder
parser
IWorkflowParser<TSchemeMedium>
The instance of the workflow scheme parser IWorkflowParser<TSchemeMedium>

Returns

Type
Description
IWorkflowBuilder
Configured instance of the workflow builder
public static IWorkflowBuilder WithShemePersistenceProvider<TSchemeMedium>(this WorkflowBuilder<TSchemeMedium> builder, ISchemePersistenceProvider<TSchemeMedium> schemePersistenceProvider) where TSchemeMedium : class #
Configures the workflow builder with specified scheme persistence providerISchemePersistenceProvider<TSchemeMedium>

Parameters

Name
Type
Description
builder
WorkflowBuilder<TSchemeMedium>
The instance of the workflow builder
schemePersistenceProvider
ISchemePersistenceProvider<TSchemeMedium>
The instance of the scheme persistence provider ISchemePersistenceProvider<TSchemeMedium>

Returns

Type
Description
IWorkflowBuilder
Configured instance of the workflow builder
public static WorkflowRuntime WithTimerManager(this WorkflowRuntime runtime, ITimerManager timerManager) #
Configures the runtime with specified timer manager ITimerManager

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
timerManager
ITimerManager
The instance of the timer manager ITimerManager

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithCalendars(this WorkflowRuntime runtime, params ICalendar[] calendars) #
Configures the runtime with specified work calendars

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
calendars
ICalendar[]
Work calendar instances

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime SetDefaultCalendar(this WorkflowRuntime runtime, string calendarName) #
Set default work calendar to runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
calendarName
String
The Work calendar name

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime EnableCodeActions(this WorkflowRuntime runtime) #
Enable code action and expression compilation in runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithExpressionsCompilerOptions(this WorkflowRuntime runtime, ExpressionsCompilerOptions options) #
Configure the behaviour of ExpressionsCompiler

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
options
ExpressionsCompilerOptions
Expressions compiler options

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime CodeActionsDebugOn(this WorkflowRuntime runtime) #
Switch on compilation debug mode for code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime DisableCodeActions(this WorkflowRuntime runtime) #
Disable code action compillation in runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime RegisterAssemblyForCodeActions(this WorkflowRuntime runtime, Assembly assembly, bool ignoreForDesigner = false, Func<Type, bool> designerTypeFilter = null) #
Register reference on assembly for compilation of code actions

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
assembly
Assembly
Assembly for register
ignoreForDesigner
Boolean
If true then types from the assembly will not be registered in the designer
designerTypeFilter
Func<Boolean>
Function which filters a types for designer

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime SetExecutionSearchOrder(this WorkflowRuntime runtime, ExecutionSearchOrder order) #
Sets the order of the Action, Condition, or Rule search by name

Parameters

Name
Type
Description
runtime
WorkflowRuntime
order
ExecutionSearchOrder

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithRuleProvider(this WorkflowRuntime runtime, IWorkflowRuleProvider ruleProvider, List<string> schemes = null) #
Adds specified rule provider IWorkflowRuleProvider to the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
ruleProvider
IWorkflowRuleProvider
The instance of the rule provider IWorkflowRuleProvider
schemes
List<String>
The list of schemes for which the provider is added

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearRuleProvider(this WorkflowRuntime runtime) #
Resets Rule provider to default value (EmptyWorkflowRuleProvider)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithActionProvider(this WorkflowRuntime runtime, IWorkflowActionProvider workflowActionProvider, List<string> schemes = null) #
Adds specified action provider IWorkflowActionProvider in the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
workflowActionProvider
IWorkflowActionProvider
The instance of the action provider IWorkflowActionProvider
schemes
List<String>
The list of schemes for which the provider is added

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearActionProvider(this WorkflowRuntime runtime) #
Resets Action provider to default value (EmptyWorkflowActionProvider)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithExternalParametersProvider(this WorkflowRuntime runtime, IWorkflowExternalParametersProvider externalParametersProvider, List<string> schemes = null) #
Adds specified external parameters provider IWorkflowExternalParametersProvider in the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
externalParametersProvider
IWorkflowExternalParametersProvider
The instance of the external parameters provider IWorkflowExternalParametersProvider
schemes
List<String>
The list of schemes for which the provider is added

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearExternalParametersProvider(this WorkflowRuntime runtime) #
Resets external parameters provider to default value (EmptyWorkflowExternalParametersProvider)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithLocalizationProvider(this WorkflowRuntime runtime, ILocalizationProvider provider) #
Adds specified ILocalizationProvider in the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
provider
ILocalizationProvider
The instance of the implemented ILocalizationProvider

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearLocalizationProvider(this WorkflowRuntime runtime) #
Resets ILocalizationProvider to default value (null)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithDesignerAutocompleteProvider(this WorkflowRuntime runtime, IDesignerAutocompleteProvider autocompleteProvider, List<string> schemes = null) #
Adds specified autocomplete provider (only for the Designer) IDesignerAutocompleteProvider in the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
autocompleteProvider
IDesignerAutocompleteProvider
The instance of the autocomplete provider IDesignerAutocompleteProvider
schemes
List<String>
The list of schemes for which the provider is added

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearDesignerAutocompleteProvider(this WorkflowRuntime runtime) #
Resets Designer Autocomplete Provider to default value (null)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithDesignerParameterFormatProvider(this WorkflowRuntime runtime, IDesignerParameterFormatProvider designerParameterFormatProvider, List<string> schemes = null) #
Adds specified parameter format provider (only for the Designer) IDesignerParameterFormatProvider in the runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The instance of the runtime
designerParameterFormatProvider
IDesignerParameterFormatProvider
The instance of the parameter format provider IDesignerParameterFormatProvider
schemes
List<String>
The list of schemes for which the provider is added

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime ClearDesignerParameterFormatProvider(this WorkflowRuntime runtime) #
Resets Designer Parameter Format Provider to default value (null)

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured instance of the workflow runtime

Returns

Type
Description
WorkflowRuntime
Configured instance of the workflow runtime
public static WorkflowRuntime WithPlugins(this WorkflowRuntime runtime, List<string> schemes, params IWorkflowPlugin[] plugins) #
Registers plugins in the workflow runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured workflow runtime
schemes
List<String>
The list of schemes for which the plugins is added
plugins
IWorkflowPlugin[]
>Plugins instances

Returns

Type
Description
WorkflowRuntime
Configured workflow runtime
public static WorkflowRuntime WithPlugin(this WorkflowRuntime runtime, IWorkflowPlugin plugin, List<string> schemes = null) #
Registers plugin in the workflow runtimeS

Parameters

Name
Type
Description
runtime
WorkflowRuntime
Configured workflow runtime
plugin
IWorkflowPlugin
Plugin instance
schemes
List<String>
The list of schemes for which the plugin is added

Returns

Type
Description
WorkflowRuntime
Configured workflow runtime
public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime) #
Use this method when the runtime is running in a single-server environment.

Parameters

Name
Type
Description
runtime
WorkflowRuntime

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime, SingleServerSettings settings) #
Use this method when the runtime is running in a single-server environment.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
settings
SingleServerSettings

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime AsSingleServer(this WorkflowRuntime runtime, ISingleServerSettingsSource settingsSource) #
Use this method when the runtime is running in a single-server environment.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
settingsSource
ISingleServerSettingsSource

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithProcessRestorer(this WorkflowRuntime runtime, IProcessRestorer restorer) #
Add the process restore that will run the procees after server failure.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
restorer
IProcessRestorer

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithServiceRunner(this WorkflowRuntime runtime, IWorkflowServiceRunner workflowServiceRunner) #

Parameters

Name
Type
Description
runtime
WorkflowRuntime
workflowServiceRunner
IWorkflowServiceRunner

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithProcessLogger(this WorkflowRuntime runtime, IProcessLogProvider processLogger) #

Parameters

Name
Type
Description
runtime
WorkflowRuntime
processLogger
IProcessLogProvider

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime ClearProcessRestorers(this WorkflowRuntime runtime) #
Clear process restorers

Parameters

Name
Type
Description
runtime
WorkflowRuntime

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime AsMultiServer(this WorkflowRuntime runtime, IMultiServerSettingsSource settingsSource) #
Use this method when the runtime is running in a multi-server environment.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
settingsSource
IMultiServerSettingsSource

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime AsMultiServer(this WorkflowRuntime runtime) #
Use this method when the runtime is running in a multi-server environment.

Parameters

Name
Type
Description
runtime
WorkflowRuntime

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithRuntimeSettings(this WorkflowRuntime runtime, WorkflowRuntimeSettings settings) #
Change runtime settings

Parameters

Name
Type
Description
runtime
WorkflowRuntime
settings
WorkflowRuntimeSettings

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithCustomActivities(this WorkflowRuntime runtime, List<ActivityBase> activities) #
Registers custom activities in the workflow runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
activities
List<ActivityBase>

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithCustomConditions(this WorkflowRuntime runtime, List<FormBase> conditions) #
Registers custom conditions in the workflow runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
conditions
List<FormBase>

Returns

Type
Description
WorkflowRuntime
public static WorkflowRuntime WithCustomActivity(this WorkflowRuntime runtime, ActivityBase activity) #
Registers custom activity in the workflow runtime

Parameters

Name
Type
Description
runtime
WorkflowRuntime
activity
ActivityBase

Returns

Type
Description
WorkflowRuntime