Assembly: OptimaJet.Workflow.Core

Interface IActivityBuilder

OptimaJet.Workflow.Core.Model.Builder.IActivityBuilder

Defines fluent operations for configuring an ordinary ActivityDefinition in a process scheme.

public interface IActivityBuilder : IBaseActivityBuilder, IProcessDefinitionBuilder

Type Hierarchy

Methods

IActivityBuilder Name(string name) #
Sets the name of the current activity to name.

Parameters

Name
Type
Description
name
String
The activity name to assign.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder State(string state) #
Assigns state to ActivityDefinition.State for the current activity.

Parameters

Name
Type
Description
state
String
The business state name to associate with the activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder NotState() #
Clears ActivityDefinition.State and sets ActivityDefinition.IsForSetState to false for the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisableSetState() #
Sets ActivityDefinition.IsForSetState to false, preventing the current activity from being selected by state-setting operations.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnableSetState() #
Sets ActivityDefinition.IsForSetState to true, making the current activity eligible for selection by state-setting operations.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder Initial() #
Marks the current activity as initial by setting ActivityDefinition.IsInitial to true and ActivityDefinition.IsFinal to false.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder Final() #
Marks the current activity as final by setting ActivityDefinition.IsInitial to false and ActivityDefinition.IsFinal to true.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder Basic() #
Marks the current activity as neither initial nor final by setting ActivityDefinition.IsInitial and ActivityDefinition.IsFinal to false.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnableAutoSchemeUpdate() #
Sets ActivityDefinition.IsAutoSchemeUpdate to true, allowing Workflow Engine to update an obsolete process scheme automatically while the process is at the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisableAutoSchemeUpdate() #
Sets ActivityDefinition.IsAutoSchemeUpdate to false, preventing automatic process scheme updates while the process is at the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder CreateOrUpdateAnnotation(string name, string value) #
Adds an Annotation to ActivityDefinition.Annotations, or updates the first annotation whose Annotation.Name matches name.

Parameters

Name
Type
Description
name
String
The value to assign to Annotation.Name.
value
String
The string to assign to Annotation.JsonValue.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder CreateOrUpdateAnnotation(string name, object value) #
Serializes value and adds an Annotation to ActivityDefinition.Annotations, or updates the first annotation whose Annotation.Name matches name.

Parameters

Name
Type
Description
name
String
The value to assign to Annotation.Name.
value
Object
The value to serialize into Annotation.JsonValue.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DeleteAnnotation(string name) #
Removes every Annotation whose Annotation.Name matches name from ActivityDefinition.Annotations.

Parameters

Name
Type
Description
name
String
The annotation name to match.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisablePersistence() #
Configures the current activity to skip persistence of the stored current activity and business state, transition history, and persistent process parameters when entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnablePersistence() #
Enables activity-level persistence of the stored current activity and business state, transition history, and persistent process parameters when the current activity is entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisableTransitionHistoryPersistence() #
Sets ActivityDefinition.DisablePersistTransitionHistory to true, causing the current activity to skip writing the transition to process history when entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnableTransitionHistoryPersistence() #
Sets ActivityDefinition.DisablePersistTransitionHistory to false, enabling transition history persistence when the current activity is entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisableParametersPersistence() #
Sets ActivityDefinition.DisablePersistParameters to true, causing the current activity to skip saving persistent process parameters when entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnableParametersPersistence() #
Sets ActivityDefinition.DisablePersistParameters to false, enabling persistent process parameter storage when the current activity is entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DisableStatePersistence() #
Sets ActivityDefinition.DisablePersistState to true, causing the current activity to skip updating the stored current activity and business state when entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder EnableStatePersistence() #
Sets ActivityDefinition.DisablePersistState to false, enabling updates to the stored current activity and business state when the current activity is entered.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IIdleTimeoutBuilder IdleTimeout(TimeSpan timeout) #
Sets the interval for ActivityDefinition.IdleTimeout on the current activity.

Parameters

Name
Type
Description
timeout
TimeSpan
The interval converted and assigned to ActivityTimeout.Timer.

Returns

Type
Description
IIdleTimeoutBuilder
IIdleTimeoutBuilder IdleTimeout(int timeout) #
Sets the interval for ActivityDefinition.IdleTimeout on the current activity.

Parameters

Name
Type
Description
timeout
Int32
The interval, in milliseconds, to assign to ActivityTimeout.Timer.

Returns

Type
Description
IIdleTimeoutBuilder

Exceptions

Type
Description
ArgumentException
Thrown when timeout is less than zero.
IActivityBuilder DeleteIdleTimeout() #
Removes ActivityDefinition.IdleTimeout from the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IIdleTimeoutBuilder UpdateIdleTimeout() #
Gets a builder for changing ActivityTimeout.Type and ActivityTimeout.NameForSet on the current activity's existing ActivityDefinition.IdleTimeout.

Returns

Type
Description
IIdleTimeoutBuilder
An IIdleTimeoutBuilder for configuring the existing ActivityTimeout.

Exceptions

Type
Description
InvalidOperationException
IExecutionTimeoutBuilder ExecutionTimeout(TimeSpan timeout) #
Sets the interval for ActivityDefinition.ExecutionTimeout on the current activity.

Parameters

Name
Type
Description
timeout
TimeSpan
The interval converted and assigned to ActivityTimeout.Timer.

Returns

Type
Description
IExecutionTimeoutBuilder ExecutionTimeout(int timeout) #
Sets the interval for ActivityDefinition.ExecutionTimeout on the current activity.

Parameters

Name
Type
Description
timeout
Int32
The interval, in milliseconds, to assign to ActivityTimeout.Timer.

Returns

Type
Description

Exceptions

Type
Description
ArgumentException
Thrown when timeout is less than zero.
IExecutionTimeoutBuilder UpdateExecutionTimeout() #
Gets a builder for changing ActivityTimeout.Type, ActivityTimeout.NameForSet, or ActivityTimeout.RetryCount on the current activity's existing ActivityDefinition.ExecutionTimeout.

Returns

Type
Description
IExecutionTimeoutBuilder
An IExecutionTimeoutBuilder for configuring the existing ActivityTimeout.

Exceptions

Type
Description
InvalidOperationException
IActivityBuilder DeleteExecutionTimeout() #
Removes ActivityDefinition.ExecutionTimeout from the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityExceptionHandlerBuilder CreateOrUpdateExceptionHandler(params string[] exceptions) #
Gets a builder for the ActivityExceptionsHandler whose ActivityExceptionsHandler.Exceptions collection matches the supplied patterns, creating a ActivityExceptionsHandler with ActivityExceptionsHandlerType.Ignore when no such handler exists.

Parameters

Name
Type
Description
exceptions
String[]

Returns

Type
Description
IActivityExceptionHandlerBuilder
An IActivityExceptionHandlerBuilder for configuring the matching or newly created ActivityExceptionsHandler.
IActivityExceptionHandlerBuilder CreateOrUpdateExceptionHandler(params Type[] exceptions) #
Gets a builder for the ActivityExceptionsHandler identified by the Type.FullName of each supplied Type, creating an ActivityExceptionsHandler with ActivityExceptionsHandlerType.Ignore when no such handler exists.

Parameters

Name
Type
Description
exceptions
Type[]
The Type instances whose Type.FullName values identify the ActivityExceptionsHandler.

Returns

Type
Description
IActivityExceptionHandlerBuilder
An IActivityExceptionHandlerBuilder for configuring the matching or newly created ActivityExceptionsHandler.
IActivityBuilder DeleteExceptionHandler(params string[] exceptions) #
Removes every ActivityExceptionsHandler whose ActivityExceptionsHandler.Exceptions collection matches the supplied patterns.

Parameters

Name
Type
Description
exceptions
String[]
The exception-name patterns that identify the ActivityExceptionsHandler instances to remove.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DeleteExceptionHandler(params Type[] exceptions) #
Removes every ActivityExceptionsHandler identified by the Type.FullName of each supplied Type.

Parameters

Name
Type
Description
exceptions
Type[]
The Type instances whose Type.FullName values identify the ActivityExceptionsHandler instances to remove.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DeleteExceptionHandlers() #
Removes all ActivityExceptionsHandler instances from ActivityDefinition.ExceptionsHandlers for the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DeleteImplementation(string? actionName = null) #
Removes ActionDefinitionReference instances from ActivityDefinition.Implementation for the current activity.

Parameters

Name
Type
Description
actionName
String

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityImplementationBuilder UpdateImplementation(string actionName) #

Parameters

Name
Type
Description
actionName
String

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityImplementationBuilder CreateImplementationAtBegin(string actionName) #
Adds a new ActionDefinitionReference to the beginning of ActivityDefinition.Implementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to ActionDefinitionReference.ActionName.

