Table of Contents

Class AutomationProcessContextExtensions

Namespace
CMS.Automation
Assembly
CMS.Automation.dll

Extension methods for AutomationProcessContext that identify which trigger started the process.

public static class AutomationProcessContextExtensions
Inheritance
object
AutomationProcessContextExtensions

Methods

TriggeredByCustomActivity(AutomationProcessContext, CancellationToken)

Determines whether the automation process was started by the custom-activity trigger.

public static Task<bool> TriggeredByCustomActivity(this AutomationProcessContext context, CancellationToken cancellationToken = default)

Parameters

context AutomationProcessContext

Context of the automation process executing the action.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

true when the process was started by the custom-activity trigger; otherwise false.

Exceptions

ArgumentNullException

Thrown when context is null.

TriggeredByFormSubmission(AutomationProcessContext, CancellationToken)

Determines whether the automation process was started by the form-submission trigger.

public static Task<bool> TriggeredByFormSubmission(this AutomationProcessContext context, CancellationToken cancellationToken = default)

Parameters

context AutomationProcessContext

Context of the automation process executing the action.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

true when the process was started by the form-submission trigger; otherwise false.

Exceptions

ArgumentNullException

Thrown when context is null.

TriggeredByRegistration(AutomationProcessContext, CancellationToken)

Determines whether the automation process was started by the member-registration trigger.

public static Task<bool> TriggeredByRegistration(this AutomationProcessContext context, CancellationToken cancellationToken = default)

Parameters

context AutomationProcessContext

Context of the automation process executing the action.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<bool>

true when the process was started by the member-registration trigger; otherwise false.

Exceptions

ArgumentNullException

Thrown when context is null.