Workflow Engine .NET  2
Classes | Public Member Functions | Static Public Member Functions | Properties | Events | List of all members
OptimaJet.Workflow.Core.Runtime.WorkflowRuntime Class Reference

Provides main API to operations with workflow processes More...

Public Member Functions

 WorkflowRuntime (Guid runtimeId)
 Creates the WFE runtime object More...
 
 WorkflowRuntime ()
 Creates the WFE runtime object More...
 
bool IsProcessExists (Guid processId)
 Check existence of the specified process More...
 
void CreateInstance (string schemeCode, Guid processId)
 Create instance of process. More...
 
void CreateInstance (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId)
 Create instance of process. More...
 
void CreateInstance (string schemeCode, Guid processId, IDictionary< string, object > schemeCreationParameters)
 Create instance of process. More...
 
void CreateInstance (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, IDictionary< string, object > schemeCreationParameters)
 Create instance of the process. More...
 
void CreateInstance (CreateInstanceParams createInstanceParams)
 Create instance of the process. More...
 
void DeleteInstance (Guid processId)
 Delete instance of the process and all child subprocesses. More...
 
ProcessInstancesTree GetProcessInstancesTree (Guid rootProcessId)
 Returns process instance tree (root process and subprocesses) More...
 
ProcessInstancesTree GetProcessInstancesTree (ProcessInstance processInstance)
 Returns process instance tree (root process and subprocesses) More...
 
void SetSchemeIsObsolete (string schemeCode, Dictionary< string, object > parameters)
 Set flag IsObsolete for all schemas of process with specific code and parameters More...
 
void SetSchemeIsObsolete (string schemeCode)
 Set flag IsObsolete for all schemas of process with specific code More...
 
void SetTimerValue (Guid processId, string timerName, DateTime newValue)
 Sets new value of named timer. Use this method outside of your process. More...
 
void SetTimerValue (ProcessInstance processInstance, string timerName, DateTime newValue)
 Sets new value of named timer. Use this method inside of your process (in actions). More...
 
void ResetTimerValue (Guid processId, string timerName)
 Resets value of named timer. Use this method outside of your process. More...
 
void ResetTimerValue (ProcessInstance processInstance, string timerName)
 Resets value of named timer. Use this method inside of your process (in actions). More...
 
void UpdateSchemeIfObsolete (Guid processId, bool ignoreAutoSchemeUpdate=false)
 Updating scheme of specific process More...
 
void UpdateSchemeIfObsolete (Guid processId, IDictionary< string, object > parameters, bool ignoreAutoSchemeUpdate=false)
 Updating scheme of specific process More...
 
void PreExecuteFromInitialActivity (Guid processId, bool ignoreCurrentStateCheck=false)
 Pre-execution from initial activity of the process More...
 
void PreExecuteFromCurrentActivity (Guid processId, bool ignoreCurrentStateCheck=false)
 Pre-execution from current activity of the process More...
 
void PreExecute (Guid processId, string fromActivityName, bool ignoreCurrentStateCheck=false)
 Pre-execution from specified activity of the process More...
 
IEnumerable< WorkflowCommandGetInitialCommands (string schemeCode, string identityId)
 Return the list of commands which is availiable from initial activity for specified user More...
 
IEnumerable< WorkflowCommandGetInitialCommands (string schemeCode, IEnumerable< string > identityIds, IDictionary< string, object > processParameters=null, string commandNameFilter=null)
 Return the list of commands which is availiable from initial activity for specified users More...
 
IEnumerable< WorkflowCommandGetAvailableCommands (Guid processId, string identityId)
 Return the list of commands which is availiable from current activity for specified user More...
 
IEnumerable< WorkflowCommandGetAvailableCommands (Guid processId, IEnumerable< string > identityIds, string commandNameFilter=null, string mainIdentityId=null)
 Return the list of commands which is availiable from current activity for specified user More...
 
CommandExeutionResult ExecuteCommand (WorkflowCommand command, string identityId, string impersonatedIdentityId)
 Execute specified command for specified users More...
 
CommandExeutionResult ExecuteCommand (Guid processId, string identityId, string impersonatedIdentityId, WorkflowCommand command)
 Execute specified command for specified users More...
 
WorkflowState GetInitialState (string schemeCode, IDictionary< string, object > processParameters=null)
 Return the initial state for process scheme More...
 
WorkflowState GetCurrentState (Guid processId)
 Return the current state of specified process More...
 
string GetCurrentStateName (Guid processId)
 Return the current state name of specified process More...
 
string GetCurrentActivityName (Guid processId)
 Return the current activity name of specified process More...
 
IEnumerable< WorkflowStateGetAvailableStateToSet (Guid processId)
 Get the list of all states which available for set of specified process localized in current culture More...
 
IEnumerable< WorkflowStateGetAvailableStateToSet (Guid processId, CultureInfo culture)
 Get the list of all states which available for set of specified process localized in specified culture More...
 
IEnumerable< WorkflowStateGetAvailableStateToSet (string schemeCode, IDictionary< string, object > parameters=null)
 Get the list of all states which available for set of specified scheme in current culture More...
 
IEnumerable< WorkflowStateGetAvailableStateToSet (string schemeCode, CultureInfo culture, IDictionary< string, object > parameters=null)
 Get the list of all states which available for set of specified scheme in specified culture More...
 
void SetState (Guid processId, string identityId, string impersonatedIdentityId, string stateName, IDictionary< string, object > parameters=null, bool preventExecution=false)
 Set specified state for specified process More...
 
void SetActivityWithoutExecution (ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus=false)
 Set specified activity as current without execution of the implementation of the activity More...
 
async Task SetActivityWithoutExecutionAsync (ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus=false)
 Set specified activity as current without execution of the implementation of the activity (Async version) More...
 
void SetActivityWithExecution (string identityId, string impersonatedIdentityId, IDictionary< string, object > parameters, ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus=false)
 Set specified activity as current and executing the implementation of the activity More...
 
async Task SetActivityWithExecutionAsync (string identityId, string impersonatedIdentityId, IDictionary< string, object > parameters, ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus=false, CancellationToken token=default(CancellationToken))
 Set specified activity as current and executing the implementation of the activity (Async version) More...
 
IEnumerable< string > GetAllActorsForAllCommandTransitions (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command for specified process activity More...
 
IEnumerable< string > GetAllActorsForDirectCommandTransitions (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith direct transitions (by transition classifier) for specified process activity More...
 
IEnumerable< string > GetAllActorsForDirectAndUndefinedCommandTransitions (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith direct or undefined transitions (by transition classifier) for specified process activity More...
 
IEnumerable< string > GetAllActorsForReverseCommandTransitions (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith reverse transitions (by transition classifier) for specified process activity More...
 
IEnumerable< string > GetAllActorsForCommandTransitions (Guid processId, List< TransitionClassifier > classifiers, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for specified process activity More...
 
IEnumerable< string > GetAllActorsForCommandTransitions (ProcessInstance processInstance, List< TransitionClassifier > classifiers=null)
 Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for executed activity (inside of a transitional process) or for current activity (when a process is idled). Using of this method is preferable for notification of users which can execute next commands. More...
 
IEnumerable< string > GetAllActorsForCommandTransitions (TreeSearchFilter filter, List< TransitionClassifier > classifiers=null)
 Get the list of user ids which can execute any command bound whith a transitions selected by filter. This method is prefearable to use when you are using subprocesses More...
 
ProcessDefinition GetProcessScheme (Guid processId)
 Get procees definition (parsed scheme) for specified process More...
 
string GetLocalizedStateNameBySchemeCode (string schemeCode, string stateName, IDictionary< string, object > parameters=null)
 Get localized state name for specified scheme in current culture More...
 
ProcessStatus GetProcessStatus (Guid processId)
 Get status of specified process More...
 
string GetLocalizedStateNameBySchemeId (Guid schemeId, string stateName)
 Get localized state name for specified scheme in current culture More...
 
string GetLocalizedStateName (Guid processId, string stateName)
 Get localized state name for specified process in current culture More...
 
string GetLocalizedCommandName (Guid processId, string commandName)
 Get localized command name for specified process in current culture More...
 
string GetLocalizedCommandNameBySchemeId (Guid schemeId, string commandName)
 Get localized command name for specified scheme in current culture More...
 
ProcessInstance GetProcessInstanceAndFillProcessParameters (Guid processId)
 Get process instance with all parameters for specified process id More...
 
List< ProcessHistoryItemGetProcessHistory (Guid processId)
 Returns the history of process More...
 
async Task< bool > IsProcessExistsAsync (Guid processId)
 Check existence of the specified process More...
 
Task CreateInstanceAsync (string schemeCode, Guid processId, CancellationToken token=default(CancellationToken))
 Create instance of process (async version) More...
 
Task CreateInstanceAsync (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, CancellationToken token=default(CancellationToken))
 Create instance of process (async version) More...
 
Task CreateInstanceAsync (string schemeCode, Guid processId, IDictionary< string, object > schemeCreationParameters, CancellationToken token=default(CancellationToken))
 Create instance of process (async version) More...
 
Task CreateInstanceAsync (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, IDictionary< string, object > schemeCreationParameters, CancellationToken token=default(CancellationToken))
 Create instance of process (async version) More...
 
Task CreateInstanceAsync (CreateInstanceParams createInstanceParams, CancellationToken token=default(CancellationToken))
 Create instance of the process (async version) More...
 
async Task DeleteInstanceAsync (Guid processId)
 Delete instance of the process and all child subprocesses. (async version) More...
 
async Task SetSchemeIsObsoleteAsync (string schemeCode, Dictionary< string, object > parameters)
 Set flag IsObsolete for all schemas of process with specific code and parameters (async version) More...
 
async Task SetSchemeIsObsoleteAsync (string schemeCode)
 Set flag IsObsolete for all schemas of process with specific code (async version) More...
 
Task SetTimerValueAsync (Guid processId, string timerName, DateTime newValue)
 Sets new value of named timer (async version) More...
 
Task ResetTimerValueAsync (Guid processId, string timerName)
 Resets value of named timer (async version) More...
 
async Task UpdateSchemeIfObsoleteAsync (Guid processId)
 Updating scheme of specific process More...
 
async Task UpdateSchemeIfObsoleteAsync (Guid processId, IDictionary< string, object > parameters)
 Updating scheme of specific process (async version) More...
 
Task PreExecuteFromInitialActivityAsync (Guid processId, bool ignoreCurrentStateCheck=false, CancellationToken token=default(CancellationToken))
 Pre-execution from initial activity of the process (async version) More...
 
Task PreExecuteFromCurrentActivityAsync (Guid processId, bool ignoreCurrentStateCheck=false, CancellationToken token=default(CancellationToken))
 Pre-execution from current activity of the process (async version) More...
 
Task PreExecuteAsync (Guid processId, string fromActivityName, bool ignoreCurrentStateCheck=false, CancellationToken token=default(CancellationToken))
 Pre-execution from specified activity of the process (async version) More...
 
async Task< IEnumerable< WorkflowCommand > > GetInitialCommandsAsync (string schemeCode, string identityId)
 Return the list of commands which is availiable from initial activity for specified user (async version) More...
 
async Task< IEnumerable< WorkflowCommand > > GetInitialCommandsAsync (string schemeCode, IEnumerable< string > identityIds, IDictionary< string, object > processParameters=null, string commandNameFilter=null)
 Return the list of commands which is availiable from initial activity for specified users (async version) More...
 
async Task< IEnumerable< WorkflowCommand > > GetAvailableCommandsAsync (Guid processId, string identityId)
 Return the list of commands which is availiable from current activity for specified user (async version) More...
 
async Task< IEnumerable< WorkflowCommand > > GetAvailableCommandsAsync (Guid processId, IEnumerable< string > identityIds, string commandNameFilter=null, string mainIdentityId=null)
 Return the list of commands which is availiable from current activity for specified user (async version) More...
 
async Task< CommandExeutionResultExecuteCommandAsync (WorkflowCommand command, string identityId, string impersonatedIdentityId, CancellationToken token=default(CancellationToken))
 Execute specified command for specified users (async version) More...
 
Task< CommandExeutionResultExecuteCommandAsync (Guid processId, string identityId, string impersonatedIdentityId, WorkflowCommand command)
 Execute specified command for specified users (async version) More...
 
async Task< WorkflowStateGetInitialStateAsync (string schemeCode, IDictionary< string, object > processParameters=null)
 Return the initial state for process scheme (async version) More...
 
async Task< WorkflowStateGetCurrentStateAsync (Guid processId)
 Return the current state of specified process (async version) More...
 
async Task< string > GetCurrentStateNameAsync (Guid processId)
 Return the current state name of specified process (async version) More...
 
async Task< string > GetCurrentActivityNameAsync (Guid processId)
 Return the current activity name of specified process (async version) More...
 
async Task< IEnumerable< WorkflowState > > GetAvailableStateToSetAsync (Guid processId)
 Get the list of all states which available for set of specified process localized in current culture (async version) More...
 
async Task< IEnumerable< WorkflowState > > GetAvailableStateToSetAsync (Guid processId, CultureInfo culture)
 Get the list of all states which available for set of specified process localized in specified culture (async version) More...
 
async Task< IEnumerable< WorkflowState > > GetAvailableStateToSetAsync (string schemeCode, IDictionary< string, object > parameters=null)
 Get the list of all states which available for set of specified scheme in current culture (async version) More...
 
async Task< IEnumerable< WorkflowState > > GetAvailableStateToSetAsync (string schemeCode, CultureInfo culture, IDictionary< string, object > parameters=null)
 Get the list of all states which available for set of specified scheme in specified culture (async version) More...
 
async Task SetStateAsync (Guid processId, string identityId, string impersonatedIdentityId, string stateName, IDictionary< string, object > parameters=null, bool preventExecution=false)
 Set specified state for specified process (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForAllCommandTransitionsAsync (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command for specified process activity (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForDirectCommandTransitionsAsync (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith direct transitions (by transition classifier) for specified process activity (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForDirectAndUndefinedCommandTransitionsAsync (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith direct or undefined transitions (by transition classifier) for specified process activity (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForReverseCommandTransitionsAsync (Guid processId, bool beginningWithRoot=false, string activityName=null)
 Get the list of user ids which can execute any command bound whith reverse transitions (by transition classifier) for specified process activity (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForCommandTransitionsAsync (ProcessInstance processInstance, List< TransitionClassifier > classifiers=null)
 Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for executed activity (inside of a transitional process) or for current activity (when a process is idled). Using of this method is preferable for notification of users which can execute next commands. (async version) More...
 
async Task< IEnumerable< string > > GetAllActorsForCommandTransitionsAsync (TreeSearchFilter filter, List< TransitionClassifier > classifiers=null)
 Get the list of user ids which can execute any command bound whith a transitions selected by filter. This method is prefearable to use when you are using subprocesses (async version) More...
 
async Task< ProcessDefinitionGetProcessSchemeAsync (Guid processId)
 Get procees definition (parsed scheme) for specified process (async version) More...
 
async Task< string > GetLocalizedStateNameBySchemeCodeAsync (string schemeCode, string stateName, IDictionary< string, object > parameters=null)
 Get localized state name for specified scheme in current culture (async version) More...
 
async Task< ProcessStatusGetProcessStatusAsync (Guid processId)
 Get status of specified process (async version) More...
 
async Task< string > GetLocalizedStateNameBySchemeIdAsync (Guid schemeId, string stateName)
 Get localized state name for specified scheme in current culture (async version) More...
 
async Task< string > GetLocalizedStateNameAsync (Guid processId, string stateName)
 Get localized state name for specified process in current culture (async version) More...
 
async Task< string > GetLocalizedCommandNameAsync (Guid processId, string commandName)
 Get localized command name for specified process in current culture (async version) More...
 
async Task< string > GetLocalizedCommandNameBySchemeIdAsync (Guid schemeId, string commandName)
 Get localized command name for specified scheme in current culture (async version) More...
 
async Task< ProcessInstanceGetProcessInstanceAndFillProcessParametersAsync (Guid processId)
 Get process instance with all parameters for specified process id (async version) More...
 
async Task< List< ProcessHistoryItem > > GetProcessHistoryAsync (Guid processId)
 Returns the history of process (async version) More...
 

Static Public Member Functions

static void CodeActionsRegisterAssembly (Assembly assembly)
 Register assembly in CodeActionsCompiller as referenced assembly More...
 
static void RegisterLicense (string licenseText)
 Register the license to remove license restrictions More...
 

Properties

Guid Id [get]
 Runtime identifier More...
 
bool IsAutoUpdateSchemeBeforeGetAvailableCommands [get, set]
 Allow automatic schema of a process update before getting the commands list if its allowed in current activity More...
 
EventHandler< BeforeActivityExecutionEventArgsBeforeActivityExecution
 Raises before execution of choosen activity More...
 
EventHandler< NeedTimerValueEventArgsNeedTimerValue
 Raises when the timer value must be obtained More...
 
IDesignerAutocompleteProvider DesignerAutocompleteProvider [get, set]
 Instance of the autocomplete provider (only for the Designer) IDesignerAutocompleteProvider More...
 
IWorkflowRuleProvider RuleProvider [get, set]
 Instance of the Workflow rule provider IWorkflowRuleProvider More...
 
IWorkflowBuilder Builder [get, set]
 Instance of the Workflow builder IWorkflowBuilder More...
 
ITimerManager TimerManager [get, set]
 Instance of the Timer manager ITimerManager More...
 
IPersistenceProvider PersistenceProvider [get, set]
 Instance of the Persistence provider IPersistenceProvider More...
 
IWorkflowActionProvider ActionProvider [get, set]
 Instance of the Action provider IWorkflowActionProvider More...
 
CultureInfo SchemeParsingCulture [get, set]
 Culture for parsing some text parameters from scheme. Default is InvariantCulture More...
 
DateTime RuntimeDateTimeNow [get]
 Get date and time which used by runtime More...
 
bool UseUtcDateTimeAsRuntimeTime [get, set]
 Runtime use Utc date and time if true and Local date and time if false More...
 
bool IsCold [get]
 Runtime in cold start state if true More...
 
static bool CodeActionsCompillationEnable [get, set]
 Default value is true. Enable compillation for Code Actions CodeActionDefinition More...
 
in a code action s code *</summary > *static bool CodeActionsDebugMode [get, set]
 Default value is false. Enable debug in code action. You can put a brekpoint by Debugger.Break or /*break
 
CodeActionsInvoker GlobalActionsInvoker [get]
 Invoker which calls the global Code Actions More...
 

Events

EventHandler< NeedDeterminingParametersEventArgsOnNeedDeterminingParameters
 Raises when runtime need to obtain parameters for creating the scheme of the process More...
 
EventHandler< SchemaWasChangedEventArgsOnSchemaWasChanged
 Raises when the scheme of the process was changed More...
 
EventHandler< WorkflowErrorEventArgsOnWorkflowError
 Raises when workflow error occurred More...
 
EventHandler< StartingTransitionNotFoundEventArgsOnStartingTransitionNotFound
 Raises when runtime can not find starting transition of a subprocess in a new root schem More...
 
EventHandler< ProcessActivityChangedEventArgsProcessActivityChanged
 Raises when current activity of a process was changed More...
 
EventHandler< ProcessStatusChangedEventArgsProcessStatusChanged
 Raises when the status of the procees ProcessStatus was changed More...
 

Detailed Description

Provides main API to operations with workflow processes

Constructor & Destructor Documentation

◆ WorkflowRuntime() [1/2]

OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.WorkflowRuntime ( Guid  runtimeId)

Creates the WFE runtime object

Parameters
runtimeIdId of the runtime (reserved for further extension)

◆ WorkflowRuntime() [2/2]

OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.WorkflowRuntime ( )

Creates the WFE runtime object

Member Function Documentation

◆ CodeActionsRegisterAssembly()

static void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CodeActionsRegisterAssembly ( Assembly  assembly)
static

Register assembly in CodeActionsCompiller as referenced assembly

◆ CreateInstance() [1/5]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( string  schemeCode,
Guid  processId 
)

Create instance of process.

Parameters
schemeCodeCode of the scheme
processIdProcess id

◆ CreateInstance() [2/5]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId 
)

Create instance of process.

Parameters
schemeCodeCode of the scheme
processIdProcess id
identityIdThe user id which execute initial command if command is available
impersonatedIdentityIdThe user id for whom executes initial command if command is available

◆ CreateInstance() [3/5]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( string  schemeCode,
Guid  processId,
IDictionary< string, object >  schemeCreationParameters 
)

Create instance of process.

Parameters
schemeCodeCode of the scheme
processIdProcess id
schemeCreationParametersParameters for creating the scheme of the process (defining parameters)

◆ CreateInstance() [4/5]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId,
IDictionary< string, object >  schemeCreationParameters 
)

Create instance of the process.

Parameters
schemeCodeCode of the scheme
processIdProcess id
identityIdThe user id which execute initial command if command is available
impersonatedIdentityIdThe user id for whom executes initial command if command is available
schemeCreationParametersThe parameters for creating scheme of process (defining parameters)

◆ CreateInstance() [5/5]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( CreateInstanceParams  createInstanceParams)

Create instance of the process.

Parameters
createInstanceParamsParameters for creaition of an instance of a process

◆ CreateInstanceAsync() [1/5]

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
CancellationToken  token = default(CancellationToken) 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
tokenCancellation token

◆ CreateInstanceAsync() [2/5]

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId,
CancellationToken  token = default(CancellationToken) 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
identityIdThe user id which execute initial command if command is available
impersonatedIdentityIdThe user id for whom executes initial command if command is available
tokenCancellation token

◆ CreateInstanceAsync() [3/5]

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
IDictionary< string, object >  schemeCreationParameters,
CancellationToken  token = default(CancellationToken) 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
schemeCreationParametersThe parameters for creating scheme of process
tokenCancellation token

◆ CreateInstanceAsync() [4/5]

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId,
IDictionary< string, object >  schemeCreationParameters,
CancellationToken  token = default(CancellationToken) 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
identityIdThe user id which execute initial command if command is available
impersonatedIdentityIdThe user id for whom executes initial command if command is available
schemeCreationParametersThe parameters for creating scheme of process
tokenCancellation token

◆ CreateInstanceAsync() [5/5]

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( CreateInstanceParams  createInstanceParams,
CancellationToken  token = default(CancellationToken) 
)

Create instance of the process (async version)

Parameters
createInstanceParamsParameters for creaition of an instance of a process
tokenCancellation token

◆ DeleteInstance()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.DeleteInstance ( Guid  processId)

Delete instance of the process and all child subprocesses.

Parameters
processIdProcess id

◆ DeleteInstanceAsync()

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.DeleteInstanceAsync ( Guid  processId)

Delete instance of the process and all child subprocesses. (async version)

Parameters
processIdProcess id

◆ ExecuteCommand() [1/2]

CommandExeutionResult OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommand ( WorkflowCommand  command,
string  identityId,
string  impersonatedIdentityId 
)

Execute specified command for specified users

Parameters
commandCommand to execute
identityIdThe user id which execute command
impersonatedIdentityIdThe user id for whom executes command (impersonation)
Returns
Result of the execution

◆ ExecuteCommand() [2/2]

CommandExeutionResult OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommand ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
WorkflowCommand  command 
)

Execute specified command for specified users

Parameters
processIdProcess id
identityIdThe user id which execute command
impersonatedIdentityIdThe user id for whom executes command (impersonation)
commandCommand to execute
Returns
Result of the execution

◆ ExecuteCommandAsync() [1/2]

async Task<CommandExeutionResult> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommandAsync ( WorkflowCommand  command,
string  identityId,
string  impersonatedIdentityId,
CancellationToken  token = default (CancellationToken) 
)

Execute specified command for specified users (async version)

Parameters
commandCommand to execute
identityIdThe user id which execute command
impersonatedIdentityIdThe user id for whom executes command (impersonation)
tokenCancellation token
Returns
Result of the execution

◆ ExecuteCommandAsync() [2/2]

Task<CommandExeutionResult> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommandAsync ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
WorkflowCommand  command 
)

Execute specified command for specified users (async version)

Parameters
processIdProcess id
identityIdThe user id which execute command
impersonatedIdentityIdThe user id for whom executes command (impersonation)
commandCommand to execute
Returns
Result of the execution

◆ GetAllActorsForAllCommandTransitions()

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForAllCommandTransitions ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command for specified process activity

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForAllCommandTransitionsAsync()

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForAllCommandTransitionsAsync ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command for specified process activity (async version)

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForCommandTransitions() [1/3]

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForCommandTransitions ( Guid  processId,
List< TransitionClassifier classifiers,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for specified process activity

Parameters
processIdProcess id
classifiersFilter for transitions by transition classifier
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForCommandTransitions() [2/3]

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForCommandTransitions ( ProcessInstance  processInstance,
List< TransitionClassifier classifiers = null 
)

Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for executed activity (inside of a transitional process) or for current activity (when a process is idled). Using of this method is preferable for notification of users which can execute next commands.

Parameters
processInstanceProcess instance
classifiersFilter for transitions by transition classifier
Returns
List of user ids

◆ GetAllActorsForCommandTransitions() [3/3]

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForCommandTransitions ( TreeSearchFilter  filter,
List< TransitionClassifier classifiers = null 
)

Get the list of user ids which can execute any command bound whith a transitions selected by filter. This method is prefearable to use when you are using subprocesses

Parameters
filterSets the current process and the method of searching in the Process Instances tree
classifiersFilter for transitions by transition classifier
Returns
List of user ids

◆ GetAllActorsForCommandTransitionsAsync() [1/2]

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForCommandTransitionsAsync ( ProcessInstance  processInstance,
List< TransitionClassifier classifiers = null 
)

Get the list of user ids which can execute any command bound whith a transitions selected by filter (by transition classifier) for executed activity (inside of a transitional process) or for current activity (when a process is idled). Using of this method is preferable for notification of users which can execute next commands. (async version)

Parameters
processInstanceProcess instance
classifiersFilter for transitions by transition classifier
Returns
List of user ids

◆ GetAllActorsForCommandTransitionsAsync() [2/2]

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForCommandTransitionsAsync ( TreeSearchFilter  filter,
List< TransitionClassifier classifiers = null 
)

Get the list of user ids which can execute any command bound whith a transitions selected by filter. This method is prefearable to use when you are using subprocesses (async version)

Parameters
filterSets the current process and the method of searching in the Process Instances tree
classifiersFilter for transitions by transition classifier
Returns
List of user ids

◆ GetAllActorsForDirectAndUndefinedCommandTransitions()

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForDirectAndUndefinedCommandTransitions ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith direct or undefined transitions (by transition classifier) for specified process activity

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForDirectAndUndefinedCommandTransitionsAsync()

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForDirectAndUndefinedCommandTransitionsAsync ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith direct or undefined transitions (by transition classifier) for specified process activity (async version)

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForDirectCommandTransitions()

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForDirectCommandTransitions ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith direct transitions (by transition classifier) for specified process activity

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForDirectCommandTransitionsAsync()

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForDirectCommandTransitionsAsync ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith direct transitions (by transition classifier) for specified process activity (async version)

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForReverseCommandTransitions()

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForReverseCommandTransitions ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith reverse transitions (by transition classifier) for specified process activity

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAllActorsForReverseCommandTransitionsAsync()

async Task<IEnumerable<string> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAllActorsForReverseCommandTransitionsAsync ( Guid  processId,
bool  beginningWithRoot = false,
string  activityName = null 
)

Get the list of user ids which can execute any command bound whith reverse transitions (by transition classifier) for specified process activity (async version)

Parameters
processIdProcess id
beginningWithRootIf true the list of actors will be obtained from the root process, even if you passed Id of the subprocess
activityNameActivity name in which transitions are checked. Current activity if null.
Returns
List of user ids

◆ GetAvailableCommands() [1/2]

IEnumerable<WorkflowCommand> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommands ( Guid  processId,
string  identityId 
)

Return the list of commands which is availiable from current activity for specified user

Parameters
processIdProcess id
identityIdUser id for whom formed initial commands list
Returns
List of WorkflowCommand commands

◆ GetAvailableCommands() [2/2]

IEnumerable<WorkflowCommand> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommands ( Guid  processId,
IEnumerable< string >  identityIds,
string  commandNameFilter = null,
string  mainIdentityId = null 
)

Return the list of commands which is availiable from current activity for specified user

Parameters
processIdProcess id
identityIdsList of User ids for which formed initial commands list
commandNameFilterSelects only the specified command if not null
mainIdentityIdUser id for priority check of rules
Returns
List of WorkflowCommand commands

◆ GetAvailableCommandsAsync() [1/2]

async Task<IEnumerable<WorkflowCommand> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync ( Guid  processId,
string  identityId 
)

Return the list of commands which is availiable from current activity for specified user (async version)

Parameters
processIdProcess id
identityIdUser id for whom formed initial commands list
Returns
List of WorkflowCommand commands

◆ GetAvailableCommandsAsync() [2/2]

async Task<IEnumerable<WorkflowCommand> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync ( Guid  processId,
IEnumerable< string >  identityIds,
string  commandNameFilter = null,
string  mainIdentityId = null 
)

Return the list of commands which is availiable from current activity for specified user (async version)

Parameters
processIdProcess id
identityIdsList of User ids for which formed initial commands list
commandNameFilterSelects only the specified command if not null
mainIdentityIdUser id for priority check of rules
Returns
List of WorkflowCommand commands

◆ GetAvailableStateToSet() [1/4]

IEnumerable<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSet ( Guid  processId)

Get the list of all states which available for set of specified process localized in current culture

Parameters
processIdProcess id
Returns
List of WorkflowState objects

◆ GetAvailableStateToSet() [2/4]

IEnumerable<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSet ( Guid  processId,
CultureInfo  culture 
)

Get the list of all states which available for set of specified process localized in specified culture

Parameters
processIdProcess id
cultureCulture to localize state names
Returns
List of WorkflowState objects

◆ GetAvailableStateToSet() [3/4]

IEnumerable<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSet ( string  schemeCode,
IDictionary< string, object >  parameters = null 
)

Get the list of all states which available for set of specified scheme in current culture

Parameters
schemeCodeCode of the scheme
parametersThe parameters for creating scheme of process
Returns
List of WorkflowState objects

◆ GetAvailableStateToSet() [4/4]

IEnumerable<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSet ( string  schemeCode,
CultureInfo  culture,
IDictionary< string, object >  parameters = null 
)

Get the list of all states which available for set of specified scheme in specified culture

Parameters
schemeCodeCode of the scheme
cultureCulture to localize state names
parametersThe parameters for creating scheme of process
Returns
List of WorkflowState objects

◆ GetAvailableStateToSetAsync() [1/4]

async Task<IEnumerable<WorkflowState> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSetAsync ( Guid  processId)

Get the list of all states which available for set of specified process localized in current culture (async version)

Parameters
processIdProcess id
Returns
List of WorkflowState objects

◆ GetAvailableStateToSetAsync() [2/4]

async Task<IEnumerable<WorkflowState> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSetAsync ( Guid  processId,
CultureInfo  culture 
)

Get the list of all states which available for set of specified process localized in specified culture (async version)

Parameters
processIdProcess id
cultureCulture to localize state names
Returns
List of WorkflowState objects

◆ GetAvailableStateToSetAsync() [3/4]

async Task<IEnumerable<WorkflowState> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSetAsync ( string  schemeCode,
IDictionary< string, object >  parameters = null 
)

Get the list of all states which available for set of specified scheme in current culture (async version)

Parameters
schemeCodeCode of the scheme
parametersThe parameters for creating scheme of process
Returns
List of WorkflowState objects

◆ GetAvailableStateToSetAsync() [4/4]

async Task<IEnumerable<WorkflowState> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableStateToSetAsync ( string  schemeCode,
CultureInfo  culture,
IDictionary< string, object >  parameters = null 
)

Get the list of all states which available for set of specified scheme in specified culture (async version)

Parameters
schemeCodeCode of the scheme
cultureCulture to localize state names
parametersThe parameters for creating scheme of process
Returns
List of WorkflowState objects

◆ GetCurrentActivityName()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentActivityName ( Guid  processId)

Return the current activity name of specified process

Parameters
processIdProcess id
Returns
Current activity name

◆ GetCurrentActivityNameAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentActivityNameAsync ( Guid  processId)

Return the current activity name of specified process (async version)

Parameters
processIdProcess id
Returns
Current activity name

◆ GetCurrentState()

WorkflowState OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentState ( Guid  processId)

Return the current state of specified process

Parameters
processIdProcess id
Returns
WorkflowState object

◆ GetCurrentStateAsync()

async Task<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentStateAsync ( Guid  processId)

Return the current state of specified process (async version)

Parameters
processIdProcess id
Returns
WorkflowState object

◆ GetCurrentStateName()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentStateName ( Guid  processId)

Return the current state name of specified process

Parameters
processIdProcess id
Returns
Name of current state

◆ GetCurrentStateNameAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentStateNameAsync ( Guid  processId)

Return the current state name of specified process (async version)

Parameters
processIdProcess id
Returns
Name of current state

◆ GetInitialCommands() [1/2]

IEnumerable<WorkflowCommand> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialCommands ( string  schemeCode,
string  identityId 
)

Return the list of commands which is availiable from initial activity for specified user

Parameters
schemeCodeCode of the scheme
identityIdUser id for whom formed initial commands list
Returns
List of WorkflowCommand commands

◆ GetInitialCommands() [2/2]

IEnumerable<WorkflowCommand> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialCommands ( string  schemeCode,
IEnumerable< string >  identityIds,
IDictionary< string, object >  processParameters = null,
string  commandNameFilter = null 
)

Return the list of commands which is availiable from initial activity for specified users

Parameters
schemeCodeCode of the scheme
identityIdsList of User ids for which formed initial commands list
processParametersParameters for creating scheme of process
commandNameFilterSelects only the specified command if not null
Returns
List of WorkflowCommand commands

◆ GetInitialCommandsAsync() [1/2]

async Task<IEnumerable<WorkflowCommand> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialCommandsAsync ( string  schemeCode,
string  identityId 
)

Return the list of commands which is availiable from initial activity for specified user (async version)

Parameters
schemeCodeCode of the scheme
identityIdUser id for whom formed initial commands list
Returns
List of WorkflowCommand commands

◆ GetInitialCommandsAsync() [2/2]

async Task<IEnumerable<WorkflowCommand> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialCommandsAsync ( string  schemeCode,
IEnumerable< string >  identityIds,
IDictionary< string, object >  processParameters = null,
string  commandNameFilter = null 
)

Return the list of commands which is availiable from initial activity for specified users (async version)

Parameters
schemeCodeCode of the scheme
identityIdsList of User ids for which formed initial commands list
processParametersParameters for creating scheme of process
commandNameFilterSelects only the specified command if not null
Returns
List of WorkflowCommand commands

◆ GetInitialState()

WorkflowState OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialState ( string  schemeCode,
IDictionary< string, object >  processParameters = null 
)

Return the initial state for process scheme

Parameters
schemeCodeCode of the scheme
processParametersParameters for creating scheme of process
Returns
WorkflowState object

◆ GetInitialStateAsync()

async Task<WorkflowState> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetInitialStateAsync ( string  schemeCode,
IDictionary< string, object >  processParameters = null 
)

Return the initial state for process scheme (async version)

Parameters
schemeCodeCode of the scheme
processParametersParameters for creating scheme of process
Returns
WorkflowState object

◆ GetLocalizedCommandName()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedCommandName ( Guid  processId,
string  commandName 
)

Get localized command name for specified process in current culture

Parameters
processIdProcess id
commandNameCommand name to localize
Returns
Localized command name

◆ GetLocalizedCommandNameAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedCommandNameAsync ( Guid  processId,
string  commandName 
)

Get localized command name for specified process in current culture (async version)

Parameters
processIdProcess id
commandNameCommand name to localize
Returns
Localized command name

◆ GetLocalizedCommandNameBySchemeId()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedCommandNameBySchemeId ( Guid  schemeId,
string  commandName 
)

Get localized command name for specified scheme in current culture

Parameters
schemeIdId of the scheme
commandNameCommand name to localize
Returns
Localized command name

◆ GetLocalizedCommandNameBySchemeIdAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedCommandNameBySchemeIdAsync ( Guid  schemeId,
string  commandName 
)

Get localized command name for specified scheme in current culture (async version)

Parameters
schemeIdId of the scheme
commandNameCommand name to localize
Returns
Localized command name

◆ GetLocalizedStateName()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateName ( Guid  processId,
string  stateName 
)

Get localized state name for specified process in current culture

Parameters
processIdProcess id
stateNameState name to localize
Returns
Localized state name

◆ GetLocalizedStateNameAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateNameAsync ( Guid  processId,
string  stateName 
)

Get localized state name for specified process in current culture (async version)

Parameters
processIdProcess id
stateNameState name to localize
Returns
Localized state name

◆ GetLocalizedStateNameBySchemeCode()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateNameBySchemeCode ( string  schemeCode,
string  stateName,
IDictionary< string, object >  parameters = null 
)

Get localized state name for specified scheme in current culture

Parameters
schemeCodeCode of the scheme
stateNameState name to localize
parametersThe parameters for creating scheme of process
Returns
Localized state name

◆ GetLocalizedStateNameBySchemeCodeAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateNameBySchemeCodeAsync ( string  schemeCode,
string  stateName,
IDictionary< string, object >  parameters = null 
)

Get localized state name for specified scheme in current culture (async version)

Parameters
schemeCodeCode of the scheme
stateNameState name to localize
parametersThe parameters for creating
Returns
Localized state name

◆ GetLocalizedStateNameBySchemeId()

string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateNameBySchemeId ( Guid  schemeId,
string  stateName 
)

Get localized state name for specified scheme in current culture

Parameters
schemeIdId of the scheme
stateNameState name to localize
Returns
Localized state name

◆ GetLocalizedStateNameBySchemeIdAsync()

async Task<string> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetLocalizedStateNameBySchemeIdAsync ( Guid  schemeId,
string  stateName 
)

Get localized state name for specified scheme in current culture (async version)

Parameters
schemeIdId of the scheme
stateNameState name to localize
Returns
Localized state name

◆ GetProcessHistory()

List<ProcessHistoryItem> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessHistory ( Guid  processId)

Returns the history of process

Parameters
processIdId of the process
Returns

◆ GetProcessHistoryAsync()

async Task<List<ProcessHistoryItem> > OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessHistoryAsync ( Guid  processId)

Returns the history of process (async version)

Parameters
processIdId of the process
Returns

◆ GetProcessInstanceAndFillProcessParameters()

ProcessInstance OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstanceAndFillProcessParameters ( Guid  processId)

Get process instance with all parameters for specified process id

Parameters
processIdProcess id
Returns
ProcessInstance object

◆ GetProcessInstanceAndFillProcessParametersAsync()

async Task<ProcessInstance> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstanceAndFillProcessParametersAsync ( Guid  processId)

Get process instance with all parameters for specified process id (async version)

Parameters
processIdProcess id
Returns
ProcessInstance object

◆ GetProcessInstancesTree() [1/2]

ProcessInstancesTree OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstancesTree ( Guid  rootProcessId)

Returns process instance tree (root process and subprocesses)

Parameters
rootProcessIdRoot process id
Returns
ProcessInstancesTree object

◆ GetProcessInstancesTree() [2/2]

ProcessInstancesTree OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstancesTree ( ProcessInstance  processInstance)

Returns process instance tree (root process and subprocesses)

Parameters
processInstanceProcessInstance for which tree is builds
Returns
ProcessInstancesTree object

◆ GetProcessScheme()

ProcessDefinition OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessScheme ( Guid  processId)

Get procees definition (parsed scheme) for specified process

Parameters
processIdProcess id
Returns
ProcessDefinition object

◆ GetProcessSchemeAsync()

async Task<ProcessDefinition> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessSchemeAsync ( Guid  processId)

Get procees definition (parsed scheme) for specified process (async version)

Parameters
processIdProcess id
Returns
ProcessDefinition object

◆ GetProcessStatus()

ProcessStatus OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessStatus ( Guid  processId)

Get status of specified process

Parameters
processIdProcess id
Returns
ProcessStatus object

◆ GetProcessStatusAsync()

async Task<ProcessStatus> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessStatusAsync ( Guid  processId)

Get status of specified process (async version)

Parameters
processIdProcess id
Returns
ProcessStatus object

◆ IsProcessExists()

bool OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.IsProcessExists ( Guid  processId)

Check existence of the specified process

Parameters
processIdProcess id
Returns
True if process with specified identifier is exists

◆ IsProcessExistsAsync()

async Task<bool> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.IsProcessExistsAsync ( Guid  processId)

Check existence of the specified process

Parameters
processIdProcess id
Returns
True if process with specified identifier is exists

◆ PreExecute()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecute ( Guid  processId,
string  fromActivityName,
bool  ignoreCurrentStateCheck = false 
)

Pre-execution from specified activity of the process

Parameters
processIdProcess id
fromActivityNameActivity name which begins pre-execution
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution

◆ PreExecuteAsync()

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteAsync ( Guid  processId,
string  fromActivityName,
bool  ignoreCurrentStateCheck = false,
CancellationToken  token = default(CancellationToken) 
)

Pre-execution from specified activity of the process (async version)

Parameters
processIdProcess id
fromActivityNameActivity name which begins pre-execution
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution
tokenCancellation token

◆ PreExecuteFromCurrentActivity()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromCurrentActivity ( Guid  processId,
bool  ignoreCurrentStateCheck = false 
)

Pre-execution from current activity of the process

Parameters
processIdThe process id
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution

◆ PreExecuteFromCurrentActivityAsync()

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromCurrentActivityAsync ( Guid  processId,
bool  ignoreCurrentStateCheck = false,
CancellationToken  token = default(CancellationToken) 
)

Pre-execution from current activity of the process (async version)

Parameters
processIdProcess id
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution
tokenCancellation token

◆ PreExecuteFromInitialActivity()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromInitialActivity ( Guid  processId,
bool  ignoreCurrentStateCheck = false 
)

Pre-execution from initial activity of the process

Parameters
processIdThe process id
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution

◆ PreExecuteFromInitialActivityAsync()

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromInitialActivityAsync ( Guid  processId,
bool  ignoreCurrentStateCheck = false,
CancellationToken  token = default (CancellationToken) 
)

Pre-execution from initial activity of the process (async version)

Parameters
processIdProcess id
ignoreCurrentStateCheckIf false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution
tokenCancellation token

◆ RegisterLicense()

static void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.RegisterLicense ( string  licenseText)
static

Register the license to remove license restrictions

Parameters
licenseTextLicense text

◆ ResetTimerValue() [1/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ResetTimerValue ( Guid  processId,
string  timerName 
)

Resets value of named timer. Use this method outside of your process.

Parameters
processIdProcess id
timerNameTimer name in Scheme

◆ ResetTimerValue() [2/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ResetTimerValue ( ProcessInstance  processInstance,
string  timerName 
)

Resets value of named timer. Use this method inside of your process (in actions).

Parameters
processInstanceProcess instance
timerNameTimer name in Scheme

◆ ResetTimerValueAsync()

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ResetTimerValueAsync ( Guid  processId,
string  timerName 
)

Resets value of named timer (async version)

Parameters
processIdProcess id
timerNameTimer name in Scheme

◆ SetActivityWithExecution()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetActivityWithExecution ( string  identityId,
string  impersonatedIdentityId,
IDictionary< string, object >  parameters,
ActivityDefinition  activityToSet,
ProcessInstance  processInstance,
bool  doNotSetRunningStatus = false 
)

Set specified activity as current and executing the implementation of the activity

Parameters
identityIdThe user id which set the activity
impersonatedIdentityIdThe user id for whom sets the activity (impersonation)
parametersDictionary of ProcessInstance parameters which transferred to executed actions
activityToSetActivity to set
processInstanceProcess instance for set activity as current
doNotSetRunningStatusThe status of the process - ProcessStatus.Running will not be set if true

◆ SetActivityWithExecutionAsync()

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetActivityWithExecutionAsync ( string  identityId,
string  impersonatedIdentityId,
IDictionary< string, object >  parameters,
ActivityDefinition  activityToSet,
ProcessInstance  processInstance,
bool  doNotSetRunningStatus = false,
CancellationToken  token = default(CancellationToken) 
)

Set specified activity as current and executing the implementation of the activity (Async version)

Parameters
identityIdThe user id which set the activity
impersonatedIdentityIdThe user id for whom sets the activity (impersonation)
parametersDictionary of ProcessInstance parameters which transferred to executed actions
activityToSetActivity to set
processInstanceProcess instance for set activity as current
doNotSetRunningStatusThe status of the process - ProcessStatus.Running will not be set if true
tokenCancellation token

◆ SetActivityWithoutExecution()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetActivityWithoutExecution ( ActivityDefinition  activityToSet,
ProcessInstance  processInstance,
bool  doNotSetRunningStatus = false 
)

Set specified activity as current without execution of the implementation of the activity

Parameters
activityToSetActivity to set
processInstanceProcess instance for set activity as current
doNotSetRunningStatusThe status of the process - ProcessStatus.Running will not be set if true

◆ SetActivityWithoutExecutionAsync()

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetActivityWithoutExecutionAsync ( ActivityDefinition  activityToSet,
ProcessInstance  processInstance,
bool  doNotSetRunningStatus = false 
)

Set specified activity as current without execution of the implementation of the activity (Async version)

Parameters
activityToSetActivity to set
processInstanceProcess instance for set activity as current
doNotSetRunningStatusThe status of the process - ProcessStatus.Running will not be set if true

◆ SetSchemeIsObsolete() [1/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetSchemeIsObsolete ( string  schemeCode,
Dictionary< string, object >  parameters 
)

Set flag IsObsolete for all schemas of process with specific code and parameters

Parameters
schemeCodeCode of the scheme
parametersThe parameters for creating scheme of process

◆ SetSchemeIsObsolete() [2/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetSchemeIsObsolete ( string  schemeCode)

Set flag IsObsolete for all schemas of process with specific code

Parameters
schemeCodeCode of the scheme

◆ SetSchemeIsObsoleteAsync() [1/2]

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetSchemeIsObsoleteAsync ( string  schemeCode,
Dictionary< string, object >  parameters 
)

Set flag IsObsolete for all schemas of process with specific code and parameters (async version)

Parameters
schemeCodeCode of the scheme
parametersThe parameters for creating scheme of process

◆ SetSchemeIsObsoleteAsync() [2/2]

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetSchemeIsObsoleteAsync ( string  schemeCode)

Set flag IsObsolete for all schemas of process with specific code (async version)

Parameters
schemeCodeCode of the scheme

◆ SetState()

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetState ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
string  stateName,
IDictionary< string, object >  parameters = null,
bool  preventExecution = false 
)

Set specified state for specified process

Parameters
processIdProcess id
identityIdThe user id which set the state
impersonatedIdentityIdThe user id for whom sets the state (impersonation)
stateNameState name to set
parametersDictionary of ProcessInstance parameters which transferred to executed actions
preventExecutionActions due to transition process do not executed if true

◆ SetStateAsync()

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetStateAsync ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
string  stateName,
IDictionary< string, object >  parameters = null,
bool  preventExecution = false 
)

Set specified state for specified process (async version)

Parameters
processIdProcess id
identityIdThe user id which set the state
impersonatedIdentityIdThe user id for whom sets the state (impersonation)
stateNameState name to set
parametersDictionary of ProcessInstance parameters which transferred to executed actions
preventExecutionActions due to transition process do not executed if true

◆ SetTimerValue() [1/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetTimerValue ( Guid  processId,
string  timerName,
DateTime  newValue 
)

Sets new value of named timer. Use this method outside of your process.

Parameters
processIdProcess id
timerNameTimer name in Scheme
newValueNew value of the timer

◆ SetTimerValue() [2/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetTimerValue ( ProcessInstance  processInstance,
string  timerName,
DateTime  newValue 
)

Sets new value of named timer. Use this method inside of your process (in actions).

Parameters
processInstanceProcess instance
timerNameTimer name in Scheme
newValueNew value of the timer

◆ SetTimerValueAsync()

Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetTimerValueAsync ( Guid  processId,
string  timerName,
DateTime  newValue 
)

Sets new value of named timer (async version)

Parameters
processIdProcess id
timerNameTimer name in Scheme
newValueNew value of the timer

◆ UpdateSchemeIfObsolete() [1/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsolete ( Guid  processId,
bool  ignoreAutoSchemeUpdate = false 
)

Updating scheme of specific process

Parameters
processIdProcess id
ignoreAutoSchemeUpdateIf true the attribute of Activity - IsAutoScheme update will be ignored.

◆ UpdateSchemeIfObsolete() [2/2]

void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsolete ( Guid  processId,
IDictionary< string, object >  parameters,
bool  ignoreAutoSchemeUpdate = false 
)

Updating scheme of specific process

Parameters
processIdThe process id
parametersParameters for creating scheme of process
ignoreAutoSchemeUpdateIf true the attribute of Activity - IsAutoScheme update will be ignored.

◆ UpdateSchemeIfObsoleteAsync() [1/2]

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsoleteAsync ( Guid  processId)

Updating scheme of specific process

Parameters
processIdProcess id

◆ UpdateSchemeIfObsoleteAsync() [2/2]

async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsoleteAsync ( Guid  processId,
IDictionary< string, object >  parameters 
)

Updating scheme of specific process (async version)

Parameters
processIdProcess id
parametersParameters for creating scheme of process

Property Documentation

◆ ActionProvider

IWorkflowActionProvider OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ActionProvider
getset

Instance of the Action provider IWorkflowActionProvider

◆ BeforeActivityExecution

EventHandler<BeforeActivityExecutionEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.BeforeActivityExecution
addremove

Raises before execution of choosen activity

◆ Builder

IWorkflowBuilder OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.Builder
getset

Instance of the Workflow builder IWorkflowBuilder

◆ CodeActionsCompillationEnable

bool OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CodeActionsCompillationEnable
staticgetset

Default value is true. Enable compillation for Code Actions CodeActionDefinition

◆ DesignerAutocompleteProvider

IDesignerAutocompleteProvider OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.DesignerAutocompleteProvider
getset

Instance of the autocomplete provider (only for the Designer) IDesignerAutocompleteProvider

◆ GlobalActionsInvoker

CodeActionsInvoker OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GlobalActionsInvoker
get

Invoker which calls the global Code Actions

◆ Id

Guid OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.Id
get

Runtime identifier

◆ IsAutoUpdateSchemeBeforeGetAvailableCommands

bool OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.IsAutoUpdateSchemeBeforeGetAvailableCommands
getset

Allow automatic schema of a process update before getting the commands list if its allowed in current activity

◆ IsCold

bool OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.IsCold
get

Runtime in cold start state if true

◆ NeedTimerValue

EventHandler<NeedTimerValueEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.NeedTimerValue
addremove

Raises when the timer value must be obtained

◆ PersistenceProvider

IPersistenceProvider OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PersistenceProvider
getset

Instance of the Persistence provider IPersistenceProvider

◆ RuleProvider

IWorkflowRuleProvider OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.RuleProvider
getset

Instance of the Workflow rule provider IWorkflowRuleProvider

◆ RuntimeDateTimeNow

DateTime OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.RuntimeDateTimeNow
get

Get date and time which used by runtime

◆ SchemeParsingCulture

CultureInfo OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SchemeParsingCulture
getset

Culture for parsing some text parameters from scheme. Default is InvariantCulture

◆ TimerManager

ITimerManager OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.TimerManager
getset

Instance of the Timer manager ITimerManager

◆ UseUtcDateTimeAsRuntimeTime

bool OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UseUtcDateTimeAsRuntimeTime
getset

Runtime use Utc date and time if true and Local date and time if false

Event Documentation

◆ OnNeedDeterminingParameters

EventHandler<NeedDeterminingParametersEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.OnNeedDeterminingParameters

Raises when runtime need to obtain parameters for creating the scheme of the process

◆ OnSchemaWasChanged

EventHandler<SchemaWasChangedEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.OnSchemaWasChanged

Raises when the scheme of the process was changed

◆ OnStartingTransitionNotFound

EventHandler<StartingTransitionNotFoundEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.OnStartingTransitionNotFound

Raises when runtime can not find starting transition of a subprocess in a new root schem

◆ OnWorkflowError

EventHandler<WorkflowErrorEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.OnWorkflowError

Raises when workflow error occurred

◆ ProcessActivityChanged

EventHandler<ProcessActivityChangedEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ProcessActivityChanged

Raises when current activity of a process was changed

◆ ProcessStatusChanged

EventHandler<ProcessStatusChangedEventArgs> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ProcessStatusChanged

Raises when the status of the procees ProcessStatus was changed