Workflow Engine .NET  2
Public Member Functions | List of all members
OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium > Class Template Reference

Base workflow builder, which convert not parsed process scheme SchemeDefinition<T> to the object model of a scheme of a process ProcessDefinition More...

Inheritance diagram for OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >:
OptimaJet.Workflow.Core.Builder.IWorkflowBuilder

Public Member Functions

 WorkflowBuilder (IWorkflowGenerator< TSchemeMedium > generator, IWorkflowParser< TSchemeMedium > parser, ISchemePersistenceProvider< TSchemeMedium > schemePersistenceProvider)
 Create WorkflowBuilder object More...
 
ProcessDefinition GetProcessScheme (Guid schemeId)
 Returns process scheme by specific id, if scheme not exists creates it More...
 
ProcessDefinition GetProcessScheme (string schemeCode)
 Returns process scheme by specific name, if scheme not exists creates it More...
 
ProcessDefinition GetProcessScheme (string schemeCode, IDictionary< string, object > parameters)
 Returns process scheme by specific name and parameters for creating the scheme of the process, if scheme not exists creates it More...
 
ProcessInstance CreateNewProcess (Guid processId, string schemeCode, IDictionary< string, object > parameters)
 Create new instance of the process. More...
 
ProcessInstance CreateNewSubprocess (Guid processId, ProcessInstance parentProcessInstance, TransitionDefinition startingTransition)
 
ProcessInstance GetProcessInstance (Guid processId)
 Returns existing process instance More...
 
ProcessDefinition CreateNewProcessScheme (string schemeCode, IDictionary< string, object > parameters)
 Create new scheme for existing process More...
 
ProcessDefinition CreateNewSubprocessScheme (ProcessDefinition parentProcessScheme, TransitionDefinition startingTransition)
 
void SetCache (IParsedProcessCache cache)
 Sets the cache to store parsed ProcessDefinition objects ProcessDefinition More...
 
void RemoveCache ()
 Removes the cache to store parsed ProcessDefinition objects ProcessDefinition More...
 
void SetSchemeIsObsolete (string schemeCode, Dictionary< string, object > parameters)
 Set IsObsolete sign to the scheme with specific name and parameters for creating the scheme of the process More...
 
void SetSchemeIsObsolete (string schemeCode)
 Set IsObsolete sign to the scheme with specific name More...
 
ProcessDefinition GetProcessSchemeForDesigner (string code)
 Returns existing process scheme directly from scheme persistence store More...
 
void SaveProcessScheme (string schemecode, ProcessDefinition pd)
 Saves process scheme to scheme persistence store More...
 
ProcessDefinition Parse (string scheme)
 Parses process scheme from the string More...
 
string Serialize (ProcessDefinition processDefinition)
 Serialize process scheme to the string More...
 

Detailed Description

Base workflow builder, which convert not parsed process scheme SchemeDefinition<T> to the object model of a scheme of a process ProcessDefinition

Template Parameters
TSchemeMediumType of not parsed scheme SchemeDefinition<T>
Type Constraints
TSchemeMedium :class 

Constructor & Destructor Documentation

◆ WorkflowBuilder()

OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.WorkflowBuilder ( IWorkflowGenerator< TSchemeMedium >  generator,
IWorkflowParser< TSchemeMedium >  parser,
ISchemePersistenceProvider< TSchemeMedium >  schemePersistenceProvider 
)

Create WorkflowBuilder object

Parameters
generatorNot parsed scheme generator IWorkflowGenerator<T>
parserParser from not parsed process scheme SchemeDefinition<T> to the object model of a scheme of a process ProcessDefinition
schemePersistenceProviderScheme persistemce provider ISchemePersistenceProvider<T>

Member Function Documentation

◆ CreateNewProcess()

ProcessInstance OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.CreateNewProcess ( Guid  processId,
string  schemeCode,
IDictionary< string, object >  parameters 
)

Create new instance of the process.

Parameters
schemeCodeCode of the scheme
processIdProcess id
parametersThe parameters for creating the scheme of the process
Returns
ProcessInstance object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ CreateNewProcessScheme()

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.CreateNewProcessScheme ( string  schemeCode,
IDictionary< string, object >  parameters 
)

Create new scheme for existing process

Parameters
schemeCodeCode of the scheme
parametersThe parameters for creating scheme of process
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ GetProcessInstance()

ProcessInstance OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.GetProcessInstance ( Guid  processId)

Returns existing process instance

Parameters
processIdProcess id
Returns
ProcessInstance object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ GetProcessScheme() [1/3]

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.GetProcessScheme ( Guid  schemeId)

Returns process scheme by specific id, if scheme not exists creates it

Parameters
schemeIdId of the scheme
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ GetProcessScheme() [2/3]

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.GetProcessScheme ( string  schemeCode)

Returns process scheme by specific name, if scheme not exists creates it

Parameters
schemeCodeName of the scheme
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ GetProcessScheme() [3/3]

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.GetProcessScheme ( string  schemeCode,
IDictionary< string, object >  parameters 
)

Returns process scheme by specific name and parameters for creating the scheme of the process, if scheme not exists creates it

Parameters
schemeCodeName of the scheme
parametersThe parameters for creating the scheme of the process
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ GetProcessSchemeForDesigner()

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.GetProcessSchemeForDesigner ( string  code)

Returns existing process scheme directly from scheme persistence store

Parameters
codeName of the scheme
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ Parse()

ProcessDefinition OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.Parse ( string  scheme)

Parses process scheme from the string

Parameters
schemeString representation of not parsed scheme
Returns
ProcessDefinition object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ RemoveCache()

void OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.RemoveCache ( )

Removes the cache to store parsed ProcessDefinition objects ProcessDefinition

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ SaveProcessScheme()

void OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.SaveProcessScheme ( string  schemecode,
ProcessDefinition  pd 
)

Saves process scheme to scheme persistence store

Parameters
schemecodeCode of the scheme
pdObject representation of the scheme

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ Serialize()

string OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.Serialize ( ProcessDefinition  processDefinition)

Serialize process scheme to the string

Parameters
processDefinitionSProcessDefinition object
Returns
String representation of not parsed scheme

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ SetCache()

void OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.SetCache ( IParsedProcessCache  cache)

Sets the cache to store parsed ProcessDefinition objects ProcessDefinition

Parameters
cacheInstance of cache object

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ SetSchemeIsObsolete() [1/2]

void OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.SetSchemeIsObsolete ( string  schemeCode,
Dictionary< string, object >  parameters 
)

Set IsObsolete sign to the scheme with specific name and parameters for creating the scheme of the process

Parameters
schemeCodeName of the scheme
parametersThe parameters for creating the scheme of the process

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.

◆ SetSchemeIsObsolete() [2/2]

void OptimaJet.Workflow.Core.Builder.WorkflowBuilder< TSchemeMedium >.SetSchemeIsObsolete ( string  schemeCode)

Set IsObsolete sign to the scheme with specific name

Parameters
schemeCodeName of the scheme

Implements OptimaJet.Workflow.Core.Builder.IWorkflowBuilder.