Interface ITimerManager
Interface of a timer manager, which control timers functioning inside a workflow runtime
Namespace: OptimaJet.Workflow.Core.Runtime
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic interface ITimerManager
Methods
RequestTimerValueAsync(ProcessInstance, ActivityDefinition)
Sends request for timer value for all timer transitions that are outgoing from the CurrentActivity if timer value is equal 0 or -1
DeclarationTask RequestTimerValueAsync(ProcessInstance processInstance, ActivityDefinition activity = null)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
ActivityDefinition | activity | Activity to get outbound transition, if null the CurrentActivity will be used |
ReturnsReturns transitions triggered by a timer which value is equal to 0
DeclarationIEnumerable<TransitionDefinition> GetTransitionsForImmediateExecution(ProcessInstance processInstance, ActivityDefinition activity = null)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
ActivityDefinition | activity | Activity to get outbound transition, if null the CurrentActivity will be used |
ReturnsType | Description |
---|
IEnumerable<TransitionDefinition> | |
SetTimerValue(ProcessInstance, string, DateTime)
Sets new value of named timer
Declarationvoid 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 |
SetTimerValue(Guid, string, DateTime)
Sets new value of named timer
DeclarationTask 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 |
ReturnsResetTimerValue(ProcessInstance, string)
Resets value of named timer
Declarationvoid ResetTimerValue(ProcessInstance processInstance, string timerName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance |
string | timerName | Timer name in Scheme |
ResetTimerValue(Guid, string)
Resets value of named timer
DeclarationTask ResetTimerValue(Guid processId, string timerName)
ParametersType | Name | Description |
---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
ReturnsRegisterTimersAsync(ProcessInstance)
Register all timers for all outgouing timer transitions for current actvity of the specified process.
All timers registered before which are present in transitions will be rewrited except timers marked as NotOverrideIfExists TimerDefinition
DeclarationTask RegisterTimersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance whose timers need to be registered |
ReturnsGetTimersToRegister(ProcessDefinition, string)
DeclarationList<TimerToRegister> GetTimersToRegister(ProcessDefinition processDefinition, string activityName)
ParametersType | Name | Description |
---|
ProcessDefinition | processDefinition | |
string | activityName | |
ReturnsType | Description |
---|
List<TimerToRegister> | |
GetTimersToRegister(ProcessInstance, string)
DeclarationList<TimerToRegister> GetTimersToRegister(ProcessInstance processInstance, string activityName)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | |
string | activityName | |
ReturnsType | Description |
---|
List<TimerToRegister> | |
ClearAndRegisterTimersAsync(ProcessInstance)
Clear timers ITimerManager.ClearTimersAsync(ProcessInstance) and then register new timers ITimerManager.RegisterTimersAsync(ProcessInstance)
DeclarationTask ClearAndRegisterTimersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance whose timers need to be cleared an registered |
ReturnsClearTimersAsync(ProcessInstance)
Clear all registerd timers except present in outgouing timer transitions for current actvity of the specified process and marked as NotOverrideIfExists TimerDefinition
DeclarationTask ClearTimersAsync(ProcessInstance processInstance)
ParametersType | Name | Description |
---|
ProcessInstance | processInstance | Process instance whose timers need to be cleared |
ReturnsInit(WorkflowRuntime)
Declarationvoid Init(WorkflowRuntime runtime)
ParametersType | Name | Description |
---|
WorkflowRuntime | runtime | |
StartAsync(int?)
Starts the timer
DeclarationTask StartAsync(int? timeout = null)
ParametersType | Name | Description |
---|
int? | timeout | Wait timeout in milliseconds |
ReturnsStop(int?)
Stops the timer
Declarationvoid Stop(int? timeout = null)
ParametersType | Name | Description |
---|
int? | timeout | Wait timeout in milliseconds |
Refresh()
Refresh interval of the timer
DeclarationExtension Methods