Workflow Engine .NET  2
Public Member Functions | Properties | Events | List of all members
OptimaJet.Workflow.Core.Runtime.ITimerManager Interface Reference

Interface of a timer manager, which control timers functioning inside a workflow runtime More...

Inheritance diagram for OptimaJet.Workflow.Core.Runtime.ITimerManager:
OptimaJet.Workflow.Core.Runtime.TimerManager

Public Member Functions

void RequestTimerValue (ProcessInstance processInstance, ActivityDefinition activity=null)
 Sends request for timer value for all timer transitions that are outgoing from the CurrentActivity if timer value is equal 0 or -1 More...
 
IEnumerable< TransitionDefinitionGetTransitionsForImmediateExecution (ProcessInstance processInstance, ActivityDefinition activity=null)
 Returns transitions triggered by a timer which value is equal to 0 More...
 
void SetTimerValue (ProcessInstance processInstance, string timerName, DateTime newValue)
 Sets new value of named timer More...
 
Task SetTimerValue (Guid processId, string timerName, DateTime newValue)
 Sets new value of named timer More...
 
void ResetTimerValue (ProcessInstance processInstance, string timerName)
 Resets value of named timer More...
 
Task ResetTimerValue (Guid processId, string timerName)
 Resets value of named timer More...
 
void RegisterTimers (ProcessInstance 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 More...
 
List< TimerToRegisterGetTimersToRegister (ProcessDefinition processDefinition, string activityName)
 
List< TimerToRegisterGetTimersToRegister (ProcessInstance processInstance, string activityName)
 
void ClearAndRegisterTimers (ProcessInstance processInstance)
 Clear timers ClearTimers and then register new timers RegisterTimers More...
 
void ClearTimers (ProcessInstance processInstance)
 Clear all registerd timers except present in outgouing timer transitions for current actvity of the specified process and marked as NotOverrideIfExists TimerDefinition More...
 
void Init (WorkflowRuntime runtime)
 
void Start (int? timeout=null)
 Starts the timer More...
 
void Stop (int? timeout=null)
 Stops the timer More...
 
void Refresh ()
 Refresh interval of the timer More...
 

Properties

string ImmediateTimerValue [get]
 Value of Unspecified Timer which indicates that the timer transition will be executed immediately More...
 
string InfinityTimerValue [get]
 Value of Unspecified Timer which indicates that the timer transition will be never executed More...
 

Events

EventHandler< NeedTimerValueEventArgsNeedTimerValue
 Raises when the timer value must be obtained More...
 

Detailed Description

Interface of a timer manager, which control timers functioning inside a workflow runtime

Member Function Documentation

◆ ClearAndRegisterTimers()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.ClearAndRegisterTimers ( ProcessInstance  processInstance)

Clear timers ClearTimers and then register new timers RegisterTimers

Parameters
processInstanceProcess instance whose timers need to be cleared an registered

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ ClearTimers()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.ClearTimers ( ProcessInstance  processInstance)

Clear all registerd timers except present in outgouing timer transitions for current actvity of the specified process and marked as NotOverrideIfExists TimerDefinition

Parameters
processInstanceProcess instance whose timers need to be cleared

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ GetTransitionsForImmediateExecution()

IEnumerable<TransitionDefinition> OptimaJet.Workflow.Core.Runtime.ITimerManager.GetTransitionsForImmediateExecution ( ProcessInstance  processInstance,
ActivityDefinition  activity = null 
)

Returns transitions triggered by a timer which value is equal to 0

Parameters
processInstanceProcess instance
activityActivity to get outbound transition, if null the CurrentActivity will be used
Returns

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ Refresh()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.Refresh ( )

Refresh interval of the timer

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ RegisterTimers()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.RegisterTimers ( ProcessInstance  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

Parameters
processInstanceProcess instance whose timers need to be registered

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ RequestTimerValue()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.RequestTimerValue ( ProcessInstance  processInstance,
ActivityDefinition  activity = null 
)

Sends request for timer value for all timer transitions that are outgoing from the CurrentActivity if timer value is equal 0 or -1

Parameters
activityActivity to get outbound transition, if null the CurrentActivity will be used
processInstanceProcess instance

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ ResetTimerValue() [1/2]

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

Resets value of named timer

Parameters
processInstanceProcess instance
timerNameTimer name in Scheme

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ ResetTimerValue() [2/2]

Task OptimaJet.Workflow.Core.Runtime.ITimerManager.ResetTimerValue ( Guid  processId,
string  timerName 
)

Resets value of named timer

Parameters
processIdProcess id
timerNameTimer name in Scheme

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ SetTimerValue() [1/2]

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

Sets new value of named timer

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

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ SetTimerValue() [2/2]

Task OptimaJet.Workflow.Core.Runtime.ITimerManager.SetTimerValue ( Guid  processId,
string  timerName,
DateTime  newValue 
)

Sets new value of named timer

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

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ Start()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.Start ( int?  timeout = null)

Starts the timer

param name="timeout">Wait timeout in milliseconds

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

◆ Stop()

void OptimaJet.Workflow.Core.Runtime.ITimerManager.Stop ( int?  timeout = null)

Stops the timer

param name="timeout">Wait timeout in milliseconds

Implemented in OptimaJet.Workflow.Core.Runtime.TimerManager.

Property Documentation

◆ ImmediateTimerValue

string OptimaJet.Workflow.Core.Runtime.ITimerManager.ImmediateTimerValue
get

Value of Unspecified Timer which indicates that the timer transition will be executed immediately

◆ InfinityTimerValue

string OptimaJet.Workflow.Core.Runtime.ITimerManager.InfinityTimerValue
get

Value of Unspecified Timer which indicates that the timer transition will be never executed

Event Documentation

◆ NeedTimerValue

EventHandler<NeedTimerValueEventArgs> OptimaJet.Workflow.Core.Runtime.ITimerManager.NeedTimerValue

Raises when the timer value must be obtained