Reorder methods in WorkflowStateExtractor service
The private methods within the WorkflowStateExtractor service have been reordered for readability and maintainability. The `ApplyInput` and `GetPersistableInput` methods have been moved to a position just before the `ExtractProperties` method. This ensures that similar or related methods are grouped together, improving the logical structure of the code.
This commit is contained in:
parent
a7851175b8
commit
a1b7afdf4f
|
|
@ -35,6 +35,24 @@ public class WorkflowStateExtractor : IWorkflowStateExtractor
|
|||
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public WorkflowExecutionContext Apply(WorkflowExecutionContext workflowExecutionContext, WorkflowState state)
|
||||
{
|
||||
workflowExecutionContext.Id = state.Id;
|
||||
workflowExecutionContext.CorrelationId = state.CorrelationId;
|
||||
workflowExecutionContext.SubStatus = state.SubStatus;
|
||||
workflowExecutionContext.Bookmarks = state.Bookmarks;
|
||||
workflowExecutionContext.Output = state.Output;
|
||||
workflowExecutionContext.ExecutionLogSequence = state.ExecutionLogSequence;
|
||||
workflowExecutionContext.CreatedAt = state.CreatedAt;
|
||||
ApplyInput(state, workflowExecutionContext);
|
||||
ApplyProperties(state, workflowExecutionContext);
|
||||
ApplyActivityExecutionContexts(state, workflowExecutionContext);
|
||||
ApplyCompletionCallbacks(state, workflowExecutionContext);
|
||||
ApplyScheduledActivities(state, workflowExecutionContext);
|
||||
return workflowExecutionContext;
|
||||
}
|
||||
|
||||
private void ApplyInput(WorkflowState state, WorkflowExecutionContext workflowExecutionContext)
|
||||
{
|
||||
|
|
@ -59,24 +77,6 @@ public class WorkflowStateExtractor : IWorkflowStateExtractor
|
|||
return filteredInput;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public WorkflowExecutionContext Apply(WorkflowExecutionContext workflowExecutionContext, WorkflowState state)
|
||||
{
|
||||
workflowExecutionContext.Id = state.Id;
|
||||
workflowExecutionContext.CorrelationId = state.CorrelationId;
|
||||
workflowExecutionContext.SubStatus = state.SubStatus;
|
||||
workflowExecutionContext.Bookmarks = state.Bookmarks;
|
||||
workflowExecutionContext.Output = state.Output;
|
||||
workflowExecutionContext.ExecutionLogSequence = state.ExecutionLogSequence;
|
||||
workflowExecutionContext.CreatedAt = state.CreatedAt;
|
||||
ApplyInput(state, workflowExecutionContext);
|
||||
ApplyProperties(state, workflowExecutionContext);
|
||||
ApplyActivityExecutionContexts(state, workflowExecutionContext);
|
||||
ApplyCompletionCallbacks(state, workflowExecutionContext);
|
||||
ApplyScheduledActivities(state, workflowExecutionContext);
|
||||
return workflowExecutionContext;
|
||||
}
|
||||
|
||||
private void ExtractProperties(WorkflowState state, WorkflowExecutionContext workflowExecutionContext)
|
||||
{
|
||||
state.Properties = workflowExecutionContext.Properties;
|
||||
|
|
|
|||
Loading…
Reference in a new issue