diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlteration.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlteration.cs new file mode 100644 index 000000000..0ce1f7a50 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlteration.cs @@ -0,0 +1,6 @@ +namespace Elsa.Api.Client.Resources.Alterations.Contracts; + +/// +/// Marker interface for all alteration classes +/// +public interface IAlteration; \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlterationsApi.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlterationsApi.cs new file mode 100644 index 000000000..6e212ec36 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Contracts/IAlterationsApi.cs @@ -0,0 +1,52 @@ +using Elsa.Api.Client.Resources.Alterations.Models; +using Elsa.Api.Client.Resources.Alterations.Requests; +using Elsa.Api.Client.Resources.Alterations.Responses; +using Refit; + +namespace Elsa.Api.Client.Resources.Alterations.Contracts; + +/// +/// Represents a client for the alterations API. Requires the Elsa.Alterations feature. +/// +public interface IAlterationsApi +{ + /// + /// Returns an alteration plan and its associated jobs. + /// + /// The ID of the alteration plan to return. + /// The cancellation token. + [Get("/alterations/{id}")] + Task GetAsync(string id, CancellationToken cancellationToken = default); + + /// + /// Determines which workflow instances a "Submit" request would target without actually running an alteration + /// + /// The requested workflow filter to dry run + /// The cancellation token. + [Post("/alterations/dry-run")] + Task DryRun(AlterationWorkflowInstanceFilter request, CancellationToken cancellationToken = default); + + /// + /// Submits an alteration plan and a filter for workflows instances to be executed against + /// + /// The alterations and filter to submit + /// The cancellation token. + [Post("/alterations/submit")] + Task Submit(AlterationPlanParams request, CancellationToken cancellationToken = default); + + /// + /// Runs an alteration plan and a list of workflow Instance Ids to be executed against + /// + /// The alterations and workflowInstanceIds to execute + /// The cancellation token. + [Post("/alterations/run")] + Task Run(RunRequest request, CancellationToken cancellationToken = default); + + /// + /// Retries the specified workflow instances. + /// + /// The request containing the selection of workflow instances to retry. + /// The cancellation token. + [Post("/alterations/workflows/retry")] + Task BulkRetryAsync(BulkRetryRequest request, CancellationToken cancellationToken); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/ActivityStatus.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/ActivityStatus.cs new file mode 100644 index 000000000..a4693e6ae --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/ActivityStatus.cs @@ -0,0 +1,32 @@ +namespace Elsa.Api.Client.Resources.Alterations.Enums; + +/// +/// Represents the status of an activity. +/// +public enum ActivityStatus +{ + /// + /// The activity is in the Pending state. + /// + Pending, + + /// + /// The activity is in the Running state. Note that event if an activity is running, it may not be executing. + /// + Running, + + /// + /// The activity is in the Completed state. + /// + Completed, + + /// + /// The activity is in the Canceled state. + /// + Canceled, + + /// + /// The activity is in the Faulted state. + /// + Faulted +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationJobStatus.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationJobStatus.cs new file mode 100644 index 000000000..49e65a99a --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationJobStatus.cs @@ -0,0 +1,27 @@ +namespace Elsa.Api.Client.Resources.Alterations.Enums; + +/// +/// The status of an alteration plan for a workflow instance. +/// +public enum AlterationJobStatus +{ + /// + /// The plan is pending execution. + /// + Pending, + + /// + /// The plan is currently being executed. + /// + Running, + + /// + /// The plan has been completed. + /// + Completed, + + /// + /// The job has failed. + /// + Failed +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationPlanStatus.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationPlanStatus.cs new file mode 100644 index 000000000..80ded4c2e --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Enums/AlterationPlanStatus.cs @@ -0,0 +1,37 @@ +namespace Elsa.Api.Client.Resources.Alterations.Enums; + +/// +/// The status of an alteration plan. +/// +public enum AlterationPlanStatus +{ + /// + /// The plan is pending execution. + /// + Pending, + + /// + /// The plan is currently generating jobs. + /// + Generating, + + /// + /// The plan is currently dispatching jobs. + /// + Dispatching, + + /// + /// The plan is currently being executed. + /// + Running, + + /// + /// The plan has been completed. + /// + Completed, + + /// + /// The plan has failed. + /// + Failed +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ActivityFilter.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ActivityFilter.cs new file mode 100644 index 000000000..37fdec5ee --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ActivityFilter.cs @@ -0,0 +1,34 @@ +using Elsa.Api.Client.Resources.Alterations.Enums; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// A filter for activities within a workflow instance +/// +public class ActivityFilter +{ + /// + /// The ID of the activity. + /// + public string? ActivityId { get; set; } + + /// + /// The ID of the activity instance. + /// + public string? ActivityInstanceId { get; set; } + + /// + /// The node ID of the activity. + /// + public string? NodeId { get; set; } + + /// + /// The name of the activity. + /// + public string? Name { get; set; } + + /// + /// The status of the activity. + /// + public ActivityStatus? Status { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationBase.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationBase.cs new file mode 100644 index 000000000..18615eca9 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationBase.cs @@ -0,0 +1,8 @@ +using Elsa.Api.Client.Resources.Alterations.Contracts; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// A base class for all IAlterations. +/// +public abstract class AlterationBase : IAlteration; \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationJob.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationJob.cs new file mode 100644 index 000000000..d756c23d7 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationJob.cs @@ -0,0 +1,45 @@ +using Elsa.Api.Client.Resources.Alterations.Enums; +using Elsa.Api.Client.Shared.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Represents the execution of the plan for an individual workflow instance. +/// +public class AlterationJob : Entity +{ + /// + /// The ID of the plan that this job belongs to. + /// + public string PlanId { get; set; } = default!; + + /// + /// The ID of the workflow instance that this job applies to. + /// + public string WorkflowInstanceId { get; set; } = default!; + + /// + /// The status of the job. + /// + public AlterationJobStatus Status { get; set; } + + /// + /// The serialized log of the job. + /// + public ICollection? Log { get; set; } = new List(); + + /// + /// The date and time at which the job was created. + /// + public DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time at which the job was started. + /// + public DateTimeOffset? StartedAt { get; set; } + + /// + /// The date and time at which the job was completed. + /// + public DateTimeOffset? CompletedAt { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLog.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLog.cs new file mode 100644 index 000000000..c39d44c12 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLog.cs @@ -0,0 +1,13 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Represents a log of alterations. +/// +public class AlterationLog +{ + + /// + /// The log entries. + /// + public ICollection LogEntries { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLogEntry.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLogEntry.cs new file mode 100644 index 000000000..9c661275b --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationLogEntry.cs @@ -0,0 +1,12 @@ +using Microsoft.Extensions.Logging; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// An individual log entry about an alteration +/// +/// +/// +/// +/// +public record AlterationLogEntry(string Message, LogLevel LogLevel, DateTimeOffset Timestamp, string? EventName = null); \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlan.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlan.cs new file mode 100644 index 000000000..993858cf5 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlan.cs @@ -0,0 +1,41 @@ +using Elsa.Api.Client.Resources.Alterations.Contracts; +using Elsa.Api.Client.Resources.Alterations.Enums; +using Elsa.Api.Client.Shared.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// A plan that contains a list of alterations to be applied to a set of workflow instances. +/// +public class AlterationPlan : Entity +{ + /// + /// The alterations to be applied. + /// + public ICollection Alterations { get; set; } = new List(); + + /// + /// The IDs of the workflow instances that this plan applies to. + /// + public AlterationWorkflowInstanceFilter WorkflowInstanceFilter { get; set; } = new(); + + /// + /// The status of the plan. + /// + public AlterationPlanStatus Status { get; set; } + + /// + /// The date and time at which the plan was created. + /// + public DateTimeOffset CreatedAt { get; set; } + + /// + /// The date and time at which the plan was started. + /// + public DateTimeOffset? StartedAt { get; set; } + + /// + /// The date and time at which the plan was completed. + /// + public DateTimeOffset? CompletedAt { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlanParams.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlanParams.cs new file mode 100644 index 000000000..f9fc5a1c1 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlanParams.cs @@ -0,0 +1,24 @@ +using Elsa.Api.Client.Resources.Alterations.Contracts; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Represents the execution of an alteration plan against a set of workflow instances defined by the given filter +/// +public class AlterationPlanParams +{ + /// + /// The unique identifier for the alteration plan. If not specified, a new ID will be generated. + /// + public string? Id { get; set; } + + /// + /// The alterations to be applied. + /// + public ICollection Alterations { get; set; } = new List(); + + /// + /// The IDs of the workflow instances that this plan applies to. + /// + public AlterationWorkflowInstanceFilter Filter { get; set; } = new(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationWorkflowInstanceFilter.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationWorkflowInstanceFilter.cs new file mode 100644 index 000000000..6f4419114 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationWorkflowInstanceFilter.cs @@ -0,0 +1,45 @@ +using Elsa.Api.Client.Shared.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Represents a filter for workflow instances. +/// +public class AlterationWorkflowInstanceFilter +{ + /// + /// The IDs of the workflow instances that this plan applies to. + /// + public IEnumerable? WorkflowInstanceIds { get; set; } + + /// + /// The correlation IDs of the workflow instances that this plan applies to. + /// + public IEnumerable? CorrelationIds { get; set; } + + /// + /// A collection of timestamp filters used for filtering data based on specified timestamp columns and operators. + /// + public IEnumerable? TimestampFilters { get; set; } + + /// + /// The IDs of the workflow definitions that this plan applies to. + /// + public IEnumerable? DefinitionVersionIds { get; set; } + + /// + /// Whether the workflow instances to match have incidents. + /// + public bool? HasIncidents { get; set; } + + /// + /// Whether the workflow instances to match are system workflows. Defaults to false. + /// + public bool? IsSystem { get; set; } = false; + + /// + /// Represents a collection of filters for activities. + /// + public IEnumerable? ActivityFilters { get; set; } + +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/CancelActivity.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/CancelActivity.cs new file mode 100644 index 000000000..2500e7d97 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/CancelActivity.cs @@ -0,0 +1,17 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Cancels a workflow instance activity during an alteration +/// +public class CancelActivity : AlterationBase +{ + /// + /// The ID of the activity to be cancelled. If not specified, the activity instance ID will be used. + /// + public string? ActivityId { get; set; } + + /// + /// The ID of the activity instance to be cancelled. If specified, overrides . + /// + public string? ActivityInstanceId { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/Migrate.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/Migrate.cs new file mode 100644 index 000000000..1a4dc3b69 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/Migrate.cs @@ -0,0 +1,12 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Migrates a workflow instance to a newer version in an alteration. +/// +public class Migrate : AlterationBase +{ + /// + /// The target version to upgrade to. + /// + public int TargetVersion { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ModifyVariable.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ModifyVariable.cs new file mode 100644 index 000000000..60ab9f6ba --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ModifyVariable.cs @@ -0,0 +1,18 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Modifies a variable in a workflow instance alteration +/// +public class ModifyVariable : AlterationBase +{ + /// + /// The ID of the variable to modify. + /// + public string VariableId { get; set; } = default!; + + /// + /// The new value of the variable. + /// + public object? Value { get; set; } + +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/RunAlterationsResult.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/RunAlterationsResult.cs new file mode 100644 index 000000000..756240be2 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/RunAlterationsResult.cs @@ -0,0 +1,27 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// The result of running a series of alterations. +/// +public class RunAlterationsResult +{ + /// + /// The ID of the workflow instance that was altered. + /// + public string WorkflowInstanceId { get; set; } = string.Empty; + + /// + /// A log of the alterations that were run. + /// + public AlterationLog Log { get; set; } = new(); + + /// + /// A flag indicating whether the workflow has scheduled work. + /// + public bool WorkflowHasScheduledWork { get; set; } + + /// + /// A flag indicating whether the alterations have succeeded. + /// + public bool IsSuccessful { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ScheduleActivity.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ScheduleActivity.cs new file mode 100644 index 000000000..2b0f77f6d --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Models/ScheduleActivity.cs @@ -0,0 +1,17 @@ +namespace Elsa.Api.Client.Resources.Alterations.Models; + +/// +/// Schedules an activity for execution in an alteration. +/// +public class ScheduleActivity : AlterationBase +{ + /// + /// The ID of the next activity to be scheduled. If not specified, the ActivityInstanceId will be used. + /// + public string? ActivityId { get; set; } + + /// + /// The ID of the activity instance to be scheduled. If not specified, the ActivityId will be used. + /// + public string? ActivityInstanceId { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Requests/BulkRetryRequest.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Requests/BulkRetryRequest.cs new file mode 100644 index 000000000..2fbc9fdef --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Requests/BulkRetryRequest.cs @@ -0,0 +1,17 @@ +namespace Elsa.Api.Client.Resources.Alterations.Requests; + +/// +/// Represents a request to bulk retry workflow instances. +/// +public class BulkRetryRequest +{ + /// + /// The IDs of the workflow instances that have incidents to be retried. + /// + public ICollection WorkflowInstanceIds { get; set; } = new List(); + + /// + /// An optional list of explicitly specified activity IDs to retry. If omitted, all faulted activities will be retried. + /// + public ICollection? ActivityIds { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/BulkRetryResponse.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/BulkRetryResponse.cs new file mode 100644 index 000000000..532e517c9 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/BulkRetryResponse.cs @@ -0,0 +1,14 @@ +using Elsa.Api.Client.Resources.Alterations.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// Represents a response to bulk retry workflow instances. +/// +public class BulkRetryResponse +{ + /// + /// The alterations that resulted from the bulk retry request + /// + public ICollection Results { get;set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/DryRunResponse.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/DryRunResponse.cs new file mode 100644 index 000000000..6eb0d2bea --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/DryRunResponse.cs @@ -0,0 +1,12 @@ +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// The response to the DryRun request +/// +public class DryRunResponse +{ + /// + /// The list of workflow instance IDs that would be affected by a "Submit" request + /// + public ICollection WorkflowInstanceIds { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/GetAlterationPlanResponse.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/GetAlterationPlanResponse.cs new file mode 100644 index 000000000..c3fc2fb51 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/GetAlterationPlanResponse.cs @@ -0,0 +1,19 @@ +using Elsa.Api.Client.Resources.Alterations.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// The response from the "Get" alteration plan endpoint +/// +public class GetAlterationPlanResponse +{ + /// + /// The alteration plan mathching the provided ID + /// + public AlterationPlan Plan { get; set; } = new(); + + /// + /// The list of jobs that exist for that AlterationPlan + /// + public ICollection Jobs { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunRequest.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunRequest.cs new file mode 100644 index 000000000..fdaf341e8 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunRequest.cs @@ -0,0 +1,19 @@ +using Elsa.Api.Client.Resources.Alterations.Contracts; + +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// A plan that contains a list of alterations to be applied to a set of workflow instances. +/// +public class RunRequest +{ + /// + /// The alterations to be applied. + /// + public ICollection Alterations { get; set; } = new List(); + + /// + /// The IDs of the workflow instances that this plan applies to. + /// + public ICollection WorkflowInstanceIds { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunResponse.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunResponse.cs new file mode 100644 index 000000000..0d65d891e --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunResponse.cs @@ -0,0 +1,14 @@ +using Elsa.Api.Client.Resources.Alterations.Models; + +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// The response to the Run endpoint +/// +public class RunResponse +{ + /// + /// The alteration results of a Run request + /// + private ICollection Results { get; set; } = new List(); +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/SubmitResponse.cs b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/SubmitResponse.cs new file mode 100644 index 000000000..82c5cd1e3 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Resources/Alterations/Responses/SubmitResponse.cs @@ -0,0 +1,12 @@ +namespace Elsa.Api.Client.Resources.Alterations.Responses; + +/// +/// The response to the "Submit" endpoint +/// +public class SubmitResponse +{ + /// + /// The ID of the alteration plan created as part of the Submit request + /// + public string PlanId { get; set; } = string.Empty; +} \ No newline at end of file diff --git a/src/modules/Elsa.Alterations.Core/Models/AlterationPlanParams.cs b/src/modules/Elsa.Alterations.Core/Models/AlterationPlanParams.cs index dec58d038..08c266c4c 100644 --- a/src/modules/Elsa.Alterations.Core/Models/AlterationPlanParams.cs +++ b/src/modules/Elsa.Alterations.Core/Models/AlterationPlanParams.cs @@ -18,7 +18,7 @@ public class AlterationPlanParams public ICollection Alterations { get; set; } = new List(); /// - /// The IDs of the workflow instances that this plan applies to. + /// The filter used to determine which workflow instances that this plan applies to. /// public AlterationWorkflowInstanceFilter Filter { get; set; } = new(); } \ No newline at end of file diff --git a/src/modules/Elsa.Alterations/Endpoints/Alterations/DryRun/Endpoint.cs b/src/modules/Elsa.Alterations/Endpoints/Alterations/DryRun/Endpoint.cs index eb9461dff..cbf0d5471 100644 --- a/src/modules/Elsa.Alterations/Endpoints/Alterations/DryRun/Endpoint.cs +++ b/src/modules/Elsa.Alterations/Endpoints/Alterations/DryRun/Endpoint.cs @@ -6,7 +6,7 @@ using JetBrains.Annotations; namespace Elsa.Alterations.Endpoints.Alterations.DryRun; /// -/// Executes an alteration plan. +/// Determines which workflow instances a "Submit" request would target without actually running an alteration. /// [PublicAPI] public class DryRun(IWorkflowInstanceFinder workflowInstanceFinder) : ElsaEndpoint diff --git a/src/modules/Elsa.Alterations/Endpoints/Alterations/Get/Endpoint.cs b/src/modules/Elsa.Alterations/Endpoints/Alterations/Get/Endpoint.cs index c1615636f..7c4be8ebe 100644 --- a/src/modules/Elsa.Alterations/Endpoints/Alterations/Get/Endpoint.cs +++ b/src/modules/Elsa.Alterations/Endpoints/Alterations/Get/Endpoint.cs @@ -6,7 +6,7 @@ using JetBrains.Annotations; namespace Elsa.Alterations.Endpoints.Alterations.Get; /// -/// Executes an alteration plan. +/// Gets an alteration plan and its associated jobs. /// [PublicAPI] public class Get : ElsaEndpointWithoutRequest diff --git a/src/modules/Elsa.Alterations/Endpoints/Alterations/Run/Endpoint.cs b/src/modules/Elsa.Alterations/Endpoints/Alterations/Run/Endpoint.cs index 4301682db..a1d090e5e 100644 --- a/src/modules/Elsa.Alterations/Endpoints/Alterations/Run/Endpoint.cs +++ b/src/modules/Elsa.Alterations/Endpoints/Alterations/Run/Endpoint.cs @@ -5,7 +5,7 @@ using JetBrains.Annotations; namespace Elsa.Alterations.Endpoints.Alterations.Run; /// -/// Executes an alteration plan. +/// Executes an alteration plan by targeting workflow instances by ID. /// [PublicAPI] public class Run : ElsaEndpoint diff --git a/src/modules/Elsa.Alterations/Endpoints/Alterations/Submit/Endpoint.cs b/src/modules/Elsa.Alterations/Endpoints/Alterations/Submit/Endpoint.cs index 16cfcf3d5..bbf49d8ed 100644 --- a/src/modules/Elsa.Alterations/Endpoints/Alterations/Submit/Endpoint.cs +++ b/src/modules/Elsa.Alterations/Endpoints/Alterations/Submit/Endpoint.cs @@ -8,7 +8,7 @@ using JetBrains.Annotations; namespace Elsa.Alterations.Endpoints.Alterations.Submit; /// -/// Executes an alteration plan. +/// Submits an alteration plan to be executed targeting workflow instances by a filter. /// [PublicAPI] public class Submit : ElsaEndpoint