Workflow Engine .NET  1.5
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | 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)
 
object DeserializeParameter (string serializedValue, Type parameterType)
 Provides access to Workflow Engine .NET Persistence Process Parameters serialization mechanism More...
 
string SerializeParameter (object value, Type parameterType)
 Provides access to Workflow Engine .NET Persistence Process Parameters deserialization mechanism 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 rootId)
 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 UpdateSchemeIfObsolete (Guid processId)
 Updating scheme of specific process More...
 
void UpdateSchemeIfObsolete (Guid processId, IDictionary< string, object > parameters)
 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...
 
void ExecuteCommand (WorkflowCommand command, string identityId, string impersonatedIdentityId)
 Execute specified command for specified users More...
 
void 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, 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...
 
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...
 
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...
 
async Task< bool > IsProcessExistsAsync (Guid processId)
 Check existence of the specified process More...
 
async Task CreateInstanceAsync (string schemeCode, Guid processId)
 Create instance of process (async version) More...
 
async Task CreateInstanceAsync (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId)
 Create instance of process (async version) More...
 
async Task CreateInstanceAsync (string schemeCode, Guid processId, IDictionary< string, object > parameters)
 Create instance of process (async version) More...
 
async Task CreateInstanceAsync (string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, IDictionary< string, object > parameters)
 Create instance of process (async version) More...
 
async Task CreateInstanceAsync (CreateInstanceParams createInstanceParams)
 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...
 
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...
 
async Task PreExecuteFromInitialActivityAsync (Guid processId, bool ignoreCurrentStateCheck=false)
 Pre-execution from initial activity of the process (async version) More...
 
async Task PreExecuteFromCurrentActivityAsync (Guid processId, bool ignoreCurrentStateCheck=false)
 Pre-execution from current activity of the process (async version) More...
 
async Task PreExecuteAsync (Guid processId, string fromActivityName, bool ignoreCurrentStateCheck=false)
 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 ExecuteCommandAsync (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, 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...
 

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...
 

Public Attributes

JsonSerializerSettings ParameterSerializerSettings
 Serializer setting for JSON serializer 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...
 
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]
 

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

Member Function Documentation

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

Register assembly in CodeActionsCompiller as referenced assembly

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

Create instance of process.

Parameters
schemeCodeCode of the scheme
processIdProcess id
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
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)
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)
void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstance ( CreateInstanceParams  createInstanceParams)

Create instance of the process.

Parameters
createInstanceParamsParameters for creaition of an instance of a process
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId 
)

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
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
IDictionary< string, object >  parameters 
)

Create instance of process (async version)

Parameters
schemeCodeCode of the scheme
processIdProcess id
parametersThe parameters for creating scheme of process
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( string  schemeCode,
Guid  processId,
string  identityId,
string  impersonatedIdentityId,
IDictionary< string, object >  parameters 
)

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
parametersThe parameters for creating scheme of process
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync ( CreateInstanceParams  createInstanceParams)

Create instance of the process (async version)

Parameters
createInstanceParamsParameters for creaition of an instance of a process
void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.DeleteInstance ( Guid  processId)

Delete instance of the process and all child subprocesses.

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

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

Parameters
processIdProcess id
object OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.DeserializeParameter ( string  serializedValue,
Type  parameterType 
)

Provides access to Workflow Engine .NET Persistence Process Parameters serialization mechanism

Parameters
serializedValueSerialized value
parameterTypeParameter type
Returns
Deserialized object
void 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)
void 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
async Task 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentActivityName ( Guid  processId)

Return the current activity name of specified process

Parameters
processIdProcess id
Returns
Current activity name
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
WorkflowState OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetCurrentState ( Guid  processId)

Return the current state of specified process

Parameters
processIdProcess id
Returns
WorkflowState object
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ProcessInstancesTree OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstancesTree ( Guid  rootId)

Returns process instance tree (root process and subprocesses)

Parameters
rootIdRoot process id
Returns
ProcessInstancesTree object
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
ProcessDefinition OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessScheme ( Guid  processId)

Get procees definition (parsed scheme) for specified process

Parameters
processIdProcess id
Returns
ProcessDefinition object
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
ProcessStatus OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessStatus ( Guid  processId)

Get status of specified process

Parameters
processIdProcess id
Returns
ProcessStatus object
async Task<ProcessStatus> OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessStatusAsync ( Guid  processId)

Get status of specified process (async version)

Parameters
processIdProcess id
Returns
ProcessStatus object
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
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
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
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteAsync ( Guid  processId,
string  fromActivityName,
bool  ignoreCurrentStateCheck = false 
)

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
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
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromCurrentActivityAsync ( Guid  processId,
bool  ignoreCurrentStateCheck = false 
)

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
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
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.PreExecuteFromInitialActivityAsync ( Guid  processId,
bool  ignoreCurrentStateCheck = false 
)

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
static void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.RegisterLicense ( string  licenseText)
static

Register the license to remove license restrictions

Parameters
licenseTextLicense text
string OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SerializeParameter ( object  value,
Type  parameterType 
)

Provides access to Workflow Engine .NET Persistence Process Parameters deserialization mechanism

Parameters
valueParameter value
parameterTypeParameter type
Returns
Serialized string
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
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
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
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
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
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
void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetState ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
string  stateName,
IDictionary< string, object >  parameters,
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
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.SetStateAsync ( Guid  processId,
string  identityId,
string  impersonatedIdentityId,
string  stateName,
IDictionary< string, object >  parameters,
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
void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsolete ( Guid  processId)

Updating scheme of specific process

Parameters
processIdProcess id
void OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsolete ( Guid  processId,
IDictionary< string, object >  parameters 
)

Updating scheme of specific process

Parameters
processIdThe process id
parametersParameters for creating scheme of process
async Task OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsoleteAsync ( Guid  processId)

Updating scheme of specific process

Parameters
processIdProcess id
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

Member Data Documentation

JsonSerializerSettings OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ParameterSerializerSettings
Initial value:
= new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
}

Serializer setting for JSON serializer

Property Documentation

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

Instance of the Action provider IWorkflowActionProvider

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

Raises before execution of choosen activity

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

Instance of the Workflow builder IWorkflowBuilder

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

Default value is true. Enable compillation for Code Actions CodeActionDefinition

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

Runtime identifier

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

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

Runtime in cold start state if true

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

Instance of the Persistence provider IPersistenceProvider

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

Instance of the Workflow rule provider IWorkflowRuleProvider

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

Get date and time which used by runtime

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

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

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

Instance of the Timer manager ITimerManager

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

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

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

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

Raises when the scheme of the process was changed

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

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

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

Raises when workflow error occurred

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

Raises when current activity of a process was changed

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

Raises when the status of the procees ProcessStatus was changed