Workflow Engine .NET  2
Public Member Functions | Properties | List of all members
OptimaJet.Workflow.Core.Persistence.IPersistenceProvider Interface Reference

Interface of a persistence provider, which provide storing of process's instance specific parameters and global parameters More...

Public Member Functions

void Init (WorkflowRuntime runtime)
 Init the provider More...
 
void InitializeProcess (ProcessInstance processInstance)
 Initialize a process instance in persistence store More...
 
void FillProcessParameters (ProcessInstance processInstance)
 Fills system ParameterPurpose.System and persisted ParameterPurpose.Persistence parameters of the process More...
 
void FillPersistedProcessParameters (ProcessInstance processInstance)
 Fills persisted ParameterPurpose.Persistence parameters of the process More...
 
void FillSystemProcessParameters (ProcessInstance processInstance)
 Fills system ParameterPurpose.System parameters of the process More...
 
void SavePersistenceParameters (ProcessInstance processInstance)
 Saves persisted ParameterPurpose.Persistence parameters of the process to store More...
 
void SetWorkflowIniialized (ProcessInstance processInstance)
 Set process instance status to ProcessStatus.Initialized More...
 
void SetWorkflowIdled (ProcessInstance processInstance)
 Set process instance status to ProcessStatus.Idled More...
 
void SetWorkflowRunning (ProcessInstance processInstance)
 Set process instance status to ProcessStatus.Running More...
 
void SetWorkflowFinalized (ProcessInstance processInstance)
 Set process instance status to ProcessStatus.Finalized More...
 
void SetWorkflowTerminated (ProcessInstance processInstance, ErrorLevel level, string errorMessage)
 Set process instance status to ProcessStatus.Terminated More...
 
void ResetWorkflowRunning ()
 Resets all process to ProcessStatus.Idled status More...
 
void UpdatePersistenceState (ProcessInstance processInstance, TransitionDefinition transition)
 Updates system parameters of the process in the store More...
 
bool IsProcessExists (Guid processId)
 Checks existence of the process More...
 
ProcessStatus GetInstanceStatus (Guid processId)
 Returns status of the process ProcessStatus More...
 
void BindProcessToNewScheme (ProcessInstance processInstance)
 Saves information about changed scheme to the store More...
 
void BindProcessToNewScheme (ProcessInstance processInstance, bool resetIsDeterminingParametersChanged)
 Saves information about changed scheme to the store More...
 
void RegisterTimer (Guid processId, string name, DateTime nextExecutionDateTime, bool notOverrideIfExists)
 Register a new timer More...
 
void ClearTimers (Guid processId, List< string > timersIgnoreList)
 Removes all timers from the store, exlude listed in ignore list More...
 
void ClearTimersIgnore ()
 Clears sign Ignore for all timers More...
 
void ClearTimerIgnore (Guid timerId)
 Clears sign Ignore for specific timers More...
 
void ClearTimer (Guid timerId)
 Remove specific timer More...
 
DateTime GetCloseExecutionDateTime ()
 Get closest execution date and time for all timers More...
 
List< TimerToExecuteGetTimersToExecute ()
 Get all timers which must be executed at this moment of time More...
 
void DeleteProcess (Guid processId)
 Remove all information about the process from the store More...
 
void DeleteProcess (Guid[] processIds)
 Remove all information about the process from the store More...
 
void SaveGlobalParameter< T > (string type, string name, T value)
 Saves a global parameter value More...
 
LoadGlobalParameter< T > (string type, string name)
 Returns a global parameter value More...
 
List< T > LoadGlobalParameters< T > (string type)
 Returns a global parameter value More...
 
void DeleteGlobalParameters (string type, string name=null)
 Deletes a global parameter More...
 
List< ProcessHistoryItemGetProcessHistory (Guid processId)
 Returns the history of process More...
 
Task BulkInitProcesses (List< ProcessInstance > instances, ProcessStatus status, CancellationToken token)
 
Task BulkInitProcesses (List< ProcessInstance > instances, List< TimerToRegister > timers, ProcessStatus status, CancellationToken token)
 

Properties

bool IsBulkOperationsSupported [get]
 

Detailed Description

Interface of a persistence provider, which provide storing of process's instance specific parameters and global parameters

Member Function Documentation

◆ BindProcessToNewScheme() [1/2]

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.BindProcessToNewScheme ( ProcessInstance  processInstance)

Saves information about changed scheme to the store

Parameters
processInstanceInstance of the process whith changed scheme ProcessInstance.ProcessScheme

◆ BindProcessToNewScheme() [2/2]

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.BindProcessToNewScheme ( ProcessInstance  processInstance,
bool  resetIsDeterminingParametersChanged 
)

Saves information about changed scheme to the store

Parameters
processInstanceInstance of the process whith changed scheme ProcessInstance.ProcessScheme
resetIsDeterminingParametersChangedTrue if required to reset IsDeterminingParametersChanged flag ProcessInstance.IsDeterminingParametersChanged
Exceptions
ProcessNotFoundException

◆ ClearTimer()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.ClearTimer ( Guid  timerId)

Remove specific timer

Parameters
timerIdId of the timer

◆ ClearTimerIgnore()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.ClearTimerIgnore ( Guid  timerId)

Clears sign Ignore for specific timers

◆ ClearTimers()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.ClearTimers ( Guid  processId,
List< string >  timersIgnoreList 
)

Removes all timers from the store, exlude listed in ignore list

Parameters
processIdId of the process
timersIgnoreListIgnore list

◆ ClearTimersIgnore()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.ClearTimersIgnore ( )

Clears sign Ignore for all timers

