Fix cascaded handling of SetOutcome

This commit is contained in:
Sipke Schoorstra 2023-09-14 16:30:18 +02:00
parent 1f3851b652
commit 7f0b3cb8fc
13 changed files with 898 additions and 17 deletions

View file

@ -20,6 +20,7 @@
<ProjectReference Include="..\..\modules\Elsa.JavaScript\Elsa.JavaScript.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Liquid\Elsa.Liquid.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Scheduling\Elsa.Scheduling.csproj" />
<ProjectReference Include="..\..\modules\Elsa.WorkflowProviders.BlobStorage\Elsa.WorkflowProviders.BlobStorage.csproj" />
</ItemGroup>
</Project>

View file

@ -3,6 +3,7 @@ using Elsa.Features.Services;
using Elsa.Workflows.Core.Activities;
using Elsa.Workflows.Core.Contracts;
using Elsa.Workflows.Core.Services;
using FluentStorage;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@ -32,7 +33,7 @@ public class TestApplicationBuilder
.AddSingleton(testOutputHelper)
.AddSingleton<IConfiguration, ConfigurationManager>()
.AddLogging(logging => logging.AddProvider(new XunitLoggerProvider(testOutputHelper)).SetMinimumLevel(LogLevel.Debug));
_configureElsa += elsa => elsa
.AddActivitiesFrom<WriteLine>()
.UseScheduling()
@ -40,7 +41,6 @@ public class TestApplicationBuilder
.UseLiquid()
.UseDsl()
.UseWorkflowManagement()
.UseWorkflows(workflows => workflows
.WithStandardOutStreamProvider(_ => new StandardOutStreamProvider(new XunitConsoleTextWriter(_testOutputHelper)))
);
@ -66,7 +66,7 @@ public class TestApplicationBuilder
_configureElsa += configure;
return this;
}
/// <summary>
/// Configures the service provider.
/// </summary>
@ -95,8 +95,26 @@ public class TestApplicationBuilder
/// <summary>
/// Adds a workflow to the service provider.
/// </summary>
public TestApplicationBuilder AddWorkflow<T>() where T:IWorkflow
public TestApplicationBuilder AddWorkflow<T>() where T : IWorkflow
{
return ConfigureElsa(elsa => elsa.AddWorkflow<T>());
}
/// <summary>
/// Add workflows from the specified relative directory.
/// </summary>
/// <param name="directory">The path segments of the directory.</param>
public TestApplicationBuilder WithWorkflowsFromDirectory(params string[] directory)
{
var assemblyLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
var assemblyDirectory = Path.GetDirectoryName(assemblyLocation)!;
var workflowsDirectory = directory.Prepend(assemblyDirectory).ToArray();
_configureElsa += elsa => elsa.UseFluentStorageProvider(storage => storage.BlobStorage = sp => StorageFactory.Blobs.DirectoryFiles(Path.Combine(workflowsDirectory)));
return this;
}
private static string GetWorkflowsDirectory()
{
return Path.Combine("Scenarios", "DependencyWorkflows", "Workflows");
}
}

View file

@ -63,8 +63,7 @@ public class Complete : Activity
var outcomes = InterpretOutcomes(outcomesValue).ToArray();
await context.SendSignalAsync(new CompleteCompositeSignal(new Outcomes(outcomes)));
// Don't complete this activity, as it will be completed by the composite activity.
await context.CompleteActivityAsync();
}
private static IEnumerable<string> InterpretOutcomes(object? outcomesValue)

View file

@ -119,6 +119,10 @@ public class WorkflowDefinitionActivity : Composite, IInitializable
// Do we have a "complete composite" signal that triggered the completion?
var completeCompositeSignal = context.WorkflowExecutionContext.TransientProperties.TryGetValue(nameof(CompleteCompositeSignal), out var signal) ? (CompleteCompositeSignal)signal : default;
// If we do, make sure to remove it from the transient properties.
if (completeCompositeSignal != null)
context.WorkflowExecutionContext.TransientProperties.Remove(nameof(CompleteCompositeSignal));
await targetContext.CompleteActivityAsync(completeCompositeSignal?.Value);
}

View file

