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.
Merge branch 'master' of https://github.com/elsa-workflows/elsa-core
- Loading branch information
Showing
5 changed files
with
121 additions
and
17 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
32 changes: 32 additions & 0 deletions
32
test/integration/Elsa.Core.IntegrationTests/Workflows/ForkEagerJoinWorkflow.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,32 @@ | ||
using System.Collections.Generic; | ||
using Elsa.Activities.Console; | ||
using Elsa.Activities.ControlFlow; | ||
using Elsa.Builders; | ||
|
||
namespace Elsa.Core.IntegrationTests.Workflows | ||
{ | ||
public class ForkEagerJoinWorkflow : IWorkflow | ||
{ | ||
private readonly bool _eagerJoin; | ||
|
||
public ForkEagerJoinWorkflow(bool eagerJoin) | ||
{ | ||
_eagerJoin = eagerJoin; | ||
} | ||
|
||
public void Build(IWorkflowBuilder builder) | ||
{ | ||
builder.StartWith<Fork>( | ||
activity => activity.Set(x => x.Branches, new HashSet<string>(new[] { "Branch 1", "Branch 2" })), | ||
fork => | ||
{ | ||
fork.When("Branch 1").SignalReceived("Signal1"); | ||
fork.When("Branch 2").ThenNamed("Join"); | ||
}) | ||
.Add<Join>(join => join.Set(x => x.Mode, Join.JoinMode.WaitAny).Set(x => x.EagerJoin, _eagerJoin)).WithName("Join") | ||
.SignalReceived("Signal3") | ||
.WriteLine("Finished"); | ||
} | ||
} | ||
} | ||
|
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