Class ProcessDefinitionBuilder
Provides methods to build and manipulate a workflow process definition
Inheritance
↳ object
↳ ProcessDefinitionBuilder
Implements
IProcessDefinitionBuilder
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model.Builder
Assembly: OptimaJet.Workflow.Core.dll
Syntax
public sealed class ProcessDefinitionBuilder : IProcessDefinitionBuilder
Properties
ProcessDefinition
Gets the process definition being built.
Declaration
public ProcessDefinition ProcessDefinition { get; }
Property value
Type | Description |
---|
ProcessDefinition | |
Methods
Create(string)
Creates a new instance of ProcessDefinitionBuilder with a specified process name.
Declaration
public static IProcessDefinitionBuilder Create(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the process. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
WithProcessDefinition(ProcessDefinition)
Creates a new instance of ProcessDefinitionBuilder with a cloned process definition.
Declaration
public static IProcessDefinitionBuilder WithProcessDefinition(ProcessDefinition processDefinition)
Parameters
Type | Name | Description |
---|
ProcessDefinition | processDefinition | The process definition to clone. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
WithMutableProcessDefinition(ProcessDefinition)
Creates a new instance of ProcessDefinitionBuilder with a mutable process definition.
Declaration
public static IProcessDefinitionBuilder WithMutableProcessDefinition(ProcessDefinition processDefinition)
Parameters
Type | Name | Description |
---|
ProcessDefinition | processDefinition | The process definition to use. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateActor(string, string)
Creates a new actor with the specified name and rule.
Declaration
public IActorBuilder CreateActor(string name, string rule)
Parameters
Type | Name | Description |
---|
string | name | The name of the actor. |
string | rule | The rule associated with the actor. |
Returns
Type | Description |
---|
IActorBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActorBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateActor(string, string)
Creates or updates an actor with the specified name and rule.
Declaration
public IActorBuilder CreateOrUpdateActor(string name, string rule)
Parameters
Type | Name | Description |
---|
string | name | The name of the actor. |
string | rule | The rule associated with the actor. |
Returns
Type | Description |
---|
IActorBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActorBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateActor(string)
Updates an existing actor with the specified name.
Declaration
public IActorBuilder UpdateActor(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the actor to update. |
Returns
Type | Description |
---|
IActorBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActorBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteActor(string)
Deletes an actor with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteActor(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the actor to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateParameter(string, Type, ParameterPurpose)
Creates a new parameter with the specified name, type, and purpose.
Declaration
public IParameterBuilder CreateParameter(string name, Type type, ParameterPurpose purpose = ParameterPurpose.Temporary)
Parameters
Type | Name | Description |
---|
string | name | The name of the parameter. |
Type | type | The type of the parameter. |
ParameterPurpose | purpose | The purpose of the parameter. |
Returns
Type | Description |
---|
IParameterBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IParameterBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateParameter(string, Type, ParameterPurpose)
Creates or updates a parameter with the specified name, type, and purpose.
Declaration
public IParameterBuilder CreateOrUpdateParameter(string name, Type type, ParameterPurpose purpose)
Parameters
Type | Name | Description |
---|
string | name | The name of the parameter. |
Type | type | The type of the parameter. |
ParameterPurpose | purpose | The purpose of the parameter. |
Returns
Type | Description |
---|
IParameterBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IParameterBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateParameter(string)
Updates an existing parameter with the specified name.
Declaration
public IParameterBuilder UpdateParameter(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the parameter to update. |
Returns
Type | Description |
---|
IParameterBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IParameterBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteParameter(string)
Deletes a parameter with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteParameter(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the parameter to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateCommand(string)
Creates a new command with the specified name.
Declaration
public ICommandBuilder CreateCommand(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the command. |
Returns
Type | Description |
---|
ICommandBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ICommandBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateCommand(string)
Creates or updates a command with the specified name.
Declaration
public ICommandBuilder CreateOrUpdateCommand(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the command. |
Returns
Type | Description |
---|
ICommandBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ICommandBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateCommand(string)
Updates an existing command with the specified name.
Declaration
public ICommandBuilder UpdateCommand(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the command to update. |
Returns
Type | Description |
---|
ICommandBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ICommandBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteCommand(string)
Deletes a command with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteCommand(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the command to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateTimer(string)
Creates a new timer with the specified name.
Declaration
public ITimerBuilder CreateTimer(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the timer. |
Returns
Type | Description |
---|
ITimerBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITimerBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateTimer(string)
Creates or updates a timer with the specified name.
Declaration
public ITimerBuilder CreateOrUpdateTimer(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the timer. |
Returns
Type | Description |
---|
ITimerBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITimerBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateTimer(string)
Updates an existing timer with the specified name.
Declaration
public ITimerBuilder UpdateTimer(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the timer to update. |
Returns
Type | Description |
---|
ITimerBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITimerBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteTimer(string)
Deletes a timer with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteTimer(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the timer to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateActivity(string)
Creates a new activity with the specified name.
Declaration
public IActivityBuilder CreateActivity(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity. |
Returns
Type | Description |
---|
IActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
AddActivity(ActivityDefinition)
Adds an activity definition to the process.
Declaration
public IActivityBuilder AddActivity(ActivityDefinition activity)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | The activity definition to add. |
Returns
Type | Description |
---|
IActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateInlineActivity(string, string)
Creates a new inline activity with the specified name and scheme code.
Declaration
public IInlineActivityBuilder CreateInlineActivity(string name, string schemeCode)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity. |
string | schemeCode | The scheme code of the activity. |
Returns
Type | Description |
---|
IInlineActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IInlineActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateActivity(string)
Creates or updates an activity with the specified name.
Declaration
public IActivityBuilder CreateOrUpdateActivity(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity. |
Returns
Type | Description |
---|
IActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateInlineActivity(string, string)
Creates or updates an inline activity with the specified name and scheme code.
Declaration
public IInlineActivityBuilder CreateOrUpdateInlineActivity(string name, string schemeCode)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity. |
string | schemeCode | The scheme code of the activity. |
Returns
Type | Description |
---|
IInlineActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IInlineActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateActivity(string)
Updates an existing activity with the specified name.
Declaration
public IActivityBuilder UpdateActivity(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity to update. |
Returns
Type | Description |
---|
IActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateInlineActivity(string)
Updates an existing inline activity with the specified name.
Declaration
public IInlineActivityBuilder UpdateInlineActivity(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity to update. |
Returns
Type | Description |
---|
IInlineActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IInlineActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateActivity(ActivityDefinition)
Updates an existing activity definition.
Declaration
public IActivityBuilder UpdateActivity(ActivityDefinition activity)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | The activity definition to update. |
Returns
Type | Description |
---|
IActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateInlineActivity(ActivityDefinition)
Updates an existing inline activity definition.
Declaration
public IInlineActivityBuilder UpdateInlineActivity(ActivityDefinition activity)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | The inline activity definition to update. |
Returns
Type | Description |
---|
IInlineActivityBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IInlineActivityBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteActivity(string)
Deletes an activity with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteActivity(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteActivity(ActivityDefinition)
Deletes an activity definition.
Declaration
public IProcessDefinitionBuilder DeleteActivity(ActivityDefinition activity)
Parameters
Type | Name | Description |
---|
ActivityDefinition | activity | The activity definition to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateTransition(string, ActivityDefinition, ActivityDefinition)
Creates a new transition with the specified name, source activity, and target activity.
Declaration
public ITransitionBuilder CreateTransition(string name, ActivityDefinition from, ActivityDefinition to)
Parameters
Type | Name | Description |
---|
string | name | The name of the transition. |
ActivityDefinition | from | The source activity of the transition. |
ActivityDefinition | to | The target activity of the transition. |
Returns
Type | Description |
---|
ITransitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITransitionBuilder" data-throw-if-not-resolved="false"></xref>. |
CreateOrUpdateTransition(string, ActivityDefinition, ActivityDefinition)
Creates or updates a transition with the specified name, source activity, and target activity.
Declaration
public ITransitionBuilder CreateOrUpdateTransition(string name, ActivityDefinition from, ActivityDefinition to)
Parameters
Type | Name | Description |
---|
string | name | The name of the transition. |
ActivityDefinition | from | The source activity of the transition. |
ActivityDefinition | to | The target activity of the transition. |
Returns
Type | Description |
---|
ITransitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITransitionBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateTransition(string)
Updates an existing transition with the specified name.
Declaration
public ITransitionBuilder UpdateTransition(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the transition to update. |
Returns
Type | Description |
---|
ITransitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITransitionBuilder" data-throw-if-not-resolved="false"></xref>. |
UpdateTransition(TransitionDefinition)
Updates an existing transition definition.
Declaration
public ITransitionBuilder UpdateTransition(TransitionDefinition transition)
Parameters
Type | Name | Description |
---|
TransitionDefinition | transition | The transition definition to update. |
Returns
Type | Description |
---|
ITransitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.ITransitionBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteTransition(TransitionDefinition)
Deletes a transition definition.
Declaration
public IProcessDefinitionBuilder DeleteTransition(TransitionDefinition transition)
Parameters
Type | Name | Description |
---|
TransitionDefinition | transition | The transition definition to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
DeleteTransition(string)
Deletes a transition with the specified name.
Declaration
public IProcessDefinitionBuilder DeleteTransition(string name)
Parameters
Type | Name | Description |
---|
string | name | The name of the transition to delete. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
ForEachActivity(Action<IActivityBuilder>)
Applies an action to each activity in the process definition.
Declaration
public IProcessDefinitionBuilder ForEachActivity(Action<IActivityBuilder> action)
Parameters
Type | Name | Description |
---|
Action<IActivityBuilder> | action | The action to apply to each activity. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
ForEachTransition(Action<ITransitionBuilder>)
Applies an action to each transition in the process definition.
Declaration
public IProcessDefinitionBuilder ForEachTransition(Action<ITransitionBuilder> action)
Parameters
Type | Name | Description |
---|
Action<ITransitionBuilder> | action | The action to apply to each transition. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
Inlined()
Marks the process as capable of being inlined.
Declaration
public IProcessDefinitionBuilder Inlined()
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
NotInlined()
Marks the process as not capable of being inlined.
Declaration
public IProcessDefinitionBuilder NotInlined()
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
GetActivity(string, out ActivityDefinition)
Retrieves an activity definition by name.
Declaration
public IProcessDefinitionBuilder GetActivity(string name, out ActivityDefinition activity)
Parameters
Type | Name | Description |
---|
string | name | The name of the activity. |
ActivityDefinition | activity | The retrieved activity definition. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
GetTransition(string, out TransitionDefinition)
Retrieves a transition definition by name.
Declaration
public IProcessDefinitionBuilder GetTransition(string name, out TransitionDefinition transition)
Parameters
Type | Name | Description |
---|
string | name | The name of the transition. |
TransitionDefinition | transition | The retrieved transition definition. |
Returns
Type | Description |
---|
IProcessDefinitionBuilder | An instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>. |
Extension Methods