@ -108,6 +108,15 @@
<None Update="Scenarios\ExplicitJoins\Workflows\join-all-2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Scenarios\CompositesAndOutcomes\Workflows\completor.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Scenarios\CompositesAndOutcomes\Workflows\consumer.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Scenarios\CompositesAndOutcomes\Workflows\tester.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@ -118,4 +127,5 @@
</Project>

View file

@ -0,0 +1,41 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Elsa.Testing.Shared;
using Elsa.Workflows.Core;
using Xunit;
using Xunit.Abstractions;
namespace Elsa.IntegrationTests.Scenarios.CompositesAndOutcomes;
public class ExplicitJoinWaitAnyTests
{
private readonly CapturingTextWriter _capturingTextWriter = new();
private readonly IServiceProvider _services;
public ExplicitJoinWaitAnyTests(ITestOutputHelper testOutputHelper)
{
_services = new TestApplicationBuilder(testOutputHelper)
.WithCapturingTextWriter(_capturingTextWriter)
.WithWorkflowsFromDirectory("Scenarios", "CompositesAndOutcomes", "Workflows")
.Build();
}
[Fact(DisplayName = "Complete activity must not cascade.")]
public async Task Test1()
{
// Populate registries.
await _services.PopulateRegistriesAsync();
// Execute.
var workflowState = await _services.RunWorkflowUntilEndAsync("tester");
// Assert expected output.
var lines = _capturingTextWriter.Lines.ToList();
var expectedLinesArray = new[] { "Start", "End" };
Assert.Equal(expectedLinesArray, lines);
// Assert expected workflow status.
Assert.Equal(WorkflowStatus.Finished, workflowState.Status);
}
}

View file

@ -0,0 +1,71 @@
{
"id": "3457460b3fd74daa8f898564cf96fe48",
"definitionId": "99c1c6cf2fec47b3b4916a01425ec989",
"name": "Completor",
"createdAt": "2023-09-14T13:49:38.017111+00:00",
"version": 1,
"toolVersion": "3.0.0.0",
"variables": [],
"inputs": [],
"outputs": [],
"outcomes": [
"Success",
"Failure"
],
"customProperties": {},
"isReadonly": false,
"isLatest": true,
"isPublished": true,
"options": {
"usableAsActivity": true,
"autoUpdateConsumingWorkflows": true,
"activityCategory": "Testing"
},
"root": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "Gn-5gEC2-UCmmzWTgvYCmw",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"outcomes": {
"typeName": "Object",
"expression": {
"type": "Literal",
"value": "Success"
},
"memoryReference": {
"id": "tyDvLNGiYkCbUabhgzcSdw:input-0"
}
},
"id": "tyDvLNGiYkCbUabhgzcSdw",
"name": "Complete1",
"type": "Elsa.Complete",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -186.5,
"y": -263
},
"size": {
"width": 136.8125,
"height": 50
}
}
}
}
],
"connections": []
}
}

View file

@ -0,0 +1,62 @@
{
"id": "9b6b4d4a6a8741c58ccbe3911eed7821",
"definitionId": "bc7f148b2a5b4f55811537a0d762e137",
"name": "Consumer",
"createdAt": "2023-09-14T13:50:13.31251+00:00",
"version": 1,
"toolVersion": "3.0.0.0",
"variables": [],
"inputs": [],
"outputs": [],
"outcomes": [],
"customProperties": {},
"isReadonly": false,
"isLatest": true,
"isPublished": true,
"options": {
"usableAsActivity": true,
"autoUpdateConsumingWorkflows": true,
"activityCategory": "Testing"
},
"root": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "v-ii0Vp0yUCPWReLNUiosg",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"workflowDefinitionId": "99c1c6cf2fec47b3b4916a01425ec989",
"workflowDefinitionVersionId": "3457460b3fd74daa8f898564cf96fe48",
"latestAvailablePublishedVersion": 1,
"latestAvailablePublishedVersionId": "3457460b3fd74daa8f898564cf96fe48",
"id": "ctusr1Uv40uFqIws9Ymt9A",
"name": "Completor1",
"type": "Completor",
"version": 2,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 20,
"y": -260
},
"size": {
"width": 106.859375,
"height": 116.015625
}
}
}
}
],
"connections": []
}
}

