Skip to content

Commit f664870

Browse files
feat(execution): add constructor to ExecutionStep for custom stepId
- Introduced a new constructor in ExecutionStep to allow setting a custom stepId. - Updated MapReducePlanExecutor to utilize the new constructor, ensuring copied steps maintain their original stepId for consistency.
1 parent 6da4219 commit f664870

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/manus/runtime/entity/vo/ExecutionStep.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public ExecutionStep() {
3939
this.stepId = "step-" + UUID.randomUUID().toString();
4040
}
4141

42+
public ExecutionStep(String stepId) {
43+
this.stepId = stepId;
44+
}
45+
4246
@JsonIgnore
4347
private Integer stepIndex;
4448

spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/manus/runtime/executor/MapReducePlanExecutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,9 @@ private List<ExecutionStep> copyMapSteps(List<ExecutionStep> originalSteps, Stri
401401
List<ExecutionStep> copiedSteps = new ArrayList<>();
402402

403403
for (ExecutionStep originalStep : originalSteps) {
404-
ExecutionStep copiedStep = new ExecutionStep();
404+
ExecutionStep copiedStep = new ExecutionStep(originalStep.getStepId());
405405
// Preserve the original stepId to maintain consistency with pre-created
406406
// records
407-
copiedStep.setStepId(originalStep.getStepId());
408407
copiedStep.setStepIndex(originalStep.getStepIndex());
409408
copiedStep.setStepRequirement(originalStep.getStepRequirement());
410409
copiedStep.setTerminateColumns(originalStep.getTerminateColumns());

0 commit comments

Comments
 (0)