Returns

Type
Description
IActivityImplementationBuilder
IActivityImplementationBuilder CreateImplementationAtEnd(string actionName) #
Adds a new ActionDefinitionReference to the end of ActivityDefinition.Implementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to ActionDefinitionReference.ActionName.

Returns

Type
Description
IActivityImplementationBuilder
IActivityImplementationBuilder CreateImplementationBefore(string actionName, string targetActionName) #
Adds a new ActionDefinitionReference immediately before the first matching reference in ActivityDefinition.Implementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to the new ActionDefinitionReference.ActionName.
targetActionName
String
The ActionDefinitionReference.ActionName of the reference before which to insert the new one.

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityImplementationBuilder CreateImplementationAfter(string actionName, string targetActionName) #
Adds a new ActionDefinitionReference immediately after the first matching reference in ActivityDefinition.Implementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to the new ActionDefinitionReference.ActionName.
targetActionName
String
The ActionDefinitionReference.ActionName of the reference after which to insert the new one.

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityBuilder DeletePreExecution(string? actionName = null) #
Removes ActionDefinitionReference instances from ActivityDefinition.PreExecutionImplementation for the current activity.

Parameters

Name
Type
Description

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityImplementationBuilder UpdatePreExecution(string actionName) #

Parameters

Name
Type
Description
actionName
String

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityImplementationBuilder CreatePreExecutionAtBegin(string actionName) #
Adds a new ActionDefinitionReference to the beginning of ActivityDefinition.PreExecutionImplementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to ActionDefinitionReference.ActionName.

Returns

Type
Description
IActivityImplementationBuilder
IActivityImplementationBuilder CreatePreExecutionAtEnd(string actionName) #
Adds a new ActionDefinitionReference to the end of ActivityDefinition.PreExecutionImplementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to ActionDefinitionReference.ActionName.

Returns

Type
Description
IActivityImplementationBuilder
IActivityImplementationBuilder CreatePreExecutionBefore(string actionName, string targetActionName) #
Adds a new ActionDefinitionReference immediately before the first matching reference in ActivityDefinition.PreExecutionImplementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to the new ActionDefinitionReference.ActionName.
targetActionName
String
The ActionDefinitionReference.ActionName of the reference before which to insert the new one.

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityImplementationBuilder CreatePreExecutionAfter(string actionName, string targetActionName) #
Adds a new ActionDefinitionReference immediately after the first matching reference in ActivityDefinition.PreExecutionImplementation for the current activity.

Parameters

Name
Type
Description
actionName
String
The value to assign to the new ActionDefinitionReference.ActionName.
targetActionName
String
The ActionDefinitionReference.ActionName of the reference after which to insert the new one.

Returns

Type
Description
IActivityImplementationBuilder

Exceptions

Type
Description
ActionNotFoundException
IActivityBuilder CreateCommentary(string comment) #
Replaces ActivityDefinition.UserComment for the current activity with comment.

Parameters

Name
Type
Description
comment
String
The user-defined comment to store.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder AppendCommentary(string comment) #
Appends comment to ActivityDefinition.UserComment, separating it from existing nonempty text with a line break.

Parameters

Name
Type
Description
comment
String
The user-defined comment text to append.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder DeleteCommentary() #
Clears ActivityDefinition.UserComment for the current activity.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder SetX(int? x) #
Sets DesignerSettings.X for the current activity.

Parameters

Name
Type
Description
x
Nullable<Int32>
The horizontal coordinate, or null to clear DesignerSettings.X.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder SetY(int? y) #
Sets DesignerSettings.Y for the current activity.

Parameters

Name
Type
Description
y
Nullable<Int32>
The vertical coordinate, or null to clear DesignerSettings.Y.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder CustomType(string customType) #
Sets the custom activity type annotation identified by FormBase.CustomTypeAnnotationName.

Parameters

Name
Type
Description
customType
String
The custom activity type identifier stored in Annotation.JsonValue.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.
IActivityBuilder Ref(out ActivityDefinition activityDefinition) #
Assigns the current ActivityDefinition to activityDefinition.

Parameters

Name
Type
Description
activityDefinition
ActivityDefinition
When this method returns, contains the current ActivityDefinition.

Returns

Type
Description
IActivityBuilder
An IActivityBuilder for continuing configuration of the current activity.