View file

@ -0,0 +1,145 @@
{
"id": "74144d614208497380a7bae783b78626",
"definitionId": "tester",
"name": "Tester",
"createdAt": "2023-09-14T13:50:38.720025+00:00",
"version": 1,
"toolVersion": "3.0.0.0",
"variables": [],
"inputs": [],
"outputs": [],
"outcomes": [],
"customProperties": {},
"isReadonly": false,
"isLatest": true,
"isPublished": true,
"options": {
"autoUpdateConsumingWorkflows": false
},
"root": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "k0HQeDE_gk-OxcsjGj3tbQ",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Start"
},
"memoryReference": {
"id": "35MeNlWlAUKXd5JFDJtJ3w:input-0"
}
},
"id": "35MeNlWlAUKXd5JFDJtJ3w",
"name": "WriteLine1",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -198,
"y": -246.9921875
},
"size": {
"width": 139.296875,
"height": 50
}
}
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "End"
},
"memoryReference": {
"id": "CvdSrKs5DESezhkLjb0YIw:input-0"
}
},
"id": "CvdSrKs5DESezhkLjb0YIw",
"name": "WriteLine2",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 253,
"y": -246.9921875
},
"size": {
"width": 139.296875,
"height": 50
}
}
}
},
{
"workflowDefinitionId": "bc7f148b2a5b4f55811537a0d762e137",
"workflowDefinitionVersionId": "9b6b4d4a6a8741c58ccbe3911eed7821",
"latestAvailablePublishedVersion": 1,
"latestAvailablePublishedVersionId": "9b6b4d4a6a8741c58ccbe3911eed7821",
"id": "QfkYnRZDxEO0rtBTIbTXzg",
"name": "Consumer1",
"type": "Consumer",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 20,
"y": -280
},
"size": {
"width": 105.5625,
"height": 116.015625
}
}
}
}
],
"connections": [
{
"source": {
"activity": "35MeNlWlAUKXd5JFDJtJ3w",
"port": "Done"
},
"target": {
"activity": "QfkYnRZDxEO0rtBTIbTXzg",
"port": "In"
}
},
{
"source": {
"activity": "QfkYnRZDxEO0rtBTIbTXzg",
"port": "Done"
},
"target": {
"activity": "CvdSrKs5DESezhkLjb0YIw",
"port": "In"
}
}
]
}
}

View file

@ -19,7 +19,7 @@ public class Tests
{
_services = new TestApplicationBuilder(testOutputHelper)
.WithCapturingTextWriter(_capturingTextWriter)
.ConfigureElsa(elsa => elsa.UseFluentStorageProvider(storage => storage.BlobStorage = sp => StorageFactory.Blobs.DirectoryFiles(GetWorkflowsDirectory())))
.WithWorkflowsFromDirectory("Scenarios", "DependencyWorkflows", "Workflows")
.Build();
}
@ -37,9 +37,4 @@ public class Tests
Assert.Equal(new[] { "Atom", "Atom", "Atom", "Atom", "Atom", "Atom", "Atom", "Atom", "Atom" }, lines);
}
private static string GetWorkflowsDirectory()
{
return Path.Combine("Scenarios", "DependencyWorkflows", "Workflows");
}
}

View file

