diff --git a/Directory.Build.props b/Directory.Build.props
index 570aa11e8..cb6d30d9d 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -33,6 +33,6 @@
$(NoWarn);CS0162;CS1591
- 3.2.0-rc3
+ 3.3.0-preview.470
\ No newline at end of file
diff --git a/README.md b/README.md
index 86ff70daf..fc4e6eb7b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# ELSA 3.0
-
+
[](https://github.com/elsa-workflows/elsa-core/actions/workflows/packages.yml)
[](https://www.nuget.org/packages/Elsa/)
diff --git a/design/artwork/elsa-v3-avatar.png b/design/artwork/elsa-v3-avatar.png
new file mode 100644
index 000000000..d87a1daa0
Binary files /dev/null and b/design/artwork/elsa-v3-avatar.png differ
diff --git a/samples/console/Elsa.Samples.ConsoleApp.Bookmarks/Program.cs b/samples/console/Elsa.Samples.ConsoleApp.Bookmarks/Program.cs
index adf1b64a2..4c5f20584 100644
--- a/samples/console/Elsa.Samples.ConsoleApp.Bookmarks/Program.cs
+++ b/samples/console/Elsa.Samples.ConsoleApp.Bookmarks/Program.cs
@@ -9,7 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
// Add Elsa services.
-services.AddElsa();
+services.AddElsa().AddActivity();
// Build service container.
var serviceProvider = services.BuildServiceProvider();
diff --git a/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs b/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs
index 91868c131..7abd8ef97 100644
--- a/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs
+++ b/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs
@@ -16,18 +16,14 @@ using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Workflows;
-///
/// A delegate entry that is used by activities to be notified when the activities they scheduled are completed.
-///
/// The activity scheduling the activity.
/// The child being scheduled.
/// The delegate to invoke when the scheduled activity completes.
/// An optional tag.
public record ActivityCompletionCallbackEntry(ActivityExecutionContext Owner, ActivityNode Child, ActivityCompletionCallback? CompletionCallback, object? Tag = default);
-///
/// Provides context to the currently executing workflow.
-///
[PublicAPI]
public partial class WorkflowExecutionContext : IExecutionContext
{
@@ -39,9 +35,7 @@ public partial class WorkflowExecutionContext : IExecutionContext
private IList _activityExecutionContexts;
private readonly IHasher _hasher;
- ///
/// Initializes a new instance of .
- ///
private WorkflowExecutionContext(
IServiceProvider serviceProvider,
WorkflowGraph workflowGraph,
@@ -84,9 +78,7 @@ public partial class WorkflowExecutionContext : IExecutionContext
_cancellationRegistrations.Add(linkedCancellationTokenSource.Token.Register(CancelWorkflow));
}
- ///
/// Creates a new for the specified workflow.
- ///
public static async Task CreateAsync(
IServiceProvider serviceProvider,
WorkflowGraph workflowGraph,
@@ -118,9 +110,7 @@ public partial class WorkflowExecutionContext : IExecutionContext
);
}
- ///
/// Creates a new for the specified workflow.
- ///
public static async Task CreateAsync(
IServiceProvider serviceProvider,
WorkflowGraph workflowGraph,
@@ -154,9 +144,7 @@ public partial class WorkflowExecutionContext : IExecutionContext
return workflowExecutionContext;
}
- ///
/// Creates a new for the specified workflow.
- ///
public static async Task CreateAsync(
IServiceProvider serviceProvider,
WorkflowGraph workflowGraph,
@@ -197,9 +185,7 @@ public partial class WorkflowExecutionContext : IExecutionContext
return workflowExecutionContext;
}
- ///
/// Assigns the specified workflow to this workflow execution context.
- ///
/// The workflow graph to assign.
public async Task SetWorkflowGraphAsync(WorkflowGraph workflowGraph)
{
@@ -215,257 +201,164 @@ public partial class WorkflowExecutionContext : IExecutionContext
activityExecutionContext.Activity = workflowGraph.NodeIdLookup[activityExecutionContext.Activity.NodeId].Activity;
}
- ///
/// Gets the .
- ///
public IServiceProvider ServiceProvider { get; }
- ///
/// Gets the .
- ///
public IActivityRegistry ActivityRegistry { get; }
- ///
/// Gets the .
- ///
public IActivityRegistryLookupService ActivityRegistryLookup { get; }
- ///
/// Gets the workflow graph.
- ///
public WorkflowGraph WorkflowGraph { get; private set; }
- ///
/// The associated with the execution context.
- ///
public Workflow Workflow => WorkflowGraph.Workflow;
- ///
/// A graph of the workflow structure.
- ///
public ActivityNode Graph => WorkflowGraph.Root;
- ///
- /// The current status of the workflow.
- ///
+ /// The current status of the workflow.
public WorkflowStatus Status => GetMainStatus(SubStatus);
- ///
/// The current sub status of the workflow.
- ///
public WorkflowSubStatus SubStatus { get; internal set; }
- ///
/// The root associated with the execution context.
- ///
public MemoryRegister MemoryRegister { get; private set; } = default!;
- ///
/// A unique ID of the execution context.
- ///
public string Id { get; set; }
///
public IActivity Activity => Workflow;
- ///
/// An application-specific identifier associated with the execution context.
- ///
public string? CorrelationId { get; set; }
- ///
/// The ID of the workflow instance that triggered this instance.
- ///
public string? ParentWorkflowInstanceId { get; set; }
- ///
/// The date and time the workflow execution context was created.
- ///
public DateTimeOffset CreatedAt { get; set; }
- ///
/// The date and time the workflow execution context was last updated.
- ///
public DateTimeOffset UpdatedAt { get; set; }
- ///
/// The date and time the workflow execution context has finished.
- ///
public DateTimeOffset? FinishedAt { get; set; }
- ///
/// Gets the clock used to determine the current time.
- ///
public ISystemClock SystemClock { get; }
- ///
/// A flattened list of s from the .
- ///
public IReadOnlyCollection Nodes => WorkflowGraph.Nodes.ToList();
- ///
/// A map between activity IDs and s in the workflow graph.
- ///
public IDictionary NodeIdLookup => WorkflowGraph.NodeIdLookup;
- ///
/// A map between hashed activity node IDs and s in the workflow graph.
- ///
public IDictionary NodeHashLookup => WorkflowGraph.NodeHashLookup;
- ///
/// A map between s and s in the workflow graph.
- ///
public IDictionary NodeActivityLookup => WorkflowGraph.NodeActivityLookup;
- ///
/// The for the execution context.
- ///
public IActivityScheduler Scheduler { get; }
- ///
/// Gets the .
- ///
public IIdentityGenerator IdentityGenerator { get; }
- ///
/// Gets the collection of original bookmarks associated with the workflow execution context.
- ///
public ICollection OriginalBookmarks { get; set; }
- ///
/// A collection of collected bookmarks during workflow execution.
- ///
public ICollection Bookmarks { get; set; } = new List();
- ///
/// A diff between the original bookmarks and the current bookmarks.
- ///
public Diff BookmarksDiff => Diff.For(OriginalBookmarks, Bookmarks);
///
/// A dictionary of inputs provided at the start of the current workflow execution.
- ///
public IDictionary Input { get; set; }
- ///
/// A dictionary of outputs provided by the current workflow execution.
- ///
public IDictionary Output { get; set; } = new Dictionary();
///
public IDictionary Properties { get; set; }
- ///
/// A dictionary that can be used by application code and middleware to store information and even services. Values do not need to be serializable.
/// All data will be gone once workflow execution completes.
- ///
public IDictionary