Table of Contents

Class AutomationTrigger

Namespace
CMS.Automation
Assembly
CMS.Automation.dll

Base class for custom automation triggers without typed trigger data. Extend this class to define a custom trigger that can be fired from code via FireTrigger<TTrigger>(AutomationTriggerDispatch, CancellationToken). A single instance is created and reused across all evaluations, so implementations must be stateless.

public abstract class AutomationTrigger : IAutomationTrigger
Inheritance
object
AutomationTrigger
Implements
Extension Methods

Constructors

AutomationTrigger()

protected AutomationTrigger()

Methods

Evaluate(AutomationTriggerContext, CancellationToken)

Returns whether the configured automation process should start for the object described by context. Override to gate the trigger; the default implementation always allows the process to start.

public virtual Task<bool> Evaluate(AutomationTriggerContext context, CancellationToken cancellationToken)

Parameters

context AutomationTriggerContext

Information about the object the trigger was fired for.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

true to start the configured automation process; false to skip it.