forked from elsa-workflows/elsa-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scheduling function for background activities
This commit achieves two main goals. Firstly, it introduces two new classes called ScheduledActivity and ScheduledActivityOptions to store scheduled activities' information. Secondly, it modifies how activities are executed in the background by capturing the scheduling information as a serializable format and storing it in the workflow execution context properties dictionary. This change allows the workflow execution context to resume the activity execution context.
- Loading branch information
1 parent
2b6294b
commit a950a6d
Showing
6 changed files
with
113 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Elsa.Workflows.Models; | ||
|
||
public class ScheduledActivity | ||
{ | ||
public string? ActivityNodeId { get; set; } | ||
public string? OwnerActivityInstanceId { get; set; } | ||
public ScheduledActivityOptions? Options { get; set; } | ||
} |
13 changes: 13 additions & 0 deletions
13
src/modules/Elsa.Workflows.Core/Models/ScheduledActivityOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Elsa.Workflows.Memory; | ||
|
||
namespace Elsa.Workflows.Models; | ||
|
||
public class ScheduledActivityOptions | ||
{ | ||
public string? CompletionCallback { get; set; } | ||
public object? Tag { get; set; } | ||
public ICollection<Variable>? Variables { get; set; } | ||
public string? ExistingActivityInstanceId { get; set; } | ||
public bool PreventDuplicateScheduling { get; set; } | ||
public IDictionary<string,object>? Input { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters