Interface IProcessDefinitionBuilder
OptimaJet.Workflow.Core.Model.Builder.IProcessDefinitionBuilder
Defines fluent operations for constructing or modifying the IProcessDefinitionBuilder.ProcessDefinition that represents a workflow scheme.
Namespace: OptimaJet.Workflow.Core.Model.Builder
public interface IProcessDefinitionBuilderType Hierarchy
- IProcessDefinitionBuilder Current type
- Derived interfaces
- Implementing types
Properties
ProcessDefinition ProcessDefinition { get; } #Gets the IProcessDefinitionBuilder.ProcessDefinition that represents the workflow scheme being built.
Methods
IActorBuilder CreateActor(string name, string rule) #Creates an ActorDefinition that references a workflow rule.
Parameters
Name
Type
Description
nameStringThe actor name.
ruleStringThe name of the workflow rule referenced by the actor.
Returns
Type
Description
IActorBuilderAn IActorBuilder positioned at the created actor.
Exceptions
Type
Description
ActorAlreadyExistsExceptionThe process definition already contains an actor named
name.IActorBuilder CreateOrUpdateActor(string name, string rule) #Parameters
Name
Type
Description
nameStringThe actor name.
ruleStringThe name of the workflow rule referenced by the actor.
Returns
Type
Description
IActorBuilderAn IActorBuilder positioned at the created or existing actor.
IActorBuilder UpdateActor(string name) #Selects the existing ActorDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe actor name.
Returns
Type
Description
IActorBuilderAn IActorBuilder positioned at the selected actor.
Exceptions
Type
Description
ActorNotFoundExceptionThe process definition does not contain an actor named
name.IProcessDefinitionBuilder DeleteActor(string name) #Deletes the actor named
name from the process definition.Parameters
Name
Type
Description
nameStringThe actor name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
When the actor exists, the method also removes every TransitionDefinition.Restrictions entry that references it. If no actor has the requested name, the process definition is unchanged.
IParameterBuilder CreateParameter(string name, Type type, ParameterPurpose purpose = ParameterPurpose.Temporary) #Creates a user-defined ParameterDefinition.
Parameters
Name
Type
Description
nameStringThe parameter name.
Returns
Type
Description
IParameterBuilderAn IParameterBuilder positioned at the created parameter.
Exceptions
Type
Description
ParameterAlreadyExistsExceptionThe process definition already contains a parameter named
name.InvalidOperationExceptionpurpose is ParameterPurpose.System.IParameterBuilder CreateOrUpdateParameter(string name, Type type, ParameterPurpose purpose) #Creates a user-defined ParameterDefinition or updates the type and purpose of the existing parameter named
name.Parameters
Name
Type
Description
nameStringThe parameter name.
Returns
Type
Description
IParameterBuilderAn IParameterBuilder positioned at the created or existing parameter.
Exceptions
Type
Description
InvalidOperationExceptionpurpose is ParameterPurpose.System; or purpose is ParameterPurpose.Persistence and an existing parameter with an initial value would change its type.Remarks
IParameterBuilder UpdateParameter(string name) #Selects the existing ParameterDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe parameter name.
Returns
Type
Description
IParameterBuilderAn IParameterBuilder positioned at the selected parameter.
Exceptions
Type
Description
ParameterNotFoundExceptionThe process definition does not contain a parameter named
name.IProcessDefinitionBuilder DeleteParameter(string name) #Deletes the parameter named
name from the process definition.Parameters
Name
Type
Description
nameStringThe parameter name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
When the parameter exists, the method also removes references to it from CommandDefinition.InputParameters. If no parameter has the requested name, the process definition is unchanged.
ICommandBuilder CreateCommand(string name) #Creates a CommandDefinition for a named command trigger.
Parameters
Name
Type
Description
nameStringThe command name.
Returns
Type
Description
ICommandBuilderAn ICommandBuilder positioned at the created command.
Exceptions
Type
Description
CommandAlreadyExistsExceptionThe process definition already contains a command named
name.ICommandBuilder CreateOrUpdateCommand(string name) #Creates a CommandDefinition or selects the existing command named
name.Parameters
Name
Type
Description
nameStringThe command name.
Returns
Type
Description
ICommandBuilderAn ICommandBuilder positioned at the created or existing command.
ICommandBuilder UpdateCommand(string name) #Selects the existing CommandDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe command name.
Returns
Type
Description
ICommandBuilderAn ICommandBuilder positioned at the selected command.
Exceptions
Type
Description
CommandNotFoundExceptionThe process definition does not contain a command named
name.IProcessDefinitionBuilder DeleteCommand(string name) #Deletes the command named
name from the process definition.Parameters
Name
Type
Description
nameStringThe command name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
When the command exists, transitions whose TransitionDefinition.Trigger references it are changed to use TriggerDefinition.Auto, and their TransitionDefinition.Restrictions are cleared. If no command has the requested name, the process definition is unchanged.
ITimerBuilder CreateTimer(string name) #Creates a TimerDefinition whose TimerDefinition.Type is TimerType.Interval and whose TimerDefinition.Value is
0.Parameters
Name
Type
Description
nameStringThe timer name.
Returns
Type
Description
ITimerBuilderAn ITimerBuilder positioned at the created timer.
Exceptions
Type
Description
TimerAlreadyExistsExceptionThe process definition already contains a timer named
name.ICodeActionBuilder CreateCodeAction(string name) #Creates a CodeActionDefinition that implements an action and has the CodeActionType.Action runtime contract.
Parameters
Name
Type
Description
nameStringThe code action name.
Returns
Type
Description
ICodeActionBuilderAn ICodeActionBuilder positioned at the created code action.
Exceptions
Type
Description
CodeActionAlreadyExistsExceptionThe process definition already contains a CodeActionType.Action code action named
name.ICodeActionBuilder CreateCodeCondition(string name) #Creates a CodeActionDefinition that evaluates a transition condition and has the CodeActionType.Condition runtime contract.
Parameters
Name
Type
Description
nameStringThe code condition name.
Returns
Type
Description
ICodeActionBuilderAn ICodeActionBuilder positioned at the created code condition.
Exceptions
Type
Description
CodeActionAlreadyExistsExceptionThe process definition already contains a CodeActionType.Condition code action named
name.ICodeActionBuilder CreateCodeRuleGet(string name) #Creates a CodeActionDefinition that gets workflow participant identities for a rule and has the CodeActionType.RuleGet runtime contract.
Parameters
Name
Type
Description
nameStringThe code rule name.
Returns
Type
Description
ICodeActionBuilderAn ICodeActionBuilder positioned at the created code rule.
Exceptions
Type
Description
CodeActionAlreadyExistsExceptionThe process definition already contains a CodeActionType.RuleGet code action named
name.ICodeActionBuilder CreateCodeRuleCheck(string name) #Creates a CodeActionDefinition that determines whether a workflow participant identity satisfies a rule and has the CodeActionType.RuleCheck runtime contract.
Parameters
Name
Type
Description
nameStringThe code rule name.
Returns
Type
Description
ICodeActionBuilderAn ICodeActionBuilder positioned at the created code rule.
Exceptions
Type
Description
CodeActionAlreadyExistsExceptionThe process definition already contains a CodeActionType.RuleCheck code action named
name.IProcessDefinitionBuilder SetCommonUsings(params string[] usings) #Replaces the namespace imports in ProcessDefinition.CodeActionsCommonUsings that are shared by compiled code actions.
Parameters
Name
Type
Description
usingsString[]The namespace imports to store. Empty and white-space entries are ignored, and duplicates are removed.
Returns
Type
Description
IProcessDefinitionBuilderExceptions
Type
Description
ArgumentExceptionAn entry in
usings contains a semicolon.IProcessDefinitionBuilder AddCommonUsings(params string[] usings) #Adds namespace imports to ProcessDefinition.CodeActionsCommonUsings for compiled code actions.
Parameters
Name
Type
Description
usingsString[]The namespace imports to add. Empty and white-space entries are ignored, and duplicates are removed.
Returns
Type
Description
IProcessDefinitionBuilderExceptions
Type
Description
ArgumentExceptionAn entry in
usings contains a semicolon.IProcessDefinitionBuilder RemoveCommonUsings(params string[] usings) #Removes namespace imports from ProcessDefinition.CodeActionsCommonUsings for compiled code actions.
Parameters
Name
Type
Description
usingsString[]The namespace imports to remove.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder ClearCommonUsings() #Clears ProcessDefinition.CodeActionsCommonUsings, which contains namespace imports shared by compiled code actions.
Returns
Type
Description
IProcessDefinitionBuilderITimerBuilder CreateOrUpdateTimer(string name) #Creates a TimerDefinition whose TimerDefinition.Type is TimerType.Interval and whose TimerDefinition.Value is
0, or selects the existing timer named name.Parameters
Name
Type
Description
nameStringThe timer name.
Returns
Type
Description
ITimerBuilderAn ITimerBuilder positioned at the created or existing timer.
ITimerBuilder UpdateTimer(string name) #Selects the existing TimerDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe timer name.
Returns
Type
Description
ITimerBuilderAn ITimerBuilder positioned at the selected timer.
Exceptions
Type
Description
TimerNotFoundExceptionThe process definition does not contain a timer named
name.IProcessDefinitionBuilder DeleteTimer(string name) #Deletes the timer named
name from the process definition.Parameters
Name
Type
Description
nameStringThe timer name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
When the timer exists, transitions whose TransitionDefinition.Trigger references it are changed to use TriggerDefinition.Auto. If no timer has the requested name, the process definition is unchanged.
IActivityBuilder CreateActivity(string name) #Parameters
Name
Type
Description
nameStringThe activity name.
Returns
Type
Description
IActivityBuilderAn IActivityBuilder positioned at the created activity.
Exceptions
Type
Description
ActivityAlreadyExistsExceptionThe process definition already contains an activity named
name.IActivityBuilder AddActivity(ActivityDefinition activity) #Adds an existing ActivityDefinition to the process definition if needed and selects it for modification.
Parameters
Name
Type
Description
Returns
Type
Description
IActivityBuilderAn IActivityBuilder positioned at
activity.Exceptions
Type
Description
ActivityAlreadyExistsExceptionThe process definition contains another activity with the same name as
activity.IInlineActivityBuilder CreateInlineActivity(string name, string schemeCode) #Creates an inline ActivityDefinition that references another process scheme.
Parameters
Name
Type
Description
nameStringThe inline activity name.
Returns
Type
Description
IInlineActivityBuilderAn IInlineActivityBuilder positioned at the created inline activity.
Exceptions
Type
Description
ActivityAlreadyExistsExceptionThe process definition already contains an activity named
name.IActivityBuilder CreateOrUpdateActivity(string name) #Creates an ordinary ActivityDefinition or selects the existing ordinary activity named
name.Parameters
Name
Type
Description
nameStringThe activity name.
Returns
Type
Description
IActivityBuilderAn IActivityBuilder positioned at the created or existing activity.
Exceptions
Type
Description
WrongActivityTypeExceptionThe process definition contains an activity named
name whose ActivityDefinition.ActivityType is not ActivityType.Ordinary.IInlineActivityBuilder CreateOrUpdateInlineActivity(string name, string schemeCode) #Creates an inline ActivityDefinition or updates the referenced process scheme of the existing inline activity named
name.Parameters
Name
Type
Description
nameStringThe inline activity name.
Returns
Type
Description
IInlineActivityBuilderAn IInlineActivityBuilder positioned at the created or existing inline activity.
Exceptions
Type
Description
WrongActivityTypeExceptionThe process definition contains an activity named
name whose ActivityDefinition.ActivityType is not ActivityType.Inline.IActivityBuilder UpdateActivity(string name) #Selects the existing ordinary ActivityDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe activity name.
Returns
Type
Description
IActivityBuilderAn IActivityBuilder positioned at the selected activity.
Exceptions
Type
Description
ActivityNotFoundExceptionThe process definition does not contain an activity named
name.WrongActivityTypeExceptionIInlineActivityBuilder UpdateInlineActivity(string name) #Selects the existing inline ActivityDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe inline activity name.
Returns
Type
Description
IInlineActivityBuilderAn IInlineActivityBuilder positioned at the selected inline activity.
Exceptions
Type
Description
ActivityNotFoundExceptionThe process definition does not contain an activity named
name.WrongActivityTypeExceptionIActivityBuilder UpdateActivity(ActivityDefinition activity) #Selects an existing ordinary ActivityDefinition for modification.
Parameters
Name
Type
Description
Returns
Type
Description
IActivityBuilderAn IActivityBuilder positioned at
activity.Exceptions
Type
Description
ActivityNotFoundExceptionactivity is not part of the process definition.WrongActivityTypeExceptionIInlineActivityBuilder UpdateInlineActivity(ActivityDefinition activity) #Selects an existing inline ActivityDefinition for modification.
Parameters
Name
Type
Description
Returns
Type
Description
IInlineActivityBuilderAn IInlineActivityBuilder positioned at
activity.Exceptions
Type
Description
ActivityNotFoundExceptionactivity is not part of the process definition.WrongActivityTypeExceptionIProcessDefinitionBuilder DeleteActivity(string name) #Deletes the activity named
name from the process definition.Parameters
Name
Type
Description
nameStringThe activity name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
When the activity exists, the method also deletes every TransitionDefinition whose TransitionDefinition.From or TransitionDefinition.To references that activity. If no activity has the requested name, the process definition is unchanged.
IProcessDefinitionBuilder DeleteActivity(ActivityDefinition activity) #Deletes an ActivityDefinition and every transition connected to it.
Parameters
Name
Type
Description
Returns
Type
Description
IProcessDefinitionBuilderITransitionBuilder CreateTransition(string name, ActivityDefinition from, ActivityDefinition to) #Creates a TransitionDefinition that connects two activities in the process definition.
Parameters
Name
Type
Description
nameStringThe transition name.
Returns
Type
Description
ITransitionBuilderAn ITransitionBuilder positioned at the created transition.
Exceptions
Type
Description
TransitionAlreadyExistsExceptionThe process definition already contains a transition named
name.ActivityNotFoundExceptionfrom or to is not part of the process definition.ITransitionBuilder CreateOrUpdateTransition(string name, ActivityDefinition from, ActivityDefinition to) #Creates a TransitionDefinition or changes TransitionDefinition.From and TransitionDefinition.To on the existing transition named
name.Parameters
Name
Type
Description
nameStringThe transition name.
Returns
Type
Description
ITransitionBuilderAn ITransitionBuilder positioned at the created or existing transition.
ITransitionBuilder UpdateTransition(string name) #Selects the existing TransitionDefinition named
name for modification.Parameters
Name
Type
Description
nameStringThe transition name.
Returns
Type
Description
ITransitionBuilderAn ITransitionBuilder positioned at the selected transition.
Exceptions
Type
Description
TransitionNotFoundExceptionThe process definition does not contain a transition named
name.ITransitionBuilder UpdateTransition(TransitionDefinition transition) #Selects an existing TransitionDefinition for modification.
Parameters
Name
Type
Description
Returns
Type
Description
ITransitionBuilderAn ITransitionBuilder positioned at
transition.Exceptions
Type
Description
TransitionNotFoundExceptiontransition is not part of the process definition.IProcessDefinitionBuilder DeleteTransition(string name) #Deletes the transition named
name from the process definition.Parameters
Name
Type
Description
nameStringThe transition name.
Returns
Type
Description
IProcessDefinitionBuilderRemarks
If no transition has the requested name, the process definition is unchanged.
IProcessDefinitionBuilder DeleteTransition(TransitionDefinition transition) #Deletes a TransitionDefinition from the process definition.
Parameters
Name
Type
Description
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder ForEachActivity(Action<IActivityBuilder> action) #Invokes
action for each activity in the process definition.Parameters
Name
Type
Description
actionAction<IActivityBuilder>The callback to invoke with an IActivityBuilder positioned at each activity.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder ForEachTransition(Action<ITransitionBuilder> action) #Invokes
action for each transition in the process definition.Parameters
Name
Type
Description
actionAction<ITransitionBuilder>The callback to invoke with an ITransitionBuilder positioned at each transition.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder Inlined() #Sets ProcessDefinition.CanBeInlined so that this process scheme can be inlined into another process scheme.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder NotInlined() #Clears ProcessDefinition.CanBeInlined so that this process scheme cannot be inlined into another process scheme.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder SetTenantId(string? tenantId) #Sets ProcessDefinition.TenantId for the process scheme.
Parameters
Name
Type
Description
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder GetActivity(string name, out ActivityDefinition activity) #Finds the ActivityDefinition named
name in the process definition.Parameters
Name
Type
Description
nameStringThe activity name.
Returns
Type
Description
IProcessDefinitionBuilderExceptions
Type
Description
ActivityNotFoundExceptionThe process definition does not contain an activity named
name.IProcessDefinitionBuilder GetTransition(string name, out TransitionDefinition transition) #Finds the TransitionDefinition named
name in the process definition.Parameters
Name
Type
Description
nameStringThe transition name.
Returns
Type
Description
IProcessDefinitionBuilderExceptions
Type
Description
TransitionNotFoundExceptionThe process definition does not contain a transition named
name.IProcessDefinitionBuilder CreateOrUpdateLocalizationForState(string stateName, CultureInfo culture, string value, bool isDefault = false) #Creates or updates a business state name translation for a culture.
Parameters
Name
Type
Description
stateNameStringThe internal business state name.
valueStringThe translated business state name.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder DeleteLocalizationForState(string stateName, CultureInfo culture) #Deletes the business state name translation for a culture.
Parameters
Name
Type
Description
stateNameStringThe internal business state name.
Returns
Type
Description
IProcessDefinitionBuilderIProcessDefinitionBuilder DeleteAllLocalizationsForState(string stateName) #Deletes all translations for a business state name.
Parameters
Name
Type
Description
stateNameStringThe internal business state name.
Returns
Type
Description
IProcessDefinitionBuilder