@ -15,20 +15,22 @@ public class ExplicitJoinWaitAnyTests
public ExplicitJoinWaitAnyTests(ITestOutputHelper testOutputHelper)
{
_services = new TestApplicationBuilder(testOutputHelper).WithCapturingTextWriter(_capturingTextWriter).Build();
_services = new TestApplicationBuilder(testOutputHelper)
.WithCapturingTextWriter(_capturingTextWriter)
.Build();
}
[Theory(DisplayName = "Workflows with explicit joins complete the workflow.")]
[InlineData("join-any-1.json", "Start; End")]
[InlineData("join-all-1.json", "Start; Line 1; Line 2; End")]
[InlineData("join-all-2.json", "Start; Line 1; Line 2; End")]
public async Task Test1(string workflowFileName, string expectedLines)
public async Task Test1(string filename, string expectedLines)
{
// Populate registries.
await _services.PopulateRegistriesAsync();
// Import workflow.
var fileName = $"Scenarios/ExplicitJoins/Workflows/{workflowFileName}";
var fileName = $"Scenarios/ExplicitJoins/Workflows/{filename}";
var workflowDefinition = await _services.ImportWorkflowDefinitionAsync(fileName);
// Execute.

View file

@ -1 +1,248 @@
{"id":"9948e541b0e540c384c6eb9fdcf1d544","definitionId":"296428cc22bd4f309e858f4b461dbb3d","name":"Join 1","createdAt":"2023-09-12T18:12:54.370149+00:00","version":2,"toolVersion":"3.0.0.0","variables":[],"inputs":[],"outputs":[],"outcomes":[],"customProperties":{},"isReadonly":false,"isLatest":true,"isPublished":true,"options":{"autoUpdateConsumingWorkflows":false},"root":{"type":"Elsa.Flowchart","version":1,"id":"sL581qWiIEOpRncv5Ez33A","metadata":{},"customProperties":{"source":"FlowchartJsonConverter.cs:46","notFoundConnections":[],"canStartWorkflow":false,"runAsynchronously":false},"activities":[{"mode":{"typeName":"Elsa.Workflows.Core.Activities.Flowchart.Models.FlowJoinMode, Elsa.Workflows.Core","expression":{"type":"Literal","value":"WaitAll"},"memoryReference":{"id":"aA4pfJOzyEqmLOY3U3vCoQ:input-0"}},"id":"aA4pfJOzyEqmLOY3U3vCoQ","name":"FlowJoin1","type":"Elsa.FlowJoin","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":198,"y":-266},"size":{"width":136.859375,"height":50}}}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"Start"},"memoryReference":{"id":"FRXh0PlHekejZiWANAplUg:input-0"}},"id":"FRXh0PlHekejZiWANAplUg","name":"WriteLine1","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-287,"y":-266},"size":{"width":102.21875,"height":50}},"displayText":"Start"}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"Line 1"},"memoryReference":{"id":"GaVrCWqBDkS6YrvydxKvFA:input-0"}},"id":"GaVrCWqBDkS6YrvydxKvFA","name":"WriteLine2","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-40,"y":-316},"size":{"width":110.65625,"height":50}},"displayText":"Line 1"}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"Line 2"},"memoryReference":{"id":"9Z7bt98j00uRMt9TS2FD0g:input-0"}},"id":"9Z7bt98j00uRMt9TS2FD0g","name":"WriteLine3","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-40,"y":-207},"size":{"width":110.65625,"height":50}},"displayText":"Line 2"}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"End"},"memoryReference":{"id":"MplDrS_bUE-8td-XBUvWmA:input-0"}},"id":"MplDrS_bUE-8td-XBUvWmA","name":"WriteLine4","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":430,"y":-266},"size":{"width":139.296875,"height":50}}}}],"connections":[{"source":{"activity":"FRXh0PlHekejZiWANAplUg","port":"Done"},"target":{"activity":"GaVrCWqBDkS6YrvydxKvFA","port":"In"}},{"source":{"activity":"FRXh0PlHekejZiWANAplUg","port":"Done"},"target":{"activity":"9Z7bt98j00uRMt9TS2FD0g","port":"In"}},{"source":{"activity":"9Z7bt98j00uRMt9TS2FD0g","port":"Done"},"target":{"activity":"aA4pfJOzyEqmLOY3U3vCoQ","port":"In"}},{"source":{"activity":"GaVrCWqBDkS6YrvydxKvFA","port":"Done"},"target":{"activity":"aA4pfJOzyEqmLOY3U3vCoQ","port":"In"}},{"source":{"activity":"aA4pfJOzyEqmLOY3U3vCoQ","port":"Done"},"target":{"activity":"MplDrS_bUE-8td-XBUvWmA","port":"In"}}]}}
{
"id": "9948e541b0e540c384c6eb9fdcf1d544",
"definitionId": "296428cc22bd4f309e858f4b461dbb3d",
"name": "Join 1",
"createdAt": "2023-09-12T18:12:54.370149+00:00",
"version": 2,
"toolVersion": "3.0.0.0",
"variables": [],
"inputs": [],
"outputs": [],
"outcomes": [],
"customProperties": {},
"isReadonly": false,
"isLatest": true,
"isPublished": true,
"options": {
"autoUpdateConsumingWorkflows": false
},
"root": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "sL581qWiIEOpRncv5Ez33A",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"mode": {
"typeName": "Elsa.Workflows.Core.Activities.Flowchart.Models.FlowJoinMode, Elsa.Workflows.Core",
"expression": {
"type": "Literal",
"value": "WaitAll"
},
"memoryReference": {
"id": "aA4pfJOzyEqmLOY3U3vCoQ:input-0"
}
},
"id": "aA4pfJOzyEqmLOY3U3vCoQ",
"name": "FlowJoin1",
"type": "Elsa.FlowJoin",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 198,
"y": -266
},
"size": {
"width": 136.859375,
"height": 50
}
}
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Start"
},
"memoryReference": {
"id": "FRXh0PlHekejZiWANAplUg:input-0"
}
},
"id": "FRXh0PlHekejZiWANAplUg",
"name": "WriteLine1",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -287,
"y": -266
},
"size": {
"width": 102.21875,
"height": 50
}
},
"displayText": "Start"
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Line 1"
},
"memoryReference": {
"id": "GaVrCWqBDkS6YrvydxKvFA:input-0"
}
},
"id": "GaVrCWqBDkS6YrvydxKvFA",
"name": "WriteLine2",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -40,
"y": -316
},
"size": {
"width": 110.65625,
"height": 50
}
},
"displayText": "Line 1"
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Line 2"
},
"memoryReference": {
"id": "9Z7bt98j00uRMt9TS2FD0g:input-0"
}
},
"id": "9Z7bt98j00uRMt9TS2FD0g",
"name": "WriteLine3",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -40,
"y": -207
},
"size": {
"width": 110.65625,
"height": 50
}
},
"displayText": "Line 2"
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "End"
},
"memoryReference": {
"id": "MplDrS_bUE-8td-XBUvWmA:input-0"
}
},
"id": "MplDrS_bUE-8td-XBUvWmA",
"name": "WriteLine4",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 430,
"y": -266
},
"size": {
"width": 139.296875,
"height": 50
}
}
}
}
],
"connections": [
{
"source": {
"activity": "FRXh0PlHekejZiWANAplUg",
"port": "Done"
},
"target": {
"activity": "GaVrCWqBDkS6YrvydxKvFA",
"port": "In"
}
},
{
"source": {
"activity": "FRXh0PlHekejZiWANAplUg",
"port": "Done"
},
"target": {
"activity": "9Z7bt98j00uRMt9TS2FD0g",
"port": "In"
}
},
{
"source": {
"activity": "9Z7bt98j00uRMt9TS2FD0g",
"port": "Done"
},
"target": {
"activity": "aA4pfJOzyEqmLOY3U3vCoQ",
"port": "In"
}
},
{
"source": {
"activity": "GaVrCWqBDkS6YrvydxKvFA",
"port": "Done"
},
"target": {
"activity": "aA4pfJOzyEqmLOY3U3vCoQ",
"port": "In"
}
},
{
"source": {
"activity": "aA4pfJOzyEqmLOY3U3vCoQ",
"port": "Done"
},
"target": {
"activity": "MplDrS_bUE-8td-XBUvWmA",
"port": "In"
}
}
]
}
}

