Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

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
TypeDescription
ProcessDefinition

Methods

Create(string)

Creates a new instance of ProcessDefinitionBuilder with a specified process name.

Declaration
public static IProcessDefinitionBuilder Create(string name)
Parameters
TypeNameDescription
stringnameThe name of the process.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
ProcessDefinitionprocessDefinitionThe process definition to clone.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
ProcessDefinitionprocessDefinitionThe process definition to use.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the actor.
stringruleThe rule associated with the actor.
Returns
TypeDescription
IActorBuilderAn 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
TypeNameDescription
stringnameThe name of the actor.
stringruleThe rule associated with the actor.
Returns
TypeDescription
IActorBuilderAn 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
TypeNameDescription
stringnameThe name of the actor to update.
Returns
TypeDescription
IActorBuilderAn 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
TypeNameDescription
stringnameThe name of the actor to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the parameter.
TypetypeThe type of the parameter.
ParameterPurposepurposeThe purpose of the parameter.
Returns
TypeDescription
IParameterBuilderAn 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
TypeNameDescription
stringnameThe name of the parameter.
TypetypeThe type of the parameter.
ParameterPurposepurposeThe purpose of the parameter.
Returns
TypeDescription
IParameterBuilderAn 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
TypeNameDescription
stringnameThe name of the parameter to update.
Returns
TypeDescription
IParameterBuilderAn 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
TypeNameDescription
stringnameThe name of the parameter to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the command.
Returns
TypeDescription
ICommandBuilderAn 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
TypeNameDescription
stringnameThe name of the command.
Returns
TypeDescription
ICommandBuilderAn 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
TypeNameDescription
stringnameThe name of the command to update.
Returns
TypeDescription
ICommandBuilderAn 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
TypeNameDescription
stringnameThe name of the command to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the timer.
Returns
TypeDescription
ITimerBuilderAn 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
TypeNameDescription
stringnameThe name of the timer.
Returns
TypeDescription
ITimerBuilderAn 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
TypeNameDescription
stringnameThe name of the timer to update.
Returns
TypeDescription
ITimerBuilderAn 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
TypeNameDescription
stringnameThe name of the timer to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the activity.
Returns
TypeDescription
IActivityBuilderAn 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
TypeNameDescription
ActivityDefinitionactivityThe activity definition to add.
Returns
TypeDescription
IActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity.
stringschemeCodeThe scheme code of the activity.
Returns
TypeDescription
IInlineActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity.
Returns
TypeDescription
IActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity.
stringschemeCodeThe scheme code of the activity.
Returns
TypeDescription
IInlineActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity to update.
Returns
TypeDescription
IActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity to update.
Returns
TypeDescription
IInlineActivityBuilderAn 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
TypeNameDescription
ActivityDefinitionactivityThe activity definition to update.
Returns
TypeDescription
IActivityBuilderAn 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
TypeNameDescription
ActivityDefinitionactivityThe inline activity definition to update.
Returns
TypeDescription
IInlineActivityBuilderAn 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
TypeNameDescription
stringnameThe name of the activity to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
ActivityDefinitionactivityThe activity definition to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the transition.
ActivityDefinitionfromThe source activity of the transition.
ActivityDefinitiontoThe target activity of the transition.
Returns
TypeDescription
ITransitionBuilderAn 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
TypeNameDescription
stringnameThe name of the transition.
ActivityDefinitionfromThe source activity of the transition.
ActivityDefinitiontoThe target activity of the transition.
Returns
TypeDescription
ITransitionBuilderAn 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
TypeNameDescription
stringnameThe name of the transition to update.
Returns
TypeDescription
ITransitionBuilderAn 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
TypeNameDescription
TransitionDefinitiontransitionThe transition definition to update.
Returns
TypeDescription
ITransitionBuilderAn 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
TypeNameDescription
TransitionDefinitiontransitionThe transition definition to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the transition to delete.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
Action<IActivityBuilder>actionThe action to apply to each activity.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
Action<ITransitionBuilder>actionThe action to apply to each transition.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeDescription
IProcessDefinitionBuilderAn 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
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the activity.
ActivityDefinitionactivityThe retrieved activity definition.
Returns
TypeDescription
IProcessDefinitionBuilderAn 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
TypeNameDescription
stringnameThe name of the transition.
TransitionDefinitiontransitionThe retrieved transition definition.
Returns
TypeDescription
IProcessDefinitionBuilderAn instance of <xref href="OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder" data-throw-if-not-resolved="false"></xref>.

Extension Methods