Skip to content

Commit 00788a8

Browse files
committed
flow:调整命名
1 parent 992fa8c commit 00788a8

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

flow/src/main/java/org/bekit/flow/flow/FlowExecutor.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ public String execute(Object flow, Object processResult, FlowContext<?> context)
253253
return (String) execute(flow, new Object[]{});
254254
case ONLY_PROCESS_RESULT:
255255
return (String) execute(flow, new Object[]{processResult});
256-
case ONLY_TARGET_CONTEXT:
256+
case ONLY_FLOW_CONTEXT:
257257
return (String) execute(flow, new Object[]{context});
258-
case PROCESS_RESULT_AND_TARGET_CONTEXT:
258+
case PROCESS_RESULT_AND_FLOW_CONTEXT:
259259
return (String) execute(flow, new Object[]{processResult, context});
260260
default:
261261
throw new IllegalStateException("节点决策器执行器内部要素不对");
@@ -275,13 +275,13 @@ public enum ParameterType {
275275
*/
276276
ONLY_PROCESS_RESULT,
277277
/**
278-
* 只有目标上下文
278+
* 只有流程上下文
279279
*/
280-
ONLY_TARGET_CONTEXT,
280+
ONLY_FLOW_CONTEXT,
281281
/**
282-
* 处理结果和目标上下文都有
282+
* 处理结果和流程上下文都有
283283
*/
284-
PROCESS_RESULT_AND_TARGET_CONTEXT,;
284+
PROCESS_RESULT_AND_FLOW_CONTEXT,;
285285
}
286286
}
287287
}

flow/src/main/java/org/bekit/flow/flow/FlowParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private static FlowExecutor.NodeExecutor.NodeDeciderExecutor parseNodeDecider(Me
148148
if (parameterTypes.length == 1) {
149149
if (parameterTypes[0] == FlowContext.class) {
150150
// 入参类型:(FlowContext)
151-
parameterType = FlowExecutor.NodeExecutor.NodeDeciderExecutor.ParameterType.ONLY_TARGET_CONTEXT;
151+
parameterType = FlowExecutor.NodeExecutor.NodeDeciderExecutor.ParameterType.ONLY_FLOW_CONTEXT;
152152
} else {
153153
// 入参类型:(T)
154154
Assert.isTrue(processorExecutor != null, String.format("节点决策器[%s]不能有非FlowContext入参,因为这个节点没有处理器", nodeDeciderMethod));
@@ -160,7 +160,7 @@ private static FlowExecutor.NodeExecutor.NodeDeciderExecutor parseNodeDecider(Me
160160
Assert.isTrue(processorExecutor != null, String.format("节点决策器[%s]不能有非FlowContext入参,因为这个节点没有处理器", nodeDeciderMethod));
161161
Assert.isAssignable(parameterTypes[0], processorExecutor.getReturnType(), String.format("节点决策器[%s]的第一个入参类型必须能被其处理器返回类型赋值", nodeDeciderMethod));
162162
Assert.isTrue(parameterTypes[1] == FlowContext.class, String.format("节点决策器[%s]的第二个入参类型必须是FlowContext", nodeDeciderMethod));
163-
parameterType = FlowExecutor.NodeExecutor.NodeDeciderExecutor.ParameterType.PROCESS_RESULT_AND_TARGET_CONTEXT;
163+
parameterType = FlowExecutor.NodeExecutor.NodeDeciderExecutor.ParameterType.PROCESS_RESULT_AND_FLOW_CONTEXT;
164164
} else {
165165
throw new IllegalArgumentException(String.format("节点决策器[%s]的入参类型必须为:()、(FlowContext)、(T)、(T, FlowContext)————T表示能被处理器返回结果赋值的类型", nodeDeciderMethod));
166166
}

0 commit comments

Comments
 (0)