Assembly: OptimaJet.Workflow.Core

Class RestoreDecision

OptimaJet.Workflow.Core.Runtime.ProcessRestoring.RestoreDecision

Represents a decision that controls how a process is restored.

public class RestoreDecision

Properties

public RestoreDecisionTypes Type { get; } #
Gets the restore decision type.
public IDictionary<string, object> ProcessParameters { get; } #
Gets the process parameters that should be assigned during restore.
public List<string> Persist { get; } #
Gets the names of restore parameters marked for persistence.
public ActivityDefinition Activity { get; } #
public static RestoreDecision Default { get; } #
Gets the default restore decision.
public static RestoreDecision RunFromCurrentActivity { get; } #
Gets a decision that executes the process's current activity again during restore and then continues the process according to the normal activity execution flow.

Remarks

The current activity itself is executed. Use RestoreDecision.ResumeFromCurrentActivity when its repeated execution should be skipped.
public static RestoreDecision ResumeFromCurrentActivity { get; } #
Gets a decision that does not execute the process's current activity again during restore and instead attempts to continue the process through that activity's automatic outgoing transitions.

Remarks

The current activity itself is not executed. Use RestoreDecision.RunFromCurrentActivity when it should be executed again before the process continues.
public static RestoreDecision Delete { get; } #
Gets a decision that deletes the process during restore.

Methods

public RestoreDecision AddPersistentParameter(string name, object value) #
Adds a process parameter that should be persisted.

Parameters

Name
Type
Description
name
String
The parameter name.
value
Object
The parameter value.

Returns

Type
Description
RestoreDecision
The current restore decision.

Remarks

The parameter is added to RestoreDecision.ProcessParameters and its name is added to RestoreDecision.Persist.
public RestoreDecision AddTemporaryParameter(string name, object value) #
Adds a process parameter that should not be marked for persistence.

Parameters

Name
Type
Description
name
String
The parameter name.
value
Object
The parameter value.

Returns

Type
Description
RestoreDecision
The current restore decision.

Remarks

The parameter is added to RestoreDecision.ProcessParameters only.
public static RestoreDecision RunFromNewActivity(ActivityDefinition activityDefinition) #
Creates a decision that executes the specified activity during restore and then continues the process according to the normal activity execution flow.

Parameters

Name
Type
Description
activityDefinition
ActivityDefinition
The activity to execute instead of the process's current activity.

Returns

Type
Description
RestoreDecision

Exceptions

Type
Description
ArgumentNullException
Thrown when activityDefinition is null.

Remarks

The specified activity itself is executed. Use RestoreDecision.ResumeFromNewActivity(ActivityDefinition) when its execution should be skipped.
public static RestoreDecision ResumeFromNewActivity(ActivityDefinition activityDefinition) #
Creates a decision that does not execute the specified activity during restore and instead attempts to continue the process through that activity's automatic outgoing transitions.

Parameters

Name
Type
Description
activityDefinition
ActivityDefinition
The activity after which process execution should continue.

Returns

Type
Description
RestoreDecision

Exceptions

Type
Description
ArgumentNullException
Thrown when activityDefinition is null.

Remarks

The specified activity itself is not executed. Use RestoreDecision.RunFromNewActivity(ActivityDefinition) when it should be executed before the process continues.