◆ DeleteGlobalParameters()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.DeleteGlobalParameters ( string  type,
string  name = null 
)

Deletes a global parameter

Parameters
typeLogical type of the parameter
nameName of the parameter

◆ DeleteProcess() [1/2]

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.DeleteProcess ( Guid  processId)

Remove all information about the process from the store

Parameters
processIdId of the process

◆ DeleteProcess() [2/2]

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.DeleteProcess ( Guid []  processIds)

Remove all information about the process from the store

Parameters
processIdsList of ids of the process

◆ FillPersistedProcessParameters()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.FillPersistedProcessParameters ( ProcessInstance  processInstance)

Fills persisted ParameterPurpose.Persistence parameters of the process

Parameters
processInstanceInstance of the process

◆ FillProcessParameters()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.FillProcessParameters ( ProcessInstance  processInstance)

Fills system ParameterPurpose.System and persisted ParameterPurpose.Persistence parameters of the process

Parameters
processInstanceInstance of the process

◆ FillSystemProcessParameters()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.FillSystemProcessParameters ( ProcessInstance  processInstance)

Fills system ParameterPurpose.System parameters of the process

Parameters
processInstanceInstance of the process

◆ GetCloseExecutionDateTime()

DateTime OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.GetCloseExecutionDateTime ( )

Get closest execution date and time for all timers

Returns

◆ GetInstanceStatus()

ProcessStatus OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.GetInstanceStatus ( Guid  processId)

Returns status of the process ProcessStatus

Parameters
processIdId of the process
Returns
Status of the process

◆ GetProcessHistory()

List<ProcessHistoryItem> OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.GetProcessHistory ( Guid  processId)

Returns the history of process

Parameters
processIdId of the process
Returns

◆ GetTimersToExecute()

List<TimerToExecute> OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.GetTimersToExecute ( )

Get all timers which must be executed at this moment of time

Returns
List of timers to execute

◆ Init()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.Init ( WorkflowRuntime  runtime)

Init the provider

Parameters
runtimeWorkflow runtime instance which owned the provider

◆ InitializeProcess()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.InitializeProcess ( ProcessInstance  processInstance)

Initialize a process instance in persistence store

Parameters
processInstanceInstance of the process
Exceptions
ProcessAlreadyExistsException

◆ IsProcessExists()

bool OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.IsProcessExists ( Guid  processId)

Checks existence of the process

Parameters
processIdId of the process
Returns

◆ LoadGlobalParameter< T >()

T OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.LoadGlobalParameter< T > ( string  type,
string  name 
)

Returns a global parameter value

Template Parameters
TSystem type of the parameter
Parameters
typeLogical type of the parameter
nameName of the parameter
Returns
Value of the parameter

◆ LoadGlobalParameters< T >()

List<T> OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.LoadGlobalParameters< T > ( string  type)

Returns a global parameter value

Template Parameters
TSystem type of the parameter
Parameters
typeLogical type of the parameter
Returns
List of the values of the parameters

◆ RegisterTimer()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.RegisterTimer ( Guid  processId,
string  name,
DateTime  nextExecutionDateTime,
bool  notOverrideIfExists 
)

Register a new timer

Parameters
processIdId of the process
nameTimer name TimerDefinition.Name
nextExecutionDateTimeNext date and time of timer's execution
notOverrideIfExistsIf true specifies that the existing timer with same name will not be overriden TimerDefinition.NotOverrideIfExists

◆ ResetWorkflowRunning()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.ResetWorkflowRunning ( )

Resets all process to ProcessStatus.Idled status

◆ SaveGlobalParameter< T >()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SaveGlobalParameter< T > ( string  type,
string  name,
value 
)

Saves a global parameter value

Template Parameters
TSystem type of the parameter
Parameters
typeLogical type of the parameter
nameName of the parameter
valueValue of the parameter

◆ SavePersistenceParameters()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SavePersistenceParameters ( ProcessInstance  processInstance)

Saves persisted ParameterPurpose.Persistence parameters of the process to store

Parameters
processInstanceInstance of the process

◆ SetWorkflowFinalized()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SetWorkflowFinalized ( ProcessInstance  processInstance)

Set process instance status to ProcessStatus.Finalized

Parameters
processInstanceInstance of the process
Exceptions
ImpossibleToSetStatusException

◆ SetWorkflowIdled()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SetWorkflowIdled ( ProcessInstance  processInstance)

Set process instance status to ProcessStatus.Idled

Parameters
processInstanceInstance of the process
Exceptions
ImpossibleToSetStatusException

◆ SetWorkflowIniialized()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SetWorkflowIniialized ( ProcessInstance  processInstance)

Set process instance status to ProcessStatus.Initialized

Parameters
processInstanceInstance of the process
Exceptions
ImpossibleToSetStatusException

◆ SetWorkflowRunning()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SetWorkflowRunning ( ProcessInstance  processInstance)

Set process instance status to ProcessStatus.Running

Parameters
processInstanceInstance of the process
Exceptions
ImpossibleToSetStatusException

◆ SetWorkflowTerminated()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.SetWorkflowTerminated ( ProcessInstance  processInstance,
ErrorLevel  level,
string  errorMessage 
)

Set process instance status to ProcessStatus.Terminated

Parameters
processInstanceInstance of the process
Exceptions
ImpossibleToSetStatusException

◆ UpdatePersistenceState()

void OptimaJet.Workflow.Core.Persistence.IPersistenceProvider.UpdatePersistenceState ( ProcessInstance  processInstance,
TransitionDefinition  transition 
)

Updates system parameters of the process in the store

Parameters
processInstanceInstance of the process
transitionLast executed transition