Class RestoreDecision
OptimaJet.Workflow.Core.Runtime.ProcessRestoring.RestoreDecision
Represents a decision that controls how a process is restored.
Namespace: OptimaJet.Workflow.Core.Runtime.ProcessRestoring
public class RestoreDecisionProperties
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; } #Gets the activity used by RestoreDecision.RunFromNewActivity(ActivityDefinition) or RestoreDecision.ResumeFromNewActivity(ActivityDefinition) instead of the process's current activity.
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
nameStringThe parameter name.
valueObjectThe parameter value.
Returns
Type
Description
RestoreDecisionThe 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
nameStringThe parameter name.
valueObjectThe parameter value.
Returns
Type
Description
RestoreDecisionThe 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
activityDefinitionActivityDefinitionThe activity to execute instead of the process's current activity.
Returns
Type
Description
RestoreDecisionA restore decision with RestoreDecision.Type set to RestoreDecisionTypes.RunFromNewActivity.
Exceptions
Type
Description
ArgumentNullExceptionThrown 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
activityDefinitionActivityDefinitionThe activity after which process execution should continue.
Returns
Type
Description
RestoreDecisionA restore decision with RestoreDecision.Type set to RestoreDecisionTypes.ResumeFromNewActivity.
Exceptions
Type
Description
ArgumentNullExceptionThrown 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.