Class ExecutionManager

Represents the execution manager, which manages registered activity flow model and be able to execute a activity flow following by activity flow model name.

Inheritance
System.Object
ExecutionManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Engine
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class ExecutionManager

Constructors

ExecutionManager(IFeatureSwitch, ITypeScannerLookup)

Initializes a new instance of the ExecutionManager class.

Declaration
public ExecutionManager(IFeatureSwitch featureSwitch, ITypeScannerLookup typeScanner)
Parameters
Type Name Description
IFeatureSwitch featureSwitch

The feature switch to check if the Beta feature is enabled or not.

EPiServer.Framework.TypeScanner.ITypeScannerLookup typeScanner

The type scanner for looking up all activity flow types.

Methods

ExecuteActivityFlow(String)

Executes an activity flow based on its model name.

Declaration
public WorkflowResults ExecuteActivityFlow(string name)
Parameters
Type Name Description
System.String name

The activity flow model name.

Returns
Type Description
WorkflowResults

The execution result.

ExecuteActivityFlow(String, ActivityFlowContext)

Executes an activity flow based on its model name and the execution context.

Declaration
public WorkflowResults ExecuteActivityFlow(string name, ActivityFlowContext context)
Parameters
Type Name Description
System.String name

The activity flow model name.

ActivityFlowContext context

The execution context.

Returns
Type Description
WorkflowResults

The execution result.

ExecuteActivityFlow(String, Dictionary<String, Object>)

Executes an activity flow based on its model name and the dictionary of parameters.

Declaration
public WorkflowResults ExecuteActivityFlow(string name, Dictionary<string, object> parameters)
Parameters
Type Name Description
System.String name

The activity flow model name.

System.Collections.Generic.Dictionary<System.String, System.Object> parameters

The parameters.

Returns
Type Description
WorkflowResults

The execution result.

GetActivityFlowModel(String)

Gets an activity flow model by its name.

Declaration
public ActivityFlowModel GetActivityFlowModel(string name)
Parameters
Type Name Description
System.String name

The activity flow model name.

Returns
Type Description
ActivityFlowModel

The activity flow model, or null if model not found.

Events

ActivityFlowCompleted

Represents the event when a ActivityFlow is completed.

Declaration
public event EventHandler<ActivityFlowEventArgs> ActivityFlowCompleted
Event Type
Type Description
System.EventHandler<ActivityFlowEventArgs>

ActivityFlowStarted

Represents the event when an ActivityFlow is started executing.

Declaration
public event EventHandler<ActivityFlowEventArgs> ActivityFlowStarted
Event Type
Type Description
System.EventHandler<ActivityFlowEventArgs>