Class TimerManagerBase
Inheritance
↳ object
↳ TimerManagerBase
↳ MultiServerTimeManager
↳ SingleServerTimerManager
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
MemberwiseClone()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Runtime.Timers
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic abstract class TimerManagerBase
Constructors
TimerManagerBase()
Timer manager constructor
Declarationpublic TimerManagerBase()
Properties
ImmediateTimerValue
Value of Unspecified Timer which indicates that the timer transition will be executed immediately
Declarationpublic string ImmediateTimerValue { get; }
Type | Description |
---|---|
string |
InfinityTimerValue
Value of Unspecified Timer which indicates that the timer transition will be never executed
Declarationpublic string InfinityTimerValue { get; }
Type | Description |
---|---|
string |
DefaultWaitTimeout
Wait timeout for start/stop operations in milliseconds. Default value is 1000.
Declarationpublic int DefaultWaitTimeout { get; set; }
Type | Description |
---|---|
int |
Stopped
Declarationprotected abstract bool Stopped { get; }
Type | Description |
---|---|
bool |
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
Declarationpublic Task RequestTimerValueAsync(ProcessInstance processInstance, ActivityDefinition activity = null)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance |
ActivityDefinition | activity |
Type | Description |
---|---|
Task |
GetTransitionsForImmediateExecution(ProcessInstance, ActivityDefinition)
Returns transitions triggered by a timer which value is equal to 0
Declarationpublic IEnumerable<TransitionDefinition> GetTransitionsForImmediateExecution(ProcessInstance processInstance, ActivityDefinition activity = null)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance |
ActivityDefinition | activity |
Type | Description |
---|---|
IEnumerable<TransitionDefinition> |
SetTimerValue(ProcessInstance, string, DateTime)
Sets new value of named timer
Declarationpublic void SetTimerValue(ProcessInstance processInstance, string timerName, DateTime newValue)
Type | 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
Declarationpublic Task SetTimerValue(Guid processId, string timerName, DateTime newValue)
Type | Name | Description |
---|---|---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
DateTime | newValue | New value of the timer |
Type | Description |
---|---|
Task |
StopTimerInternal()
Declarationprotected abstract void StopTimerInternal()
StartTimerInternalAsync()
Declarationprotected abstract Task StartTimerInternalAsync()
Type | Description |
---|---|
Task |
ResetTimerValue(ProcessInstance, string)
Resets value of named timer
Declarationpublic void ResetTimerValue(ProcessInstance processInstance, string timerName)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance |
string | timerName | Timer name in Scheme |
ResetTimerValue(Guid, string)
Resets value of named timer
Declarationpublic Task ResetTimerValue(Guid processId, string timerName)
Type | Name | Description |
---|---|---|
Guid | processId | Process id |
string | timerName | Timer name in Scheme |
Type | Description |
---|---|
Task |
RegisterTimersAsync(ProcessInstance)
Register all timers for all outgoing timer transitions for current activity of the specified process. All timers registered before which are present in transitions will be rewritten except timers marked as NotOverrideIfExists TimerDefinition
Declarationpublic Task RegisterTimersAsync(ProcessInstance processInstance)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance whose timers need to be registered |
Type | Description |
---|---|
Task |
ClearAndRegisterTimersAsync(ProcessInstance)
Clear timers TimerManagerBase.ClearTimersAsync(ProcessInstance) and then register new timers TimerManagerBase.RegisterTimersAsync(ProcessInstance)
Declarationpublic Task ClearAndRegisterTimersAsync(ProcessInstance processInstance)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance whose timers need to be cleared an registered |
Type | Description |
---|---|
Task |
ClearTimersAsync(ProcessInstance)
Clear all registered timers except present in outgoing timer transitions for current activity of the specified process and marked as NotOverrideIfExists TimerDefinition
Declarationpublic Task ClearTimersAsync(ProcessInstance processInstance)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | Process instance whose timers need to be cleared |
Type | Description |
---|---|
Task |
Refresh()
Refresh interval of the timer
Declarationpublic abstract void Refresh()
GetTimersToRegister(ProcessDefinition, string)
Declarationpublic List<TimerToRegister> GetTimersToRegister(ProcessDefinition processDefinition, string activityName)
Type | Name | Description |
---|---|---|
ProcessDefinition | processDefinition | |
string | activityName |
Type | Description |
---|---|
List<TimerToRegister> |
GetTimersToRegister(ProcessInstance, string)
Declarationpublic List<TimerToRegister> GetTimersToRegister(ProcessInstance processInstance, string activityName)
Type | Name | Description |
---|---|---|
ProcessInstance | processInstance | |
string | activityName |
Type | Description |
---|---|
List<TimerToRegister> |
Fields
_startStopSemaphore
Declarationprotected readonly SemaphoreSlim _startStopSemaphore
Type | Description |
---|---|
SemaphoreSlim |
_runtime
Declarationprotected WorkflowRuntime _runtime
Type | Description |
---|---|
WorkflowRuntime |
Events
OnNeedTimerValue
Raises when the timer value must be obtained
Declarationpublic event EventHandler<NeedTimerValueEventArgs> OnNeedTimerValue
Type | Description |
---|---|
EventHandler<NeedTimerValueEventArgs> |
OnNeedTimerValueAsync
Raises when the timer value must be obtained
Declarationpublic event AsyncEventHandler<NeedTimerValueEventArgs> OnNeedTimerValueAsync
Type | Description |
---|---|
AsyncEventHandler<NeedTimerValueEventArgs> |