Class WorkflowRuntime
Provides main API to operations with workflow processes
Inheritance
↳ object
↳ WorkflowRuntime
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Runtime
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic sealed class WorkflowRuntime
Constructors
WorkflowRuntime(Guid)
Creates the WFE runtime object
Declarationpublic WorkflowRuntime(Guid runtimeId)
ParametersType | Name | Description |
---|
Guid | runtimeId | Id of the runtime (reserved for further extension) |
WorkflowRuntime(string)
Creates the WFE runtime object
Declarationpublic WorkflowRuntime(string runtimeId)
ParametersType | Name | Description |
---|
string | runtimeId | Id of the runtime (reserved for further extension) |
WorkflowRuntime(IRuntimeIdProvider)
Declarationpublic WorkflowRuntime(IRuntimeIdProvider runtimeIdProvider)
ParametersType | Name | Description |
---|
IRuntimeIdProvider | runtimeIdProvider | |
WorkflowRuntime()
Creates the WFE runtime object
DeclarationProperties
OfflineApi
Declarationpublic OfflineApi OfflineApi { get; }
Property valueType | Description |
---|
OfflineApi | |
AssignmentApi
Declarationpublic AssignmentApi AssignmentApi { get; }
Property valueType | Description |
---|
AssignmentApi | |
ActorsApi
Declarationpublic ActorsApi ActorsApi { get; }
Property valueBPMNApi
Declarationpublic BPMNApi BPMNApi { get; }
Property valueGetUsersWithIdentitiesAsync
Declarationpublic GetUsersWithIdentitiesAsyncDelegate GetUsersWithIdentitiesAsync { get; set; }
Property valueType | Description |
---|
GetUsersWithIdentitiesAsyncDelegate | |
GetUserByIdentityAsync
Declarationpublic GetUserByIdentityAsyncDelegate GetUserByIdentityAsync { get; set; }
Property valueType | Description |
---|
GetUserByIdentityAsyncDelegate | |
GetCustomTimerValueAsync
Declarationpublic GetCustomTimerValueAsyncDelegate GetCustomTimerValueAsync { get; set; }
Property valueType | Description |
---|
GetCustomTimerValueAsyncDelegate | |
Runtime identifier
Declarationpublic string Id { get; }
Property valueSettings
Declarationpublic WorkflowRuntimeSettings Settings { get; }
Property valueType | Description |
---|
WorkflowRuntimeSettings | |
DesignerAutocompleteProvider
Instance of the autocomplete provider (only for the Designer) IDesignerAutocompleteProvider
Declarationpublic IDesignerAutocompleteProvider DesignerAutocompleteProvider { get; set; }
Property valueType | Description |
---|
IDesignerAutocompleteProvider | |
CodeAutocompleteProvider
Auto initialize by WorkflowRuntime.CodeAutocompleteProvider. Use setter to use custom implementation
Declarationpublic ICodeAutocompleteProvider CodeAutocompleteProvider { get; set; }
Property valueType | Description |
---|
ICodeAutocompleteProvider | |
Instance of the parameter format provider (only for the Designer) IDesignerParameterFormatProvider
Declarationpublic IDesignerParameterFormatProvider DesignerParameterFormatProvider { get; set; }
Property valueType | Description |
---|
IDesignerParameterFormatProvider | |
RuleProvider
Instance of the Workflow rule provider IWorkflowRuleProvider
Declarationpublic IWorkflowRuleProvider RuleProvider { get; }
Property valueType | Description |
---|
IWorkflowRuleProvider | |
Builder
Instance of the Workflow builder IWorkflowBuilder
Declarationpublic IWorkflowBuilder Builder { get; }
Property valueType | Description |
---|
IWorkflowBuilder | |
TimerManager
Instance of the Timer manager ITimerManager
Declarationpublic ITimerManager TimerManager { get; }
Property valueType | Description |
---|
ITimerManager | |
PersistenceProvider
Instance of the Persistence provider IPersistenceProvider
Declarationpublic IPersistenceProvider PersistenceProvider { get; }
Property valueType | Description |
---|
IPersistenceProvider | |
ActionProvider
Instance of the Action provider IWorkflowActionProvider
Declarationpublic IWorkflowActionProvider ActionProvider { get; }
Property valueType | Description |
---|
IWorkflowActionProvider | |
ExternalParametersProvider
Instance of the External parameters provider IWorkflowExternalParametersProvider
Declarationpublic IWorkflowExternalParametersProvider ExternalParametersProvider { get; }
Property valueType | Description |
---|
IWorkflowExternalParametersProvider | |
LocalizationProvider
Declarationpublic ILocalizationProvider? LocalizationProvider { get; }
Property valueType | Description |
---|
ILocalizationProvider | |
RuntimeDateTimeNow
Get date and time which used by runtime
Declarationpublic DateTime RuntimeDateTimeNow { get; }
Property valueIsCold
Runtime in cold start state if true
Declarationpublic bool IsCold { get; }
Property valueCancellationTokenHandling
The way of handling System.Threading.CancellationToken after activity execution
Declarationpublic CancellationTokenHandling CancellationTokenHandling { get; set; }
Property valueType | Description |
---|
CancellationTokenHandling | |
WorkflowServiceRunner
Declarationpublic IWorkflowServiceRunner WorkflowServiceRunner { get; }
Property valueType | Description |
---|
IWorkflowServiceRunner | |
IsRunning
Declarationpublic bool IsRunning { get; }
Property valueCodeActionsCompillationEnable
Default value is true. Enable compillation for Code Actions CodeActionDefinition
Declarationpublic static bool CodeActionsCompillationEnable { get; set; }
Property valueExpressionsCompilationEnable
Declarationpublic static bool ExpressionsCompilationEnable { get; set; }
Property valueExpressionsCompilerOptions
Expressions Compiler Options
Declarationpublic static ExpressionsCompilerOptions ExpressionsCompilerOptions { get; set; }
Property valueType | Description |
---|
ExpressionsCompilerOptions | |
CodeActionsDebugMode
Default value is false. Enable debug in code action. You can put a breakpoint by or /break/ in a code action's code
Declarationpublic static bool CodeActionsDebugMode { get; set; }
Property valueGlobalActionsInvoker
Invoker which calls the global Code Actions
Declarationpublic CodeActionsInvoker GlobalActionsInvoker { get; }
Property valueType | Description |
---|
CodeActionsInvoker | |
LastGlobalActionsCompilationTime
Time of the last global Code Actions compilation
Declarationpublic DateTime LastGlobalActionsCompilationTime { get; }
Property valueLocalizer
Provides localized strings. For search used property by default.
Declarationpublic Localizer Localizer { get; }
Property valueLogger
Instance of the logger ILogger
Declarationpublic ILogger Logger { get; set; }
Property valueProcessLogger
Declarationpublic IProcessLogProvider ProcessLogger { get; set; }
Property valueType | Description |
---|
IProcessLogProvider | |
Methods
CodeActionsRegisterAssembly(Assembly)
Register assembly in CodeActionsCompiller as referenced assembly
Declarationpublic static void CodeActionsRegisterAssembly(Assembly assembly)
ParametersType | Name | Description |
---|
Assembly | assembly | |
CompileGlobalCodeActionsAsync(bool)
Compiles global Code Actions
Declarationpublic Task<(bool success, Dictionary<string, string> compilerErrors)> CompileGlobalCodeActionsAsync(bool ignoreNotCompiled)
ParametersType | Name | Description |
---|
bool | ignoreNotCompiled | if true all compillation errors in the global codeactions will be ignored |
ReturnsType | Description |
---|
Task<(bool success, Dictionary<string, string> compilerErrors)> | |
RegisterLicense(string)
Register the license to remove license restrictions
Declarationpublic static void RegisterLicense(string licenseText)
ParametersType | Name | Description |
---|
string | licenseText | License text |
CheckAllSubprocessesCompletedAsync(ProcessInstance)
Checks that all subprocesses was completed
Declarationpublic Task<bool> CheckAllSubprocessesCompletedAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | ProcessInstance for check |
ReturnsType | Description |
---|
Task<bool> | true - if there are no active suprocesses |
CheckAllSubprocessesAndParentProcessCompletedAsync(ProcessInstance)
Check that all subprocesses and the parent process reach the same point (completed)
Declarationpublic Task<bool> CheckAllSubprocessesAndParentProcessCompletedAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ReturnsType | Description |
---|
Task<bool> | |
DeleteAllSubprocessesAsync(ProcessInstance)
Delete all subprocesses for process
Declarationpublic Task<int> DeleteAllSubprocessesAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ReturnsType | Description |
---|
Task<int> | Count of deleted subprocesses |
SetPersistentProcessParameterAsync(Guid, string, object)
Set single persistent parameter in the process(async)
Declarationpublic Task SetPersistentProcessParameterAsync(Guid processId, string parameterName, object parameterValue)
ParametersType | Name | Description |
---|
Guid | processId | >Process id |
string | parameterName | Parameter name |
object | parameterValue | Parameter value |
ReturnsGetProcessTimersAsync(Guid)
Returns list of timers for a process
Declarationpublic Task<IEnumerable<ProcessTimer>> GetProcessTimersAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsType | Description |
---|
Task<IEnumerable<ProcessTimer>> | |
SetTimerValueAsync(Guid, string, DateTime)
Sets new value of named timer (async version). Use this method outside of your process.
Declarationpublic Task SetTimerValueAsync(Guid processId, string timerName, DateTime newValue)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
DateTime | newValue | New value of the timer |
ReturnsResetTimerValueAsync(Guid, string)
Resets value of named timer (async version)
Declarationpublic Task ResetTimerValueAsync(Guid processId, string timerName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
ReturnsGetProcessStatusAsync(Guid)
Get status of specified process (async version)
Declarationpublic Task<ProcessStatus> GetProcessStatusAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<ProcessStatus> | <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus" data-throw-if-not-resolved="false"></xref> object |
ShutdownAsync(int)
Switches off the runtime. Switches off API, waits for API calls to be completed. Switches off all timers.
IMPORTANT! Call this method from the ASYNCHRONOUS method only.
Declarationpublic Task ShutdownAsync(int timeout = -1)
ParametersType | Name | Description |
---|
int | timeout | Shutdown timeout |
ReturnsExecuteTimerAsync(Guid, string)
Declarationpublic Task ExecuteTimerAsync(Guid processId, string timerName)
ParametersType | Name | Description |
---|
Guid | processId | |
string | timerName | |
ReturnsSetProcessNewStatusAsync(ProcessInstance, ProcessStatus, bool)
Declarationpublic Task SetProcessNewStatusAsync(ProcessInstance processInstance, ProcessStatus newStatus, bool suppressEvent = false)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ProcessStatus | newStatus | |
bool | suppressEvent | |
ReturnsSetIdledOrFinalizedStatusAsync(ProcessInstance, ActivityDefinition)
Declarationpublic Task SetIdledOrFinalizedStatusAsync(ProcessInstance processInstance, ActivityDefinition newCurrentActivity)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ActivityDefinition | newCurrentActivity | |
ReturnsCheckIdentityAsync(ProcessInstance, string, string, string, CancellationToken)
Declarationpublic Task<bool> CheckIdentityAsync(ProcessInstance processInstance, string identityId, string ruleName, string parameter, CancellationToken token)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
string | identityId | |
string | ruleName | |
string | parameter | |
CancellationToken | token | |
ReturnsType | Description |
---|
Task<bool> | |
CheckIdentityByActorAsync(ProcessInstance, string, string, CancellationToken)
Declarationpublic Task<bool> CheckIdentityByActorAsync(ProcessInstance processInstance, string identityId, string actorName, CancellationToken token)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
string | identityId | |
string | actorName | |
CancellationToken | token | |
ReturnsType | Description |
---|
Task<bool> | |
GetAvailableCommandsAsync(ProcessInstance, IEnumerable<string>, string, string, CultureInfo, bool, CancellationToken)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetAvailableCommandsAsync(ProcessInstance processInstance, IEnumerable<string> identityIds, string commandNameFilter = null, string mainIdentityId = null, CultureInfo culture = null, bool conditionCheck = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
string | commandNameFilter | Selects only the specified command if not null |
string | mainIdentityId | User id for priority check of rules |
CultureInfo | culture | Culture to localize command and command parameter names |
bool | conditionCheck | If true then commands with failed condition checkes will be excluded |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsAsync(ProcessInstance, string)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetAvailableCommandsAsync(ProcessInstance processInstance, string identityId)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsAsync(Guid, IEnumerable<string>, string, string, CultureInfo, bool, CancellationToken)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetAvailableCommandsAsync(Guid processId, IEnumerable<string> identityIds, string commandNameFilter = null, string mainIdentityId = null, CultureInfo culture = null, bool conditionCheck = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
string | commandNameFilter | Selects only the specified command if not null |
string | mainIdentityId | User id for priority check of rules |
CultureInfo | culture | Culture to localize command and command parameter names |
bool | conditionCheck | If true then commands with failed condition checkes will be excluded |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsAsync(Guid, string)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetAvailableCommandsAsync(Guid processId, string identityId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsAsync(Guid, string, CultureInfo)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetAvailableCommandsAsync(Guid processId, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
ExecuteCommandAsync(WorkflowCommand, string, string, CancellationToken, bool)
Execute specified command for specified users (async version)
Declarationpublic Task<CommandExecutionResult> ExecuteCommandAsync(WorkflowCommand command, string identityId, string impersonatedIdentityId, CancellationToken token = default, bool checkRestrictions = false)
ParametersType | Name | Description |
---|
WorkflowCommand | command | Command to execute |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
CancellationToken | token | Cancellation token |
bool | checkRestrictions | If true then actor restriction check will be performed for every transition |
ReturnsType | Description |
---|
Task<CommandExecutionResult> | Result of the execution |
ExecuteCommandWithRestrictionCheckAsync(WorkflowCommand, string, string, CancellationToken)
Execute specified command for specified users (async version) with actor restrictions check
Declarationpublic Task<CommandExecutionResult> ExecuteCommandWithRestrictionCheckAsync(WorkflowCommand command, string identityId, string impersonatedIdentityId, CancellationToken token = default)
ParametersType | Name | Description |
---|
WorkflowCommand | command | Command to execute |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<CommandExecutionResult> | Result of the execution |
ExecuteCommandAsync(Guid, string, string, WorkflowCommand)
Execute specified command for specified users (async version)
Declaration[Obsolete("Since version 1.5 argument processId not used to determine the process, the process is determined by the command.ProcessId property.\r\nPlease use the following method: public void ExecuteCommandAsync(WorkflowCommand command, string identityId, string impersonatedIdentityId)")]
public Task<CommandExecutionResult> ExecuteCommandAsync(Guid processId, string identityId, string impersonatedIdentityId, WorkflowCommand command)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
WorkflowCommand | command | Command to execute |
ReturnsType | Description |
---|
Task<CommandExecutionResult> | Result of the execution |
GetInitialCommandsAsync(string, string)
Return the list of commands which is availiable from initial activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetInitialCommandsAsync(string schemeCode, string identityId)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetInitialCommandsAsync(string, string, CultureInfo)
Return the list of commands which is availiable from initial activity for specified user (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetInitialCommandsAsync(string schemeCode, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetInitialCommandsAsync(string, IEnumerable<string>, IDictionary<string, object>, string, CultureInfo)
Return the list of commands which is availiable from initial activity for specified users (async version)
Declarationpublic Task<IEnumerable<WorkflowCommand>> GetInitialCommandsAsync(string schemeCode, IEnumerable<string> identityIds, IDictionary<string, object> processParameters = null, string commandNameFilter = null, CultureInfo culture = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
IDictionary<string, object> | processParameters | Parameters for creating scheme of process |
string | commandNameFilter | Selects only the specified command if not null |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowCommand>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
CreateInstanceAsync(string, Guid, CancellationToken)
Create instance of process (async version)
Declarationpublic Task CreateInstanceAsync(string schemeCode, Guid processId, CancellationToken token = default)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
CancellationToken | token | Cancellation token |
ReturnsCreateInstanceAsync(string, Guid, string, string, CancellationToken)
Create instance of process (async version)
Declarationpublic Task CreateInstanceAsync(string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, CancellationToken token = default)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
string | identityId | The user id which execute initial command if command is available |
string | impersonatedIdentityId | The user id for whom executes initial command if command is available |
CancellationToken | token | Cancellation token |
ReturnsCreateInstanceAsync(string, Guid, IDictionary<string, object>, CancellationToken)
Create instance of process (async version)
Declarationpublic Task CreateInstanceAsync(string schemeCode, Guid processId, IDictionary<string, object> schemeCreationParameters, CancellationToken token = default)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
IDictionary<string, object> | schemeCreationParameters | The parameters for creating scheme of process |
CancellationToken | token | Cancellation token |
ReturnsCreateInstanceAsync(string, Guid, string, string, IDictionary<string, object>, CancellationToken)
Create instance of process (async version)
Declarationpublic Task CreateInstanceAsync(string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, IDictionary<string, object> schemeCreationParameters, CancellationToken token = default)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
string | identityId | The user id which execute initial command if command is available |
string | impersonatedIdentityId | The user id for whom executes initial command if command is available |
IDictionary<string, object> | schemeCreationParameters | The parameters for creating scheme of process |
CancellationToken | token | Cancellation token |
ReturnsCreateInstanceAsync(CreateInstanceParams, CancellationToken)
Create instance of the process (async version)
Declarationpublic Task CreateInstanceAsync(CreateInstanceParams createInstanceParams, CancellationToken token = default)
ParametersType | Name | Description |
---|
CreateInstanceParams | createInstanceParams | Parameters for creation of an instance of a process |
CancellationToken | token | Cancellation token |
ReturnsDeleteInstanceAsync(Guid)
Delete instance of the process and all child subprocesses. (async version)
Declarationpublic Task DeleteInstanceAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsIsProcessExistsAsync(Guid)
Check existence of the specified process
Declarationpublic Task<bool> IsProcessExistsAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<bool> | True if process with specified identifier is exists |
DeleteInstanceAsync(ProcessInstance)
Delete instance of the process and all child subprocesses. (Async version)
Declarationpublic Task DeleteInstanceAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance to delete |
ReturnsGetProcessInstancesTreeAsync(Guid, CancellationToken)
Returns process instance tree (root process and subprocesses) (Async version)
Declarationpublic Task<ProcessInstancesTree> GetProcessInstancesTreeAsync(Guid rootProcessId, CancellationToken cancellationToken = default)
ParametersType | Name | Description |
---|
Guid | rootProcessId | Root process id |
CancellationToken | cancellationToken | Cancellation token |
ReturnsType | Description |
---|
Task<ProcessInstancesTree> | ProcessInstancesTree object |
GetProcessInstancesTreeAsync(ProcessInstance, CancellationToken)
Returns process instance tree (root process and subprocesses) (Async version)
Declarationpublic Task<ProcessInstancesTree> GetProcessInstancesTreeAsync(ProcessInstance processInstance, CancellationToken cancellationToken = default)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | ProcessInstance for which tree is builds |
CancellationToken | cancellationToken | Cancellation token |
ReturnsType | Description |
---|
Task<ProcessInstancesTree> | ProcessInstancesTree object |
GetProcessInstanceAndFillProcessParametersAsync(Guid)
Get process instance with all parameters for specified process id (async version)
Declarationpublic Task<ProcessInstance> GetProcessInstanceAndFillProcessParametersAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<ProcessInstance> | <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> object |
GetProcessHistoryAsync(Guid, Paging)
Returns the history of process (async version)
Declarationpublic Task<List<ProcessHistoryItem>> GetProcessHistoryAsync(Guid processId, Paging paging = null)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
Paging | paging | |
ReturnsType | Description |
---|
Task<List<ProcessHistoryItem>> | |
GetProcessHistoryCountAsync(Guid)
Returns count of process history (async version)
Declarationpublic Task<int> GetProcessHistoryCountAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsGetLocalizedStateName(Guid, string)
Get localized state name for specified process in current culture
Declarationpublic string GetLocalizedStateName(Guid processId, string stateName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | stateName | State name to localize |
ReturnsType | Description |
---|
string | Localized state name |
GetLocalizedStateNameAsync(Guid, string)
Get localized state name for specified process in current culture
Declarationpublic Task<string> GetLocalizedStateNameAsync(Guid processId, string stateName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | stateName | State name to localize |
ReturnsType | Description |
---|
Task<string> | Localized state name |
GetLocalizedStateNameBySchemeId(Guid, string)
Get localized state name for specified scheme in current culture
Declarationpublic string GetLocalizedStateNameBySchemeId(Guid schemeId, string stateName)
ParametersType | Name | Description |
---|
Guid | schemeId | Id of the scheme |
string | stateName | State name to localize |
ReturnsType | Description |
---|
string | Localized state name |
GetLocalizedStateNameBySchemeIdAsync(Guid, string)
Get localized state name for specified scheme in current culture
Declarationpublic Task<string> GetLocalizedStateNameBySchemeIdAsync(Guid schemeId, string stateName)
ParametersType | Name | Description |
---|
Guid | schemeId | Id of the scheme |
string | stateName | State name to localize |
ReturnsType | Description |
---|
Task<string> | Localized state name |
GetLocalizedStateNameBySchemeCode(string, string, IDictionary<string, object>)
Get localized state name for specified scheme in current culture
Declarationpublic string GetLocalizedStateNameBySchemeCode(string schemeCode, string stateName, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | stateName | State name to localize |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
string | Localized state name |
GetLocalizedStateNameBySchemeCodeAsync(string, string, IDictionary<string, object>)
Get localized state name for specified scheme in current culture
Declarationpublic Task<string> GetLocalizedStateNameBySchemeCodeAsync(string schemeCode, string stateName, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | stateName | State name to localize |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
Task<string> | Localized state name |
GetLocalizedCommandName(Guid, string)
Get localized command name for specified process in current culture
Declarationpublic string GetLocalizedCommandName(Guid processId, string commandName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | commandName | Command name to localize |
ReturnsType | Description |
---|
string | Localized command name |
GetLocalizedCommandNameAsync(Guid, string)
Get localized command name for specified process in current culture
Declarationpublic Task<string> GetLocalizedCommandNameAsync(Guid processId, string commandName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | commandName | Command name to localize |
ReturnsType | Description |
---|
Task<string> | Localized command name |
GetLocalizedCommandNameBySchemeId(Guid, string)
Get localized command name for specified scheme in current culture
Declarationpublic string GetLocalizedCommandNameBySchemeId(Guid schemeId, string commandName)
ParametersType | Name | Description |
---|
Guid | schemeId | Id of the scheme |
string | commandName | Command name to localize |
ReturnsType | Description |
---|
string | Localized command name |
GetLocalizedCommandNameBySchemeIdAsync(Guid, string)
Get localized command name for specified scheme in current culture
Declarationpublic Task<string> GetLocalizedCommandNameBySchemeIdAsync(Guid schemeId, string commandName)
ParametersType | Name | Description |
---|
Guid | schemeId | Id of the scheme |
string | commandName | Command name to localize |
ReturnsType | Description |
---|
Task<string> | Localized command name |
LogInfo(string, Dictionary<string, string>)
Writes a message to the log with Info level
Declarationpublic void LogInfo(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
LogInfoIfLoggerExists(string, Dictionary<string, string>)
Writes a message to the log with Info level if WorkflowRuntime.Logger is defined
Declarationpublic void LogInfoIfLoggerExists(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
LogDebug(string, Dictionary<string, string>)
Writes a message to the log with Debug level
Declarationpublic void LogDebug(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
LogDebugIfLoggerExists(string, Dictionary<string, string>)
Writes a message to the log with Debug level if WorkflowRuntime.Logger is defined
Declarationpublic void LogDebugIfLoggerExists(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
LogError(string, Dictionary<string, string>)
Writes a message to the log with Error level
Declarationpublic void LogError(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
LogErrorIfLoggerExists(string, Dictionary<string, string>)
Writes a message to the log with Error level if WorkflowRuntime.Logger is defined
Declarationpublic void LogErrorIfLoggerExists(string message, Dictionary<string, string> parameters)
ParametersType | Name | Description |
---|
string | message | message to write |
Dictionary<string, string> | parameters | dictionary of properties to serialize within the log entry |
PreExecuteFromInitialActivityAsync(Guid, bool, CancellationToken)
Pre-execution from initial activity of the process (async version)
Declarationpublic Task<List<ActivityDto>> PreExecuteFromInitialActivityAsync(Guid processId, bool ignoreCurrentStateCheck = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<List<ActivityDto>> | List of activities which will presumably be executed |
PreExecuteFromCurrentActivityAsync(Guid, bool, CancellationToken)
Pre-execution from current activity of the process (async version)
Declarationpublic Task<List<ActivityDto>> PreExecuteFromCurrentActivityAsync(Guid processId, bool ignoreCurrentStateCheck = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<List<ActivityDto>> | List of activities which will presumably be executed |
PreExecuteAsync(Guid, string, bool, CancellationToken)
Pre-execution from specified activity of the process (async version)
Declarationpublic Task<List<ActivityDto>> PreExecuteAsync(Guid processId, string fromActivityName, bool ignoreCurrentStateCheck = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | fromActivityName | Activity name which begins pre-execution |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
CancellationToken | token | Cancellation token |
ReturnsType | Description |
---|
Task<List<ActivityDto>> | List of activities which will presumably be executed |
GetSchemeCodesAsync(List<string>)
Returns the list of scheme codes into which the scheme with the given tags. If tags are null returns all scheme codes.
Declarationpublic Task<List<string>> GetSchemeCodesAsync(List<string> tags = null)
ParametersType | Name | Description |
---|
List<string> | tags | |
ReturnsType | Description |
---|
Task<List<string>> | |
SetSchemeIsObsoleteAsync(string, Dictionary<string, object>)
Set flag IsObsolete for all schemas of process with specific code and parameters (async version)
Declarationpublic Task SetSchemeIsObsoleteAsync(string schemeCode, Dictionary<string, object> parameters)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Dictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsSetSchemeIsObsoleteAsync(string)
Set flag IsObsolete for all schemas of process with specific code (async version)
Declarationpublic Task SetSchemeIsObsoleteAsync(string schemeCode)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
ReturnsUpdateSchemeIfObsoleteAsync(Guid)
Updating scheme of specific process
Declarationpublic Task UpdateSchemeIfObsoleteAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsUpdateSchemeIfObsoleteAsync(Guid, IDictionary<string, object>, bool)
Updating scheme of specific process (async version)
Declarationpublic Task UpdateSchemeIfObsoleteAsync(Guid processId, IDictionary<string, object> parameters, bool ignoreAutoSchemeUpdate = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
IDictionary<string, object> | parameters | Parameters for creating scheme of process |
bool | ignoreAutoSchemeUpdate | If true the attribute of Activity - IsAutoScheme update will be ignored. |
ReturnsGetProcessSchemeAsync(Guid)
Get procees definition (parsed scheme) for specified process (async version)
Declarationpublic Task<ProcessDefinition> GetProcessSchemeAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<ProcessDefinition> | <xref href="OptimaJet.Workflow.Core.Model.ProcessDefinition" data-throw-if-not-resolved="false"></xref> object |
GetAvailableStateToSetAsync(Guid)
Get the list of all states which available for set of specified process localized in current culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSetAsync(Guid, CultureInfo)
Get the list of all states which available for set of specified process localized in specified culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(Guid processId, CultureInfo culture)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
CultureInfo | culture | Culture to localize state names |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSetAsync(ProcessInstance)
Get the list of all states which available for set of specified process localized in current culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSetAsync(ProcessInstance, CultureInfo)
Get the list of all states which available for set of specified process localized in specified culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(ProcessInstance processInstance, CultureInfo culture)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
CultureInfo | culture | Culture to localize state names |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSetAsync(string, IDictionary<string, object>)
Get the list of all states which available for set of specified scheme in current culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(string schemeCode, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSetAsync(string, CultureInfo, IDictionary<string, object>)
Get the list of all states which available for set of specified scheme in specified culture (async version)
Declarationpublic Task<IEnumerable<WorkflowState>> GetAvailableStateToSetAsync(string schemeCode, CultureInfo culture, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
CultureInfo | culture | Culture to localize state names |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
Task<IEnumerable<WorkflowState>> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
SetStateAsync(Guid, string, string, string, IDictionary<string, object>, bool)
Set specified state for specified process (async version)
Declaration[Obsolete("Use SetStateAsync(SetStateParams setStateParams) method instead of this")]
public Task SetStateAsync(Guid processId, string identityId, string impersonatedIdentityId, string stateName, IDictionary<string, object> parameters = null, bool preventExecution = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | The user id which set the state |
string | impersonatedIdentityId | The user id for whom sets the state (impersonation) |
string | stateName | State name to set |
IDictionary<string, object> | parameters | Dictionary of ProcessInstance parameters which transferred to executed actions |
bool | preventExecution | Actions due to transition process do not executed if true |
ReturnsSetStateAsync(SetStateParams)
Set specified state for specified process (async version)
Declarationpublic Task SetStateAsync(SetStateParams setStateParams)
ParametersType | Name | Description |
---|
SetStateParams | setStateParams | Parameters of setting state<xref href="OptimaJet.Workflow.Core.Runtime.SetStateParams" data-throw-if-not-resolved="false"></xref> |
ReturnsSetActivityWithoutExecutionAsync(ActivityDefinition, ProcessInstance, bool)
Set specified activity as current without execution of the implementation of the activity (Async version)
Declarationpublic Task SetActivityWithoutExecutionAsync(ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus = false)
ParametersType | Name | Description |
---|
ActivityDefinition | activityToSet | Activity to set |
ProcessInstance | processInstance | Process instance for set activity as current |
bool | doNotSetRunningStatus | The status of the process - <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus.Running" data-throw-if-not-resolved="false"></xref> will not be set if true |
ReturnsSetActivityWithExecutionAsync(string, string, IDictionary<string, object>, ActivityDefinition, ProcessInstance, bool, CancellationToken)
Set specified activity as current and executing the implementation of the activity (Async version)
Declarationpublic Task SetActivityWithExecutionAsync(string identityId, string impersonatedIdentityId, IDictionary<string, object> parameters, ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus = false, CancellationToken token = default)
ParametersType | Name | Description |
---|
string | identityId | The user id which set the activity |
string | impersonatedIdentityId | The user id for whom sets the activity (impersonation) |
IDictionary<string, object> | parameters | Dictionary of ProcessInstance parameters which transferred to executed actions |
ActivityDefinition | activityToSet | Activity to set |
ProcessInstance | processInstance | Process instance for set activity as current |
bool | doNotSetRunningStatus | The status of the process - <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus.Running" data-throw-if-not-resolved="false"></xref> will not be set if true |
CancellationToken | token | Cancellation token |
ReturnsResumeAsync(Guid, CancellationToken)
Resumes the process from the current activity. In this case, the activity itself is not executed, and the process goes on if it can.
Declarationpublic Task<ResumeResult> ResumeAsync(Guid processId, CancellationToken token = default)
ParametersType | Name | Description |
---|
Guid | processId | |
CancellationToken | token | |
ReturnsType | Description |
---|
Task<ResumeResult> | |
ResumeAsync(ResumeParams, CancellationToken)
Resumes the process from the current or specific activity. In this case, the activity itself is not executed, and the process goes on if it can.
Declarationpublic Task<ResumeResult> ResumeAsync(ResumeParams resumeParams, CancellationToken token = default)
ParametersType | Name | Description |
---|
ResumeParams | resumeParams | |
CancellationToken | token | |
ReturnsType | Description |
---|
Task<ResumeResult> | |
GetCurrentStateNameAsync(Guid)
Return the current state name of specified process (async version)
Declarationpublic Task<string> GetCurrentStateNameAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<string> | Name of current state |
GetCurrentActivityNameAsync(Guid)
Return the current activity name of specified process (async version)
Declarationpublic Task<string> GetCurrentActivityNameAsync(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
Task<string> | Current activity name |
GetCurrentStateAsync(Guid, CultureInfo)
Return the current state of specified process (async version)
Declarationpublic Task<WorkflowState> GetCurrentStateAsync(Guid processId, CultureInfo culture = null)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
CultureInfo | culture | Culture to localize state name |
ReturnsType | Description |
---|
Task<WorkflowState> | <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> object |
GetInitialStateAsync(string, IDictionary<string, object>, CultureInfo)
Return the initial state for process scheme (async version)
Declarationpublic Task<WorkflowState> GetInitialStateAsync(string schemeCode, IDictionary<string, object> processParameters = null, CultureInfo culture = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IDictionary<string, object> | processParameters | Parameters for creating scheme of process |
CultureInfo | culture | Culture to localize state name |
ReturnsType | Description |
---|
Task<WorkflowState> | <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> object |
IsProcessExists(Guid)
Check existence of the specified process
Declarationpublic bool IsProcessExists(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
bool | True if process with specified identifier is exists |
CreateInstance(string, Guid)
Create instance of process.
Declarationpublic void CreateInstance(string schemeCode, Guid processId)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
CreateInstance(string, Guid, string, string)
Create instance of process.
Declarationpublic void CreateInstance(string schemeCode, Guid processId, string identityId, string impersonatedIdentityId)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
string | identityId | The user id which execute initial command if command is available |
string | impersonatedIdentityId | The user id for whom executes initial command if command is available |
CreateInstance(string, Guid, IDictionary<string, object>)
Create instance of process.
Declarationpublic void CreateInstance(string schemeCode, Guid processId, IDictionary<string, object> schemeCreationParameters)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
IDictionary<string, object> | schemeCreationParameters | Parameters for creating the scheme of the process (defining parameters) |
CreateInstance(string, Guid, string, string, IDictionary<string, object>)
Create instance of the process.
Declarationpublic void CreateInstance(string schemeCode, Guid processId, string identityId, string impersonatedIdentityId, IDictionary<string, object> schemeCreationParameters)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Guid | processId | Process id |
string | identityId | The user id which execute initial command if command is available |
string | impersonatedIdentityId | The user id for whom executes initial command if command is available |
IDictionary<string, object> | schemeCreationParameters | The parameters for creating scheme of process (defining parameters) |
CreateInstance(CreateInstanceParams)
Create instance of the process.
Declarationpublic void CreateInstance(CreateInstanceParams createInstanceParams)
ParametersType | Name | Description |
---|
CreateInstanceParams | createInstanceParams | Parameters for creaition of an instance of a process |
DeleteInstance(Guid)
Delete instance of the process and all child subprocesses.
Declarationpublic void DeleteInstance(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
DeleteInstance(ProcessInstance)
Delete instance of the process and all child subprocesses.
Declarationpublic void DeleteInstance(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Instance to delete |
GetProcessInstancesTree(Guid)
Returns process instance tree (root process and subprocesses)
Declarationpublic ProcessInstancesTree GetProcessInstancesTree(Guid rootProcessId)
ParametersType | Name | Description |
---|
Guid | rootProcessId | Root process id |
ReturnsType | Description |
---|
ProcessInstancesTree | ProcessInstancesTree object |
GetProcessInstancesTree(ProcessInstance)
Returns process instance tree (root process and subprocesses)
Declarationpublic ProcessInstancesTree GetProcessInstancesTree(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | ProcessInstance for which tree is builds |
ReturnsType | Description |
---|
ProcessInstancesTree | ProcessInstancesTree object |
CheckAllSubprocessesCompleted(ProcessInstance)
Checks that all subprocesses was completed
Declarationpublic bool CheckAllSubprocessesCompleted(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | ProcessInstance for check |
ReturnsType | Description |
---|
bool | true - if there are no active suprocesses |
CheckAllSubprocessesAndParentProcessCompleted(ProcessInstance)
Check that all subprocesses and the parent process reach the same point (completed)
Declarationpublic bool CheckAllSubprocessesAndParentProcessCompleted(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ReturnsDeleteAllSubprocesses(ProcessInstance)
Delete all subprocesses for process
Declarationpublic int DeleteAllSubprocesses(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
ReturnsType | Description |
---|
int | Count of deleted subprocesses |
SetSchemeIsObsolete(string, Dictionary<string, object>)
Set flag IsObsolete for all schemas of process with specific code and parameters
Declarationpublic void SetSchemeIsObsolete(string schemeCode, Dictionary<string, object> parameters)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
Dictionary<string, object> | parameters | The parameters for creating scheme of process |
SetSchemeIsObsolete(string)
Set flag IsObsolete for all schemas of process with specific code
Declarationpublic void SetSchemeIsObsolete(string schemeCode)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
SetTimerValue(Guid, string, DateTime)
Sets new value of named timer. Use this method outside of your process.
Declarationpublic void SetTimerValue(Guid processId, string timerName, DateTime newValue)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
DateTime | newValue | New value of the timer |
SetTimerValue(ProcessInstance, string, DateTime)
Sets new value of named timer. Use this method inside of your process (in actions).
Declarationpublic void SetTimerValue(ProcessInstance processInstance, string timerName, DateTime newValue)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | timerName | Timer name in Scheme |
DateTime | newValue | New value of the timer |
ResetTimerValue(Guid, string)
Resets value of named timer. Use this method outside of your process.
Declarationpublic void ResetTimerValue(Guid processId, string timerName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
ResetTimerValue(ProcessInstance, string)
Resets value of named timer. Use this method inside of your process (in actions).
Declarationpublic void ResetTimerValue(ProcessInstance processInstance, string timerName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | timerName | Timer name in Scheme |
UpdateSchemeIfObsolete(Guid, bool)
Updating scheme of specific process
Declarationpublic void UpdateSchemeIfObsolete(Guid processId, bool ignoreAutoSchemeUpdate = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
bool | ignoreAutoSchemeUpdate | If true the attribute of Activity - IsAutoScheme update will be ignored. |
UpdateSchemeIfObsolete(Guid, IDictionary<string, object>, bool)
Updating scheme of specific process
Declarationpublic void UpdateSchemeIfObsolete(Guid processId, IDictionary<string, object> parameters, bool ignoreAutoSchemeUpdate = false)
ParametersType | Name | Description |
---|
Guid | processId | The process id |
IDictionary<string, object> | parameters | Parameters for creating scheme of process |
bool | ignoreAutoSchemeUpdate | If true the attribute of Activity - IsAutoScheme update will be ignored. |
PreExecuteFromInitialActivity(Guid, bool)
Pre-execution from initial activity of the process
Declarationpublic List<ActivityDto> PreExecuteFromInitialActivity(Guid processId, bool ignoreCurrentStateCheck = false)
ParametersType | Name | Description |
---|
Guid | processId | The process id |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
ReturnsType | Description |
---|
List<ActivityDto> | List of activities which will presumably be executed |
PreExecuteFromCurrentActivity(Guid, bool)
Pre-execution from current activity of the process
Declarationpublic List<ActivityDto> PreExecuteFromCurrentActivity(Guid processId, bool ignoreCurrentStateCheck = false)
ParametersType | Name | Description |
---|
Guid | processId | The process id |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
ReturnsType | Description |
---|
List<ActivityDto> | List of activities which will presumably be executed |
PreExecute(Guid, string, bool)
Pre-execution from specified activity of the process
Declarationpublic List<ActivityDto> PreExecute(Guid processId, string fromActivityName, bool ignoreCurrentStateCheck = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | fromActivityName | Activity name which begins pre-execution |
bool | ignoreCurrentStateCheck | If false and Current State Name and State Name of Current Activity is different (in case of scheme upgrade) do not run pre-execution |
ReturnsType | Description |
---|
List<ActivityDto> | List of activities which will presumably be executed |
GetInitialCommands(string, string)
Return the list of commands which is availiable from initial activity for specified user
Declarationpublic IEnumerable<WorkflowCommand> GetInitialCommands(string schemeCode, string identityId)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetInitialCommands(string, string, CultureInfo)
Return the list of commands which is availiable from initial activity for specified user
Declarationpublic IEnumerable<WorkflowCommand> GetInitialCommands(string schemeCode, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetInitialCommands(string, IEnumerable<string>, IDictionary<string, object>, string, CultureInfo)
Return the list of commands which is availiable from initial activity for specified users
Declarationpublic IEnumerable<WorkflowCommand> GetInitialCommands(string schemeCode, IEnumerable<string> identityIds, IDictionary<string, object> processParameters = null, string commandNameFilter = null, CultureInfo culture = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
IDictionary<string, object> | processParameters | Parameters for creating scheme of process |
string | commandNameFilter | Selects only the specified command if not null |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(Guid, string)
Return the list of commands which is availiable from current activity for specified user
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(Guid processId, string identityId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(Guid, string, CultureInfo)
Return the list of commands which is availiable from current activity for specified user Async
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(Guid processId, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(Guid, IEnumerable<string>, string, string, CultureInfo, bool)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(Guid processId, IEnumerable<string> identityIds, string commandNameFilter = null, string mainIdentityId = null, CultureInfo culture = null, bool conditionCheck = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
string | commandNameFilter | Selects only the specified command if not null |
string | mainIdentityId | User id for priority check of rules |
CultureInfo | culture | Culture to localize command and command parameter names |
bool | conditionCheck | If true then commands with failed condition checkes will be excluded |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(ProcessInstance, string)
Return the list of commands which is availiable from current activity for specified user
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(ProcessInstance processInstance, string identityId)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(ProcessInstance, string, CultureInfo)
Return the list of commands which is availiable from current activity for specified user Async
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(ProcessInstance processInstance, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommands(ProcessInstance, IEnumerable<string>, string, string, CultureInfo, bool)
Return the list of commands which is availiable from current activity for specified user (async version)
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommands(ProcessInstance processInstance, IEnumerable<string> identityIds, string commandNameFilter = null, string mainIdentityId = null, CultureInfo culture = null, bool conditionCheck = false)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
string | commandNameFilter | Selects only the specified command if not null |
string | mainIdentityId | User id for priority check of rules |
CultureInfo | culture | Culture to localize command and command parameter names |
bool | conditionCheck | If true then commands with failed condition checkes will be excluded |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsWithConditionCheck(Guid, string)
Return the list of commands which is availiable from current activity for specified user with conditions check
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommandsWithConditionCheck(Guid processId, string identityId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsWithConditionCheck(Guid, string, CultureInfo)
Return the list of commands which is availiable from current activity for specified user with conditions check
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommandsWithConditionCheck(Guid processId, string identityId, CultureInfo culture)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | User id for whom formed initial commands list |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
GetAvailableCommandsWithConditionCheck(Guid, IEnumerable<string>, string, string, CultureInfo)
Return the list of commands which is availiable from current activity for specified user with conditions check
Declarationpublic IEnumerable<WorkflowCommand> GetAvailableCommandsWithConditionCheck(Guid processId, IEnumerable<string> identityIds, string commandNameFilter = null, string mainIdentityId = null, CultureInfo culture = null)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
IEnumerable<string> | identityIds | List of User ids for which formed initial commands list |
string | commandNameFilter | Selects only the specified command if not null |
string | mainIdentityId | User id for priority check of rules |
CultureInfo | culture | Culture to localize command and command parameter names |
ReturnsType | Description |
---|
IEnumerable<WorkflowCommand> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> commands |
ExecuteCommand(WorkflowCommand, string, string)
Execute specified command for specified users
Declarationpublic CommandExecutionResult ExecuteCommand(WorkflowCommand command, string identityId, string impersonatedIdentityId)
ParametersType | Name | Description |
---|
WorkflowCommand | command | Command to execute |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
ReturnsType | Description |
---|
CommandExecutionResult | Result of the execution |
ExecuteCommand(Guid, string, string, WorkflowCommand)
Execute specified command for specified users
Declaration[Obsolete("Since version 1.5 argument processId not used to determine the process, the process is determined by the command.ProcessId property. \r\nPlease use the following method: public void ExecuteCommand(WorkflowCommand command, string identityId, string impersonatedIdentityId)")]
public CommandExecutionResult ExecuteCommand(Guid processId, string identityId, string impersonatedIdentityId, WorkflowCommand command)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
WorkflowCommand | command | Command to execute |
ReturnsType | Description |
---|
CommandExecutionResult | Result of the execution |
GetInitialState(string, IDictionary<string, object>, CultureInfo)
Return the initial state for process scheme
Declarationpublic WorkflowState GetInitialState(string schemeCode, IDictionary<string, object> processParameters = null, CultureInfo culture = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IDictionary<string, object> | processParameters | Parameters for creating scheme of process |
CultureInfo | culture | Culture to localize state name |
ReturnsType | Description |
---|
WorkflowState | <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> object |
GetCurrentState(Guid, CultureInfo)
Return the current state of specified process
Declarationpublic WorkflowState GetCurrentState(Guid processId, CultureInfo culture = null)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
CultureInfo | culture | Culture to localize state name |
ReturnsType | Description |
---|
WorkflowState | <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> object |
GetCurrentStateName(Guid)
Return the current state name of specified process
Declarationpublic string GetCurrentStateName(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
string | Name of current state |
GetCurrentActivityName(Guid)
Return the current activity name of specified process
Declarationpublic string GetCurrentActivityName(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
string | Current activity name |
GetAvailableStateToSet(Guid)
Get the list of all states which available for set of specified process localized in current culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSet(ProcessInstance, CultureInfo)
Get the list of all states which available for set of specified process localized in specified culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(ProcessInstance processInstance, CultureInfo culture)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
CultureInfo | culture | Culture to localize state names |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSet(ProcessInstance)
Get the list of all states which available for set of specified process in current culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSet(Guid, CultureInfo)
Get the list of all states which available for set of specified process localized in specified culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(Guid processId, CultureInfo culture)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
CultureInfo | culture | Culture to localize state names |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSet(string, IDictionary<string, object>)
Get the list of all states which available for set of specified scheme in current culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(string schemeCode, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
GetAvailableStateToSet(string, CultureInfo, IDictionary<string, object>)
Get the list of all states which available for set of specified scheme in specified culture
Declarationpublic IEnumerable<WorkflowState> GetAvailableStateToSet(string schemeCode, CultureInfo culture, IDictionary<string, object> parameters = null)
ParametersType | Name | Description |
---|
string | schemeCode | Code of the scheme |
CultureInfo | culture | Culture to localize state names |
IDictionary<string, object> | parameters | The parameters for creating scheme of process |
ReturnsType | Description |
---|
IEnumerable<WorkflowState> | List of <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowState" data-throw-if-not-resolved="false"></xref> objects |
SetState(Guid, string, string, string, IDictionary<string, object>, bool)
Set specified state for specified process
Declaration[Obsolete("Use SetState(SetStateParams setStateParams) method instead of this")]
public void SetState(Guid processId, string identityId, string impersonatedIdentityId, string stateName, IDictionary<string, object> parameters = null, bool preventExecution = false)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | identityId | The user id which set the state |
string | impersonatedIdentityId | The user id for whom sets the state (impersonation) |
string | stateName | State name to set |
IDictionary<string, object> | parameters | Dictionary of ProcessInstance parameters which transferred to executed actions |
bool | preventExecution | Actions due to transition process do not executed if true |
SetState(SetStateParams)
Set specified state for specified process (async version)
Declarationpublic void SetState(SetStateParams setStateParams)
ParametersType | Name | Description |
---|
SetStateParams | setStateParams | Parameters of setting state<xref href="OptimaJet.Workflow.Core.Runtime.SetStateParams" data-throw-if-not-resolved="false"></xref> |
SetActivityWithoutExecution(ActivityDefinition, ProcessInstance, bool)
Set specified activity as current without execution of the implementation of the activity
Declarationpublic void SetActivityWithoutExecution(ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus = false)
ParametersType | Name | Description |
---|
ActivityDefinition | activityToSet | Activity to set |
ProcessInstance | processInstance | Process instance for set activity as current |
bool | doNotSetRunningStatus | The status of the process - <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus.Running" data-throw-if-not-resolved="false"></xref> will not be set if true |
SetActivityWithExecution(string, string, IDictionary<string, object>, ActivityDefinition, ProcessInstance, bool)
Set specified activity as current and executing the implementation of the activity
Declarationpublic void SetActivityWithExecution(string identityId, string impersonatedIdentityId, IDictionary<string, object> parameters, ActivityDefinition activityToSet, ProcessInstance processInstance, bool doNotSetRunningStatus = false)
ParametersType | Name | Description |
---|
string | identityId | The user id which set the activity |
string | impersonatedIdentityId | The user id for whom sets the activity (impersonation) |
IDictionary<string, object> | parameters | Dictionary of ProcessInstance parameters which transferred to executed actions |
ActivityDefinition | activityToSet | Activity to set |
ProcessInstance | processInstance | Process instance for set activity as current |
bool | doNotSetRunningStatus | The status of the process - <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus.Running" data-throw-if-not-resolved="false"></xref> will not be set if true |
GetProcessScheme(Guid)
Get procees definition (parsed scheme) for specified process
Declarationpublic ProcessDefinition GetProcessScheme(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
ProcessDefinition | <xref href="OptimaJet.Workflow.Core.Model.ProcessDefinition" data-throw-if-not-resolved="false"></xref> object |
GetProcessStatus(Guid)
Get status of specified process
Declarationpublic ProcessStatus GetProcessStatus(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
ProcessStatus | <xref href="OptimaJet.Workflow.Core.Persistence.ProcessStatus" data-throw-if-not-resolved="false"></xref> object |
GetProcessInstanceAndFillProcessParameters(Guid)
Get process instance with all parameters for specified process id
Declarationpublic ProcessInstance GetProcessInstanceAndFillProcessParameters(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
ReturnsType | Description |
---|
ProcessInstance | <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> object |
SetPersistentProcessParameter(Guid, string, object)
Set single persistent parameter in the process
Declarationpublic void SetPersistentProcessParameter(Guid processId, string parameterName, object parameterValue)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | parameterName | Parameter name |
object | parameterValue | |
GetProcessHistory(Guid, Paging)
Returns the history of process
Declarationpublic List<ProcessHistoryItem> GetProcessHistory(Guid processId, Paging paging = null)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
Paging | paging | |
ReturnsType | Description |
---|
List<ProcessHistoryItem> | |
GetProcessHistoryCount(Guid)
Returns count of process history (async version)
Declarationpublic int GetProcessHistoryCount(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsGetProcessTimers(Guid)
Returns list of timers for a process
Declarationpublic IEnumerable<ProcessTimer> GetProcessTimers(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | Id of the process |
ReturnsType | Description |
---|
IEnumerable<ProcessTimer> | |
CheckIdentity(ProcessInstance, string, string, string)
Declarationpublic bool CheckIdentity(ProcessInstance processInstance, string identityId, string ruleName, string parameter)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
string | identityId | |
string | ruleName | |
string | parameter | |
ReturnsCheckIdentityByActor(ProcessInstance, string, string)
Declarationpublic bool CheckIdentityByActor(ProcessInstance processInstance, string identityId, string actorName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
string | identityId | |
string | actorName | |
ReturnsShutdown(int)
Switches off the runtime. Switches off API, waits for API calls to be completed. Switches off all timers.
IMPORTANT! Call this method from the SYNCHRONOUS method only.
Declarationpublic void Shutdown(int timeout = -1)
ParametersType | Name | Description |
---|
int | timeout | Shutdown timeout |
GetSchemeCodes(List<string>)
Returns the list of scheme codes into which the scheme with the given tags. If tags are null returns all scheme codes.
Declarationpublic List<string> GetSchemeCodes(List<string> tags = null)
ParametersType | Name | Description |
---|
List<string> | tags | |
ReturnsType | Description |
---|
List<string> | |
ExecuteCommandWithRestrictionCheck(WorkflowCommand, string, string)
Execute specified command for specified users with actor restrictions check
Declarationpublic CommandExecutionResult ExecuteCommandWithRestrictionCheck(WorkflowCommand command, string identityId, string impersonatedIdentityId)
ParametersType | Name | Description |
---|
WorkflowCommand | command | Command to execute |
string | identityId | The user id which execute command |
string | impersonatedIdentityId | The user id for whom executes command (impersonation) |
ReturnsType | Description |
---|
CommandExecutionResult | Result of the execution |
Resume(Guid)
Resumes the process from the current activity. In this case, the activity itself is not executed, and the process goes on if it can.
Declarationpublic ResumeResult Resume(Guid processId)
ParametersType | Name | Description |
---|
Guid | processId | |
ReturnsType | Description |
---|
ResumeResult | |
Resume(ResumeParams)
Resumes the process from the current or specific activity. In this case, the activity itself is not executed, and the process goes on if it can.
Declarationpublic ResumeResult Resume(ResumeParams resumeParams)
ParametersType | Name | Description |
---|
ResumeParams | resumeParams | |
ReturnsType | Description |
---|
ResumeResult | |
Fields
Plugins
All registered plugins
Declarationpublic List<IWorkflowPlugin> Plugins
ReturnsType | Description |
---|
List<IWorkflowPlugin> | |
CustomActivities
All custom activities
Declarationpublic List<ActivityBase> CustomActivities
ReturnsType | Description |
---|
List<ActivityBase> | |
CustomConditions
Declarationpublic List<FormBase> CustomConditions
ReturnsType | Description |
---|
List<FormBase> | |
Events
GlobalCodeActionsCompiled
Raises after global Code Actions compilation
Declarationpublic event EventHandler<CodeActionsCompiledEventArgs> GlobalCodeActionsCompiled
ReturnsType | Description |
---|
EventHandler<CodeActionsCompiledEventArgs> | |
OnNeedDeterminingParameters
Raises when runtime need to obtain parameters for creating the scheme of the process
Declarationpublic event EventHandler<NeedDeterminingParametersEventArgs> OnNeedDeterminingParameters
ReturnsType | Description |
---|
EventHandler<NeedDeterminingParametersEventArgs> | |
OnSchemaWasChanged
Raises when the scheme of the process was changed
Declarationpublic event EventHandler<SchemaWasChangedEventArgs> OnSchemaWasChanged
ReturnsType | Description |
---|
EventHandler<SchemaWasChangedEventArgs> | |
OnWorkflowError
Raises when workflow error occurred
Declarationpublic event EventHandler<WorkflowErrorEventArgs> OnWorkflowError
ReturnsType | Description |
---|
EventHandler<WorkflowErrorEventArgs> | |
OnStartingTransitionNotFound
Raises when runtime can not find starting transition of a subprocess in a new root scheme
Declarationpublic event EventHandler<StartingTransitionNotFoundEventArgs> OnStartingTransitionNotFound
ReturnsType | Description |
---|
EventHandler<StartingTransitionNotFoundEventArgs> | |
ProcessActivityChanged
Raises when current activity of a process was changed
Declaration[Obsolete("Use OnProcessActivityChanged instead of this.")]
public event EventHandler<ProcessActivityChangedEventArgs> ProcessActivityChanged
ReturnsType | Description |
---|
EventHandler<ProcessActivityChangedEventArgs> | |
OnProcessActivityChanged
Raises when current activity of a process was changed
Declarationpublic event EventHandler<ProcessActivityChangedEventArgs> OnProcessActivityChanged
ReturnsType | Description |
---|
EventHandler<ProcessActivityChangedEventArgs> | |
BeforeActivityExecution
Raises before execution of choosen activity
Declaration[Obsolete("Use OnBeforeActivityExecution instead of this.")]
public event EventHandler<BeforeActivityExecutionEventArgs> BeforeActivityExecution
ReturnsType | Description |
---|
EventHandler<BeforeActivityExecutionEventArgs> | |
OnBeforeActivityExecution
Raises before execution of choosen activity
Declarationpublic event EventHandler<BeforeActivityExecutionEventArgs> OnBeforeActivityExecution
ReturnsType | Description |
---|
EventHandler<BeforeActivityExecutionEventArgs> | |
NeedTimerValue
Raises when the timer value must be obtained
Declaration[Obsolete("Use OnNeedTimerValue instead of this.")]
public event EventHandler<NeedTimerValueEventArgs> NeedTimerValue
ReturnsType | Description |
---|
EventHandler<NeedTimerValueEventArgs> | |
OnNeedTimerValue
Raises when the timer value must be obtained
Declarationpublic event EventHandler<NeedTimerValueEventArgs> OnNeedTimerValue
ReturnsType | Description |
---|
EventHandler<NeedTimerValueEventArgs> | |
ProcessStatusChanged
Raises when the status of the procees ProcessStatus was changed
Declaration[Obsolete("Use OnProcessStatusChanged instead of this.")]
public event EventHandler<ProcessStatusChangedEventArgs> ProcessStatusChanged
ReturnsType | Description |
---|
EventHandler<ProcessStatusChangedEventArgs> | |
OnProcessStatusChanged
Raises when the status of the procees ProcessStatus was changed
Declarationpublic event EventHandler<ProcessStatusChangedEventArgs> OnProcessStatusChanged
ReturnsType | Description |
---|
EventHandler<ProcessStatusChangedEventArgs> | |
OnNeedDeterminingParametersAsync
Raises when runtime need to obtain parameters for creating the scheme of the process
Declarationpublic event AsyncEventHandler<NeedDeterminingParametersEventArgs> OnNeedDeterminingParametersAsync
ReturnsOnSchemaWasChangedAsync
Raises when the scheme of the process was changed
Declarationpublic event AsyncEventHandler<SchemaWasChangedEventArgs> OnSchemaWasChangedAsync
ReturnsOnWorkflowErrorAsync
Raises when workflow error occurred
Declarationpublic event AsyncEventHandler<WorkflowErrorEventArgs> OnWorkflowErrorAsync
ReturnsOnStartingTransitionNotFoundAsync
Raises when runtime can not find starting transition of a subprocess in a new root scheme
Declarationpublic event AsyncEventHandler<StartingTransitionNotFoundEventArgs> OnStartingTransitionNotFoundAsync
ReturnsOnProcessActivityChangedAsync
Raises when current activity of a process was changed
Declarationpublic event AsyncEventHandler<ProcessActivityChangedEventArgs> OnProcessActivityChangedAsync
ReturnsOnBeforeActivityExecutionAsync
Raises before execution of choosen activity
Declarationpublic event AsyncEventHandler<BeforeActivityExecutionEventArgs> OnBeforeActivityExecutionAsync
ReturnsOnProcessStatusChangedAsync
Raises when the status of the procees ProcessStatus was changed
Declarationpublic event AsyncEventHandler<ProcessStatusChangedEventArgs> OnProcessStatusChangedAsync
ReturnsOnNeedTimerValueAsync
Raises when the timer value must be obtained
Declarationpublic event AsyncEventHandler<NeedTimerValueEventArgs> OnNeedTimerValueAsync
ReturnsExtension Methods
- WorkflowRuntimeBulkApi.BulkCreateInstance(WorkflowRuntime, BulkCreateInstancePrams, BulkOperationOptions)
- WorkflowRuntimeBulkApi.BulkCreateInstance(WorkflowRuntime, List<BulkCreateInstancePrams>, BulkOperationOptions)
- WorkflowRuntimeBulkApi.BulkCreateInstanceAsync(WorkflowRuntime, BulkCreateInstancePrams, BulkOperationOptions)
- WorkflowRuntimeBulkApi.BulkCreateInstanceAsync(WorkflowRuntime, BulkCreateInstancePrams, CancellationToken, BulkOperationOptions)
- WorkflowRuntimeBulkApi.BulkCreateInstanceAsync(WorkflowRuntime, List<BulkCreateInstancePrams>, BulkOperationOptions)
- WorkflowRuntimeBulkApi.BulkCreateInstanceAsync(WorkflowRuntime, List<BulkCreateInstancePrams>, CancellationToken, BulkOperationOptions)
- WorkflowRuntimeConfigurationExtension.AsMultiServer(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.AsMultiServer(WorkflowRuntime, IMultiServerSettingsSource)
- WorkflowRuntimeConfigurationExtension.AsSingleServer(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.AsSingleServer(WorkflowRuntime, ISingleServerSettingsSource)
- WorkflowRuntimeConfigurationExtension.AsSingleServer(WorkflowRuntime, SingleServerSettings)
- WorkflowRuntimeConfigurationExtension.AttachDeterminingParametersGetter(WorkflowRuntime, EventHandler<NeedDeterminingParametersEventArgs>)
- WorkflowRuntimeConfigurationExtension.ClearActionProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearDesignerAutocompleteProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearDesignerParameterFormatProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearExternalParametersProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearLocalizationProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearProcessRestorers(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ClearRuleProvider(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.CodeActionsDebugOn(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ColdStart(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ColdStart(WorkflowRuntime, bool, out Dictionary<string, string>)
- WorkflowRuntimeConfigurationExtension.ColdStartAsync(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.ColdStartAsync(WorkflowRuntime, bool)
- WorkflowRuntimeConfigurationExtension.DeserializeParameter(WorkflowRuntime, string, Type)
- WorkflowRuntimeConfigurationExtension.DisableCodeActions(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.EnableCodeActions(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.RegisterAssemblyForCodeActions(WorkflowRuntime, Assembly, bool, Func<Type, bool>)
- WorkflowRuntimeConfigurationExtension.SerializeParameter(WorkflowRuntime, object, Type)
- WorkflowRuntimeConfigurationExtension.SetCancellationTokenHandling(WorkflowRuntime, CancellationTokenHandling)
- WorkflowRuntimeConfigurationExtension.SetExecutionSearchOrder(WorkflowRuntime, ExecutionSearchOrder)
- WorkflowRuntimeConfigurationExtension.SetIgnoreMissingExecutionItems(WorkflowRuntime, bool)
- WorkflowRuntimeConfigurationExtension.SetParameterSerializerSettings(WorkflowRuntime, JsonSerializerSettings)
- WorkflowRuntimeConfigurationExtension.Start(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.Start(WorkflowRuntime, bool, out Dictionary<string, string>)
- WorkflowRuntimeConfigurationExtension.StartAsync(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.StartAsync(WorkflowRuntime, bool)
- WorkflowRuntimeConfigurationExtension.SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOff(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOn(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOn(WorkflowRuntime, EventHandler<NeedDeterminingParametersEventArgs>)
- WorkflowRuntimeConfigurationExtension.WithActionProvider(WorkflowRuntime, IWorkflowActionProvider, List<string>)
- WorkflowRuntimeConfigurationExtension.WithBPMNCustomDownload(WorkflowRuntime, BPMNCustomDownloadDelegate)
- WorkflowRuntimeConfigurationExtension.WithBPMNCustomUpload(WorkflowRuntime, BPMNCustomUploadDelegate)
- WorkflowRuntimeConfigurationExtension.WithBuilder(WorkflowRuntime, IWorkflowBuilder)
- WorkflowRuntimeConfigurationExtension.WithCustomActivities(WorkflowRuntime, List<ActivityBase>)
- WorkflowRuntimeConfigurationExtension.WithCustomActivity(WorkflowRuntime, ActivityBase)
- WorkflowRuntimeConfigurationExtension.WithCustomConditions(WorkflowRuntime, List<FormBase>)
- WorkflowRuntimeConfigurationExtension.WithDefaultBuilder<TSchemeMedium>(WorkflowRuntime)
- WorkflowRuntimeConfigurationExtension.WithDesignerAutocompleteProvider(WorkflowRuntime, IDesignerAutocompleteProvider, List<string>)
- WorkflowRuntimeConfigurationExtension.WithDesignerParameterFormatProvider(WorkflowRuntime, IDesignerParameterFormatProvider, List<string>)
- WorkflowRuntimeConfigurationExtension.WithExpressionsCompilerOptions(WorkflowRuntime, ExpressionsCompilerOptions)
- WorkflowRuntimeConfigurationExtension.WithExternalParametersProvider(WorkflowRuntime, IWorkflowExternalParametersProvider, List<string>)
- WorkflowRuntimeConfigurationExtension.WithLocalizationProvider(WorkflowRuntime, ILocalizationProvider)
- WorkflowRuntimeConfigurationExtension.WithPersistenceProvider(WorkflowRuntime, IPersistenceProvider)
- WorkflowRuntimeConfigurationExtension.WithPlugin(WorkflowRuntime, IWorkflowPlugin, List<string>)
- WorkflowRuntimeConfigurationExtension.WithPlugins(WorkflowRuntime, List<string>, params IWorkflowPlugin[])
- WorkflowRuntimeConfigurationExtension.WithProcessLogger(WorkflowRuntime, IProcessLogProvider)
- WorkflowRuntimeConfigurationExtension.WithProcessRestorer(WorkflowRuntime, IProcessRestorer)
- WorkflowRuntimeConfigurationExtension.WithRuleProvider(WorkflowRuntime, IWorkflowRuleProvider, List<string>)
- WorkflowRuntimeConfigurationExtension.WithRuntimeSettings(WorkflowRuntime, WorkflowRuntimeSettings)
- WorkflowRuntimeConfigurationExtension.WithServiceRunner(WorkflowRuntime, IWorkflowServiceRunner)
- WorkflowRuntimeConfigurationExtension.WithTimerManager(WorkflowRuntime, ITimerManager)
- WorkflowRuntimeGetActorsApi.GetAllActorsForAllCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsApi.GetAllActorsForAllCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitions(WorkflowRuntime, ProcessInstance, List<TransitionClassifier>)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitions(WorkflowRuntime, TreeSearchFilter, List<TransitionClassifier>)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitions(WorkflowRuntime, Guid, List<TransitionClassifier>, bool, string)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitionsAsync(WorkflowRuntime, ProcessInstance, List<TransitionClassifier>, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitionsAsync(WorkflowRuntime, TreeSearchFilter, List<TransitionClassifier>, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForCommandTransitionsAsync(WorkflowRuntime, Guid, List<TransitionClassifier>, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForDirectAndUndefinedCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsApi.GetAllActorsForDirectAndUndefinedCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForDirectCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsApi.GetAllActorsForDirectCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsApi.GetAllActorsForReverseCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsApi.GetAllActorsForReverseCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForAllCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForAllCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitions(WorkflowRuntime, ProcessInstance, List<TransitionClassifier>)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitions(WorkflowRuntime, TreeSearchFilter, List<TransitionClassifier>)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitions(WorkflowRuntime, Guid, List<TransitionClassifier>, bool, string)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitionsAsync(WorkflowRuntime, ProcessInstance, List<TransitionClassifier>, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitionsAsync(WorkflowRuntime, TreeSearchFilter, List<TransitionClassifier>, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForCommandTransitionsAsync(WorkflowRuntime, Guid, List<TransitionClassifier>, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForDirectAndUndefinedCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForDirectAndUndefinedCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForDirectCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForDirectCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForReverseCommandTransitions(WorkflowRuntime, Guid, bool, string)
- WorkflowRuntimeGetActorsWithCommandsApi.GetAllActorsWithCommandsForReverseCommandTransitionsAsync(WorkflowRuntime, Guid, bool, string, CancellationToken)
- WorkflowRuntimeTimeExtensions.ToRuntimeTime(WorkflowRuntime, DateTime)
- WorkflowRuntimeTimeExtensions.ToRuntimeTime(WorkflowRuntime, DateTime?)
- Designer.DesignerAPI(WorkflowRuntime, NameValueCollection, out bool, Stream, bool)
- Designer.DesignerAPI(WorkflowRuntime, NameValueCollection, Stream, bool)
- Designer.DesignerAPIAsync(WorkflowRuntime, NameValueCollection, Stream, bool)
- Extensions.CastAs<T>(object)
- Extensions.ExtendedEquals(object, object)
- Extensions.TryCast<T>(object, out T)