Class ActivityFlow
Represents the base class of workflow in the epi commerce workflow engine.
Inheritance
Inherited Members
Namespace: Mediachase.Commerce.Engine
Assembly: Mediachase.Commerce.dll
Version: 12.17.2Syntax
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 |
|
ShouldCheckInstoreInventory()
Checks whether we must check instore inventory or not
Declaration
protected virtual bool ShouldCheckInstoreInventory()
Returns
Type | Description |
---|---|
System.Boolean |
|
ShouldProcessPayment()
Checks whether we must process payment or not
Declaration
protected virtual bool ShouldProcessPayment()
Returns
Type | Description |
---|---|
System.Boolean |
|
ShouldRecalculateOrder()
Checks whether we must recalculate the order or not
Declaration
protected virtual bool ShouldRecalculateOrder()
Returns
Type | Description |
---|---|
System.Boolean |
|