* Implemented workflow sink module * Sequentual process of saving sinks in single consumer * Refactor * Log errors during sink export * Removed redundant classes * Use in process messaging in bundle * Fixed the issue with duplicated ResultVariable key on serializing * Moved workflowsink modules out of persistence projects * Moved migrations out of old projects Co-authored-by: Gürkan Güran <grkngrn@gmail.com> Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
using Elsa.Workflows.Core.Activities;
|
|
using Elsa.Workflows.Core.Models;
|
|
using Elsa.Workflows.Core.Services;
|
|
|
|
namespace Elsa.IntegrationTests.Scenarios.BlockingAndBreaking;
|
|
|
|
public class BreakWhileBlockForkWorkflow : WorkflowBase
|
|
{
|
|
protected override void Build(IWorkflowBuilder workflow)
|
|
{
|
|
var currentValue = new Variable<int?>(0);
|
|
|
|
workflow.WithVariable(currentValue);
|
|
|
|
workflow.Root = new While(() => true)
|
|
{
|
|
Body =
|
|
new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new Fork
|
|
{
|
|
JoinMode = ForkJoinMode.WaitAll,
|
|
Branches =
|
|
{
|
|
new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new WriteLine("Branch 1"),
|
|
new Event("Branch 1") { Id = "Branch 1" },
|
|
new WriteLine("Branch 1 - Resumed"),
|
|
new Break()
|
|
}
|
|
},
|
|
new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new WriteLine("Branch 2"),
|
|
new Event("Branch 2") { Id = "Branch 2" },
|
|
new WriteLine("Branch 2 - Resumed"),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
} |