Skip to content

Commit

Permalink
Merge pull request #683 from danielgerlag/issue660
Browse files Browse the repository at this point in the history
Issue 660: pass current context to default branch
  • Loading branch information
danielgerlag authored Oct 22, 2020
2 parents 32fedfd + 665e945 commit b2cecfb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/If.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public override ExecutionResult Run(IStepExecutionContext context)
{
if (Condition)
{
return ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
return ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
}

return ExecutionResult.Next();
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/OutcomeSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public override ExecutionResult Run(IStepExecutionContext context)
{
if (context.PersistenceData == null)
{
var result = ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
var result = ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
result.OutcomeValue = GetPreviousOutcome(context);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/Schedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override ExecutionResult Run(IStepExecutionContext context)
{
if (!((SchedulePersistenceData)context.PersistenceData).Elapsed)
{
return ExecutionResult.Branch(new List<object>() { null }, new SchedulePersistenceData() { Elapsed = true });
return ExecutionResult.Branch(new List<object>() { context.Item }, new SchedulePersistenceData() { Elapsed = true });
}

if (context.Workflow.IsBranchComplete(context.ExecutionPointer.Id))
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/Sequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public override ExecutionResult Run(IStepExecutionContext context)
{
if (context.PersistenceData == null)
{
return ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
return ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
}

if ((context.PersistenceData is ControlPersistenceData) && ((context.PersistenceData as ControlPersistenceData).ChildrenActive))
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/When.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override ExecutionResult Run(IStepExecutionContext context)

if (context.PersistenceData == null)
{
return ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
return ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
}

if ((context.PersistenceData is ControlPersistenceData) && ((context.PersistenceData as ControlPersistenceData).ChildrenActive))
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowCore/Primitives/While.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public override ExecutionResult Run(IStepExecutionContext context)
{
if (Condition)
{
return ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
return ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
}

return ExecutionResult.Next();
Expand Down
8 changes: 4 additions & 4 deletions src/WorkflowCore/WorkflowCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Description>Workflow Core is a light weight workflow engine targeting .NET Standard.</Description>
<Version>3.2.5</Version>
<AssemblyVersion>3.2.5.0</AssemblyVersion>
<FileVersion>3.2.5.0</FileVersion>
<Version>3.2.6</Version>
<AssemblyVersion>3.2.6.0</AssemblyVersion>
<FileVersion>3.2.6.0</FileVersion>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageIconUrl>https://github.com/danielgerlag/workflow-core/raw/master/src/logo.png</PackageIconUrl>
<PackageVersion>3.2.5</PackageVersion>
<PackageVersion>3.2.6</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/WorkflowCore.Users/Primitives/UserTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override ExecutionResult Run(IStepExecutionContext context)

if (context.PersistenceData == null)
{
var result = ExecutionResult.Branch(new List<object>() { null }, new ControlPersistenceData() { ChildrenActive = true });
var result = ExecutionResult.Branch(new List<object>() { context.Item }, new ControlPersistenceData() { ChildrenActive = true });
result.OutcomeValue = action.OutcomeValue;
return result;
}
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/WorkflowCore.Users/WorkflowCore.Users.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Description>Provides extensions for Workflow Core to enable human workflows.</Description>
<Version>2.1.0</Version>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<Version>2.1.1</Version>
<AssemblyVersion>2.1.1.0</AssemblyVersion>
<FileVersion>2.1.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit b2cecfb

Please sign in to comment.