Table of Contents

Class Const

Namespace
DCR.Workflow.Effect
Assembly
DCR.Workflow.dll
public class Const : EffectBase, IEffect
Inheritance
Const
Implements
Inherited Members
Extension Methods

Constructors

Const(ILogger<Const>)

public Const(ILogger<Const> logger)

Parameters

logger ILogger<Const>

Properties

Description

public override string Description { get; }

Property Value

string

Id

Id of the effect

public override string Id { get; }

Property Value

string

Remarks

This is the id used to identify the effect. Modellers use this id to indicate that an activity should have the effect

ShouldRunActivityWillExecute

public override bool ShouldRunActivityWillExecute { get; }

Property Value

bool

Methods

ActivityWillExecute(Model, Activity, Dictionary<string, string>)

Callback to run effect before activity execution

public override Task<Result> ActivityWillExecute(Model m, Activity a, Dictionary<string, string> parameters)

Parameters

m Model
a Activity
parameters Dictionary<string, string>

The parameters for the effect. In value, references to model values, e.g., $(Activity) are replaced with their values. [LINK: model value references docs] The dictionary is guaranteed to have defined value for all keys in RequiredParameters.

Returns

Task<Result>

A pair of a Result structure and an optional state object to be passed in to a subsequent call to ActivityDidExecute.

Remarks

Execute the effect, possibly returning an updated value. The effect executes before the underlying activity is executed, and if the effect fails (throws), execution of the activity is aborted.