Try our conversational search powered by Generative AI!

Class ActivityFlow

Represents the base class of workflow in the epi commerce workflow engine.

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 abstract class ActivityFlow

Constructors

ActivityFlow()

Declaration
protected ActivityFlow()

Properties

IsIgnoreProcessPayment

Declaration
[ActivityFlowContextProperty]
public virtual bool IsIgnoreProcessPayment { get; set; }
Property Value
Type Description
System.Boolean

PickupWarehouseInShipment

Declaration
[ActivityFlowContextProperty]
public virtual Dictionary<int, IWarehouse> PickupWarehouseInShipment { get; set; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.Int32, IWarehouse>

PreventProcessPayment

Declaration
[ActivityFlowContextProperty]
public virtual bool PreventProcessPayment { get; set; }
Property Value
Type Description
System.Boolean

ShouldIgnoreAdjustInventory

Declaration
[ActivityFlowContextProperty]
public virtual bool ShouldIgnoreAdjustInventory { get; set; }
Property Value
Type Description
System.Boolean

ShouldIgnoreRecalculate

Declaration
[ActivityFlowContextProperty]
public virtual bool ShouldIgnoreRecalculate { get; set; }
Property Value
Type Description
System.Boolean

Methods

Configure(ActivityFlowRunner)

Configures, sets up the execution scenario for the ActivityFlow, containing sequential steps.

Declaration
public abstract ActivityFlowRunner Configure(ActivityFlowRunner activityFlow)
Parameters
Type Name Description
ActivityFlowRunner activityFlow

The execution ActivityFlow.

Returns
Type Description
ActivityFlowRunner

Instance of ActivityFlowRunner class.

Examples

The following example demonstrates how to configure the ActivityFlow:

return activityFlow.If(() =>
                {
                    return InStock > 0;
                })
                    .Step<AddToCartActivity>()
                .EndIf()
                .Step<CalculateTotalsActivity>();

CreateExecution(ActivityFlowContext)

Creates the execution activity flow in order to execute the ActivityFlow.

Declaration
public virtual ActivityFlowRunner CreateExecution(ActivityFlowContext context)
Parameters
Type Name Description
ActivityFlowContext context

The execution context.

Returns
Type Description
ActivityFlowRunner

Instance of ActivityFlowRunner class.

Initialize(ActivityFlowContext)

Initializes execution context for the ActivityFlow.

Declaration
public virtual void Initialize(ActivityFlowContext context)
Parameters
Type Name Description
ActivityFlowContext context

The execution context.

ShouldAdjustInventory()

Checks whether we must check adjust inventory or not

Declaration
protected virtual bool ShouldAdjustInventory()
Returns
Type Description
System.Boolean

true if the ShouldIgnoreAdjustInventory doesn't have value or it's false; otherwise false

ShouldCheckInstoreInventory()

Checks whether we must check instore inventory or not

Declaration
protected virtual bool ShouldCheckInstoreInventory()
Returns
Type Description
System.Boolean

true if the dictionary PickupWarehouseInShipment has value; otherwise false

ShouldProcessPayment()

Checks whether we must process payment or not

Declaration
protected virtual bool ShouldProcessPayment()
Returns
Type Description
System.Boolean

true if the PreventProcessPayment doesn't have value or it's false; otherwise false

ShouldRecalculateOrder()

Checks whether we must recalculate the order or not

Declaration
protected virtual bool ShouldRecalculateOrder()
Returns
Type Description
System.Boolean

true if the ShouldIgnoreRecalculate doesn't have value or it's false; otherwise false