View file

@ -1 +1,287 @@
{"id":"14984c048db34cceaf5e15ece80f9703","definitionId":"64f8f2c852f04dc28f60707034d7a906","name":"Join 2","createdAt":"2023-09-12T18:12:43.392272+00:00","version":1,"toolVersion":"3.0.0.0","variables":[],"inputs":[],"outputs":[],"outcomes":[],"customProperties":{},"isReadonly":false,"isLatest":true,"isPublished":true,"options":{"autoUpdateConsumingWorkflows":false},"root":{"type":"Elsa.Flowchart","version":1,"id":"B2jpPDriPEe-zSOhVuAGeQ","metadata":{},"customProperties":{"source":"FlowchartJsonConverter.cs:46","notFoundConnections":[],"canStartWorkflow":false,"runAsynchronously":false},"activities":[{"text":{"typeName":"String","expression":{"type":"Literal","value":"Start"},"memoryReference":{"id":"2yPLgUudQEGPaschdLdkGg:input-0"}},"id":"2yPLgUudQEGPaschdLdkGg","name":"WriteLine1","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-358.5,"y":-229},"size":{"width":139.296875,"height":50}},"displayText":"Start"}},{"body":{"type":"Elsa.Flowchart","version":1,"id":"zaAIlUtQDEaPqeITeRJ4_w","metadata":{},"customProperties":{"source":"FlowchartJsonConverter.cs:46","notFoundConnections":[],"canStartWorkflow":false,"runAsynchronously":false},"activities":[{"text":{"typeName":"String","expression":{"type":"Literal","value":"Line 2"},"memoryReference":{"id":"g3jVTdvU3EK7V5JqRqfqjQ:input-0"}},"id":"g3jVTdvU3EK7V5JqRqfqjQ","name":"WriteLine1","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-279.5,"y":-294},"size":{"width":139.296875,"height":50}},"displayText":"Line 2"}}],"connections":[]},"id":"eHAEEQ-Iu0GwM3mRxZin0Q","name":"FlowNode1","type":"Elsa.FlowNode","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-120,"y":-179},"size":{"width":211.15625,"height":120}},"displayText":"Line 2"}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"Line 1"},"memoryReference":{"id":"7RQ2sbVHo0SxsyK0dvTKEA:input-0"}},"id":"7RQ2sbVHo0SxsyK0dvTKEA","name":"WriteLine2","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-120,"y":-279},"size":{"width":139.296875,"height":50}},"displayText":"Line 1"}},{"mode":{"typeName":"Elsa.Workflows.Core.Activities.Flowchart.Models.FlowJoinMode, Elsa.Workflows.Core","expression":{"type":"Literal","value":"WaitAll"},"memoryReference":{"id":"dVUuwMm5XUiYpiYoGo5JKA:input-0"}},"id":"dVUuwMm5XUiYpiYoGo5JKA","name":"FlowJoin1","type":"Elsa.FlowJoin","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":180.5,"y":-229},"size":{"width":136.859375,"height":50}}}},{"text":{"typeName":"String","expression":{"type":"Literal","value":"End"},"memoryReference":{"id":"NpZ_yT_irUuE9ASEfYLxbw:input-0"}},"id":"NpZ_yT_irUuE9ASEfYLxbw","name":"WriteLine3","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":400,"y":-229},"size":{"width":139.296875,"height":50}},"displayText":"End"}}],"connections":[{"source":{"activity":"2yPLgUudQEGPaschdLdkGg","port":"Done"},"target":{"activity":"7RQ2sbVHo0SxsyK0dvTKEA","port":"In"}},{"source":{"activity":"2yPLgUudQEGPaschdLdkGg","port":"Done"},"target":{"activity":"eHAEEQ-Iu0GwM3mRxZin0Q","port":"In"}},{"source":{"activity":"7RQ2sbVHo0SxsyK0dvTKEA","port":"Done"},"target":{"activity":"dVUuwMm5XUiYpiYoGo5JKA","port":"In"}},{"source":{"activity":"eHAEEQ-Iu0GwM3mRxZin0Q","port":"Done"},"target":{"activity":"dVUuwMm5XUiYpiYoGo5JKA","port":"In"}},{"source":{"activity":"dVUuwMm5XUiYpiYoGo5JKA","port":"Done"},"target":{"activity":"NpZ_yT_irUuE9ASEfYLxbw","port":"In"}}]}}
{
"id": "14984c048db34cceaf5e15ece80f9703",
"definitionId": "64f8f2c852f04dc28f60707034d7a906",
"name": "Join 2",
"createdAt": "2023-09-12T18:12:43.392272+00:00",
"version": 1,
"toolVersion": "3.0.0.0",
"variables": [],
"inputs": [],
"outputs": [],
"outcomes": [],
"customProperties": {},
"isReadonly": false,
"isLatest": true,
"isPublished": true,
"options": {
"autoUpdateConsumingWorkflows": false
},
"root": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "B2jpPDriPEe-zSOhVuAGeQ",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Start"
},
"memoryReference": {
"id": "2yPLgUudQEGPaschdLdkGg:input-0"
}
},
"id": "2yPLgUudQEGPaschdLdkGg",
"name": "WriteLine1",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -358.5,
"y": -229
},
"size": {
"width": 139.296875,
"height": 50
}
},
"displayText": "Start"
}
},
{
"body": {
"type": "Elsa.Flowchart",
"version": 1,
"id": "zaAIlUtQDEaPqeITeRJ4_w",
"metadata": {},
"customProperties": {
"source": "FlowchartJsonConverter.cs:46",
"notFoundConnections": [],
"canStartWorkflow": false,
"runAsynchronously": false
},
"activities": [
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Line 2"
},
"memoryReference": {
"id": "g3jVTdvU3EK7V5JqRqfqjQ:input-0"
}
},
"id": "g3jVTdvU3EK7V5JqRqfqjQ",
"name": "WriteLine1",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -279.5,
"y": -294
},
"size": {
"width": 139.296875,
"height": 50
}
},
"displayText": "Line 2"
}
}
],
"connections": []
},
"id": "eHAEEQ-Iu0GwM3mRxZin0Q",
"name": "FlowNode1",
"type": "Elsa.FlowNode",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -120,
"y": -179
},
"size": {
"width": 211.15625,
"height": 120
}
},
"displayText": "Line 2"
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "Line 1"
},
"memoryReference": {
"id": "7RQ2sbVHo0SxsyK0dvTKEA:input-0"
}
},
"id": "7RQ2sbVHo0SxsyK0dvTKEA",
"name": "WriteLine2",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": -120,
"y": -279
},
"size": {
"width": 139.296875,
"height": 50
}
},
"displayText": "Line 1"
}
},
{
"mode": {
"typeName": "Elsa.Workflows.Core.Activities.Flowchart.Models.FlowJoinMode, Elsa.Workflows.Core",
"expression": {
"type": "Literal",
"value": "WaitAll"
},
"memoryReference": {
"id": "dVUuwMm5XUiYpiYoGo5JKA:input-0"
}
},
"id": "dVUuwMm5XUiYpiYoGo5JKA",
"name": "FlowJoin1",
"type": "Elsa.FlowJoin",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 180.5,
"y": -229
},
"size": {
"width": 136.859375,
"height": 50
}
}
}
},
{
"text": {
"typeName": "String",
"expression": {
"type": "Literal",
"value": "End"
},
"memoryReference": {
"id": "NpZ_yT_irUuE9ASEfYLxbw:input-0"
}
},
"id": "NpZ_yT_irUuE9ASEfYLxbw",
"name": "WriteLine3",
"type": "Elsa.WriteLine",
"version": 1,
"customProperties": {
"canStartWorkflow": false,
"runAsynchronously": false
},
"metadata": {
"designer": {
"position": {
"x": 400,
"y": -229
},
"size": {
"width": 139.296875,
"height": 50
}
},
"displayText": "End"
}
}
],
"connections": [
{
"source": {
"activity": "2yPLgUudQEGPaschdLdkGg",
"port": "Done"
},
"target": {
"activity": "7RQ2sbVHo0SxsyK0dvTKEA",
"port": "In"
}
},
{
"source": {
"activity": "2yPLgUudQEGPaschdLdkGg",
"port": "Done"
},
"target": {
"activity": "eHAEEQ-Iu0GwM3mRxZin0Q",
"port": "In"
}
},
{
"source": {
"activity": "7RQ2sbVHo0SxsyK0dvTKEA",
"port": "Done"
},
"target": {
"activity": "dVUuwMm5XUiYpiYoGo5JKA",
"port": "In"
}
},
{
"source": {
"activity": "eHAEEQ-Iu0GwM3mRxZin0Q",
"port": "Done"
},
"target": {
"activity": "dVUuwMm5XUiYpiYoGo5JKA",
"port": "In"
}
},
{
"source": {
"activity": "dVUuwMm5XUiYpiYoGo5JKA",
"port": "Done"
},
"target": {
"activity": "NpZ_yT_irUuE9ASEfYLxbw",
"port": "In"
}
}
]
}
}