Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cancel dispatched workflows #5136

Merged
merged 6 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/modules/Elsa.Common/Extensions/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ public static Page<T> Paginate<T>(this IEnumerable<T> enumerable, PageArgs? page
/// <typeparam name="T">The type of the items in the lists.</typeparam>
/// <returns>True if the lists are equal, otherwise false.</returns>
public static bool IsEqualTo<T>(this IEnumerable<T> list1, IEnumerable<T> list2) => list1.OrderBy(g => g).SequenceEqual(list2.OrderBy(g => g));

}
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private void ApplyFilter(ParameterizedQuery query, WorkflowInstanceFilter filter
.In(nameof(WorkflowInstance.DefinitionId), filter.DefinitionIds)
.Is(nameof(WorkflowInstance.DefinitionVersionId), filter.DefinitionVersionId)
.In(nameof(WorkflowInstance.DefinitionVersionId), filter.DefinitionVersionIds)
.In(nameof(WorkflowInstance.ParentWorkflowInstanceId), filter.ParentWorkflowInstanceIds)
.Is(nameof(WorkflowInstance.Status), filter.WorkflowStatus?.ToString())
.Is(nameof(WorkflowInstance.SubStatus), filter.WorkflowSubStatus?.ToString())
.Is(nameof(WorkflowInstance.Name), filter.Version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private static QueryDescriptor<WorkflowInstance> Filter(QueryDescriptor<Workflow
// TODO: filter by IDs
// TODO: filter by DefinitionIDs
// TODO: filter by DefinitionVersionIDs
// TODO: filter by ParentWorkflowInstanceIds
// TODO: filter by CorrelationIDs
// TODO: filter by WorkflowStatuses
// TODO: filter by WorkflowSubStatuses
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ protected override void Up(MigrationBuilder migrationBuilder)
nullable: false,
defaultValue: false);

migrationBuilder.AddColumn<string>(
name: "ParentWorkflowInstanceId",
schema: "Elsa",
table: "WorkflowInstances",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");

migrationBuilder.AddColumn<bool>(
name: "IsSystem",
schema: "Elsa",
Expand Down Expand Up @@ -70,6 +78,11 @@ protected override void Down(MigrationBuilder migrationBuilder)
schema: "Elsa",
table: "WorkflowInstances");

migrationBuilder.DropColumn(
name: "ParentWorkflowInstanceId",
schema: "Elsa",
table: "WorkflowInstances");

migrationBuilder.DropColumn(
name: "IsSystem",
schema: "Elsa",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.HasColumnType("varchar(255)");

b.Property<string>("ParentWorkflowInstanceId")
.HasColumnType("longtext");

b.Property<string>("Status")
.IsRequired()
.HasColumnType("varchar(255)");
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading