Table of Contents

Interface IAutomationTriggerDispatcher

Namespace
CMS.Automation
Assembly
CMS.Automation.dll

Fires custom automation triggers registered via RegisterAutomationTriggerAttribute<TTrigger>.

public interface IAutomationTriggerDispatcher
Extension Methods

Methods

FireTrigger<TTrigger>(AutomationTriggerDispatch, CancellationToken)

Fires the custom automation trigger of type TTrigger. The trigger is enqueued for background processing and the method returns immediately; the downstream automation runs on a dedicated background thread. When no automation process is currently configured for the trigger, the background drainer silently skips it. When the background queue is full (overloaded caller), the trigger is dropped — this is observable only via the CustomTriggerQueueFull warning log.

Task FireTrigger<TTrigger>(AutomationTriggerDispatch dispatch, CancellationToken cancellationToken = default) where TTrigger : IAutomationTrigger

Parameters

dispatch AutomationTriggerDispatch

Trigger dispatch payload. See AutomationTriggerDispatch for required and optional members.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

Type Parameters

TTrigger

Custom automation trigger type to fire. Must be registered via RegisterAutomationTriggerAttribute<TTrigger>.

Exceptions

ArgumentNullException

Thrown when dispatch is null.

InvalidOperationException

Thrown when TTrigger is not registered, when the trigger data is supplied for a trigger that does not declare a data type, or when the supplied trigger data is not an instance of the trigger's declared data type.