Skip to content

Commit af1e154

Browse files
committed
unnecessary changes were undone
1 parent d966515 commit af1e154

File tree

5 files changed

+1
-22
lines changed

5 files changed

+1
-22
lines changed

src/WorkflowCore.Testing/WorkflowCore.Testing.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
1313
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
1414
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.0" />
15-
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
1615
</ItemGroup>
1716

1817
<ItemGroup>

src/WorkflowCore/Models/ExecutionPointer.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ public IReadOnlyCollection<string> Scope
5151
get => _scope;
5252
set => _scope = new List<string>(value);
5353
}
54-
55-
public bool IsComplete => Status == PointerStatus.Complete;
56-
57-
public bool HasChildren => Children?.Count > 0;
5854
}
5955

6056
public enum PointerStatus

src/WorkflowCore/Services/ExecutionResultProcessor.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ public ExecutionResultProcessor(IExecutionPointerFactory pointerFactory, IDateTi
2929

3030
public void ProcessExecutionResult(WorkflowInstance workflow, WorkflowDefinition def, ExecutionPointer pointer, WorkflowStep step, ExecutionResult result, WorkflowExecutorResult workflowResult)
3131
{
32-
var stepInfo = $"{step.Name ?? step.BodyType.Name} ({step.Id})";
33-
3432
pointer.PersistenceData = result.PersistenceData;
3533
pointer.Outcome = result.OutcomeValue;
3634
if (result.SleepFor.HasValue)
3735
{
3836
pointer.SleepUntil = _datetimeProvider.UtcNow.Add(result.SleepFor.Value);
3937
pointer.Status = PointerStatus.Sleeping;
40-
_logger.LogDebug("Step {StepName} on workflow {WorkflowDefinitionId} ({WorkflowId}) will sleep for {SleepUntil}",
41-
stepInfo, workflow.WorkflowDefinitionId, workflow.Id, result.SleepFor.Value);
4238
}
4339

4440
if (!string.IsNullOrEmpty(result.EventName))
@@ -58,9 +54,6 @@ public void ProcessExecutionResult(WorkflowInstance workflow, WorkflowDefinition
5854
SubscribeAsOf = result.EventAsOf,
5955
SubscriptionData = result.SubscriptionData
6056
});
61-
62-
_logger.LogDebug("Step {StepName} on workflow {WorkflowDefinitionId} ({WorkflowId}) waiting for event {EventName}",
63-
stepInfo, workflow.WorkflowDefinitionId, workflow.Id, pointer.EventName);
6457
}
6558

6659
if (result.Proceed)
@@ -94,9 +87,6 @@ public void ProcessExecutionResult(WorkflowInstance workflow, WorkflowDefinition
9487
WorkflowDefinitionId = workflow.WorkflowDefinitionId,
9588
Version = workflow.Version
9689
});
97-
98-
_logger.LogDebug("Step {StepName} on workflow {WorkflowDefinitionId} ({WorkflowId}) completed",
99-
stepInfo, workflow.WorkflowDefinitionId, workflow.Id);
10090
}
10191
else
10292
{

src/WorkflowCore/Services/WorkflowExecutor.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private async Task DetermineNextExecutionTime(WorkflowInstance workflow, Workflo
245245
workflow.NextExecution = Math.Min(pointerSleep, workflow.NextExecution ?? pointerSleep);
246246
}
247247

248-
foreach (var pointer in workflow.ExecutionPointers.Where(x => x.Active && x.HasChildren))
248+
foreach (var pointer in workflow.ExecutionPointers.Where(x => x.Active && (x.Children ?? new List<string>()).Count > 0))
249249
{
250250
if (!workflow.ExecutionPointers.FindByScope(pointer.Id).All(x => x.EndTime.HasValue))
251251
continue;
@@ -279,8 +279,6 @@ private async Task OnComplete(WorkflowInstance workflow, WorkflowDefinition def)
279279
await middlewareRunner.RunPostMiddleware(workflow, def);
280280
}
281281

282-
_logger.LogDebug("Workflow {WorkflowDefinitionId} ({Id}) completed", workflow.WorkflowDefinitionId, workflow.Id);
283-
284282
_publisher.PublishNotification(new WorkflowCompleted
285283
{
286284
EventTimeUtc = _datetimeProvider.UtcNow,

src/providers/WorkflowCore.Persistence.EntityFramework/Services/EntityFrameworkPersistenceProvider.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ public async Task<WorkflowInstance> GetWorkflowInstance(string Id, CancellationT
100100
{
101101
using (var db = ConstructDbContext())
102102
{
103-
if (!Guid.TryParse(Id, out _))
104-
{
105-
106-
}
107103
var uid = new Guid(Id);
108104
var raw = await db.Set<PersistedWorkflow>()
109105
.Include(wf => wf.ExecutionPointers)

0 commit comments

Comments
 (0)