DataWeb
Search Results for

    Show / Hide Table of Contents

    Class AutomationTaskService

    A service for managing automation tasks, including task retrieval, dynamic instantiation, configuration mapping, and lifecycle operations.

    Inheritance
    object
    AutomationTaskService
    Implements
    IAutomationTaskService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Automation
    Assembly: DataWeb.Core.dll
    Syntax
    public class AutomationTaskService : IAutomationTaskService

    Constructors

    AutomationTaskService(IAutomationEventService, IAutomationProfileService, IAutomationTaskStore, IReflectionService, IAppErrorService, TimeProvider, IServiceProvider)

    A service for managing automation tasks, including task retrieval, dynamic instantiation, configuration mapping, and lifecycle operations.

    Declaration
    public AutomationTaskService(IAutomationEventService automationEventService, IAutomationProfileService automationProfileService, IAutomationTaskStore automationTaskStore, IReflectionService reflectionService, IAppErrorService appErrorService, TimeProvider timeProvider, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IAutomationEventService automationEventService

    An instance of IAutomationEventService for managing automation events.

    IAutomationProfileService automationProfileService

    An instance of IAutomationProfileService for managing automation profiles.

    IAutomationTaskStore automationTaskStore

    An instance of IAutomationTaskStore for persisting and retrieving automation task data.

    IReflectionService reflectionService

    An instance of IReflectionService for dynamic type loading and instantiation.

    IAppErrorService appErrorService

    An instance of IAppErrorService for logging errors.

    TimeProvider timeProvider

    A TimeProvider for obtaining the current local time.

    IServiceProvider serviceProvider

    The service provider used to resolve task dependencies and create task instances.

    Methods

    GetTaskAsync(AutomationTaskFilter, CancellationToken)

    Asynchronously retrieves the first automation task that matches the specified filter.

    Declaration
    public Task<AutomationTask> GetTaskAsync(AutomationTaskFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AutomationTaskFilter filter

    The AutomationTaskFilter criteria used to retrieve the automation task.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<AutomationTask>

    A task that represents the asynchronous operation. The task result contains the first matching AutomationTask, or null if no matching task is found or if an error occurs during task instantiation.

    GetTasksAsync(AutomationTaskFilter, CancellationToken)

    Asynchronously retrieves all automation tasks that match the specified filter.

    Declaration
    public Task<IEnumerable<AutomationTask>> GetTasksAsync(AutomationTaskFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AutomationTaskFilter filter

    The AutomationTaskFilter criteria used to retrieve automation tasks.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task<IEnumerable<AutomationTask>>

    A task that represents the asynchronous operation. The task result contains an enumerable collection of AutomationTask objects that match the specified criteria. Tasks that fail to instantiate are filtered out and do not appear in the result.

    ResetExecutionEndDateAsync(string, CancellationToken)

    Clears the execution end date for an automation task by setting it to null.

    Declaration
    public Task ResetExecutionEndDateAsync(string taskIdMaster, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string taskIdMaster

    The unique master identifier of the task to update.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of resetting the execution end date.

    SetStatusAsync(string, AutomationTaskStatus, CancellationToken)

    Updates the current status of an automation task to the specified value.

    Declaration
    public Task SetStatusAsync(string taskIdMaster, AutomationTaskStatus status, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string taskIdMaster

    The unique master identifier of the task to update.

    AutomationTaskStatus status

    The new AutomationTaskStatus value to assign to the task.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of updating the task status.

    UpdateExecutionEndDateAsync(string, CancellationToken)

    Updates the execution end date for an automation task to the current local time.

    Declaration
    public Task UpdateExecutionEndDateAsync(string taskIdMaster, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string taskIdMaster

    The unique master identifier of the task to update.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of updating the execution end date.

    UpdateExecutionStartDateAsync(string, CancellationToken)

    Updates the execution start date for an automation task to the current local time.

    Declaration
    public Task UpdateExecutionStartDateAsync(string taskIdMaster, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string taskIdMaster

    The unique master identifier of the task to update.

    CancellationToken cancellationToken

    A token to monitor for cancellation requests.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of updating the execution start date.

    Implements

    IAutomationTaskService
    In this article
    Back to top Generated by DocFX