public class FlowEngineDefault extends Object implements FlowEngine
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Chain> |
chainMap |
protected Map<String,FlowDriver> |
driverMap |
protected List<org.noear.solon.core.util.RankEntity<ChainInterceptor>> |
interceptorList |
| Constructor and Description |
|---|
FlowEngineDefault() |
FlowEngineDefault(FlowDriver driver) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
activity_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
void |
addInterceptor(ChainInterceptor interceptor,
int index)
添加拦截器
|
protected boolean |
condition_test(FlowDriver driver,
FlowExchanger exchanger,
Condition condition,
boolean def)
条件检测
|
void |
eval(Node startNode,
int depth,
FlowExchanger exchanger)
评估
|
void |
eval(String chainId,
String startId,
int depth,
FlowExchanger exchanger)
评估
|
protected void |
evalDo(ChainInvocation inv)
执行评估
|
protected boolean |
exclusive_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth)
运行排他网关
|
Chain |
getChain(String chainId)
获取链
|
Collection<Chain> |
getChains()
获取所有链
|
FlowDriver |
getDriver(Chain chain)
获取驱动
|
<T extends FlowDriver> |
getDriverAs(Chain chain,
Class<T> driverClass)
获取驱动
|
protected boolean |
inclusive_run_in(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
inclusive_run_out(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
inclusive_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth)
运行包容网关
|
protected boolean |
iterator_run_in(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
iterator_run_out(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
iterator_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
void |
load(Chain chain)
加载链
|
protected boolean |
node_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth)
运行节点
|
protected void |
onNodeEnd(FlowDriver driver,
FlowExchanger exchanger,
Node node)
节点运行结束时
|
protected void |
onNodeStart(FlowDriver driver,
FlowExchanger exchanger,
Node node)
节点运行开始时
|
protected boolean |
parallel_run_in(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
parallel_run_out(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth) |
protected boolean |
parallel_run(FlowDriver driver,
FlowExchanger exchanger,
Node node,
int depth)
运行并行网关
|
protected void |
prepare(FlowExchanger exchanger)
准备工作
|
void |
register(String name,
FlowDriver driver)
注册链驱动器
|
void |
removeInterceptor(ChainInterceptor interceptor)
移除拦截器
|
FlowStatefulService |
statefulService()
有状态的服务
|
protected void |
task_exec(FlowDriver driver,
FlowExchanger exchanger,
Node node)
执行任务
|
void |
unload(String chainId)
卸载链
|
void |
unregister(String name)
注销链驱动器
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddInterceptor, eval, eval, eval, eval, eval, eval, eval, eval, eval, load, newInstance, newInstance, registerprotected final Map<String,FlowDriver> driverMap
protected final List<org.noear.solon.core.util.RankEntity<ChainInterceptor>> interceptorList
public FlowEngineDefault()
public FlowEngineDefault(FlowDriver driver)
public FlowDriver getDriver(Chain chain)
FlowEnginegetDriver in interface FlowEnginepublic <T extends FlowDriver> T getDriverAs(Chain chain, Class<T> driverClass)
FlowEnginegetDriverAs in interface FlowEnginepublic FlowStatefulService statefulService()
FlowEnginestatefulService in interface FlowEnginepublic void addInterceptor(ChainInterceptor interceptor, int index)
FlowEngineaddInterceptor in interface FlowEngineinterceptor - 拦截器index - 顺序位public void removeInterceptor(ChainInterceptor interceptor)
FlowEngineremoveInterceptor in interface FlowEnginepublic void register(String name, FlowDriver driver)
FlowEngineregister in interface FlowEnginename - 名字driver - 驱动器public void unregister(String name)
FlowEngineunregister in interface FlowEnginepublic void load(Chain chain)
FlowEngineload in interface FlowEnginechain - 链public void unload(String chainId)
FlowEngineunload in interface FlowEnginechainId - 链Idpublic Collection<Chain> getChains()
FlowEnginegetChains in interface FlowEnginepublic Chain getChain(String chainId)
FlowEnginegetChain in interface FlowEnginepublic void eval(String chainId, String startId, int depth, FlowExchanger exchanger) throws FlowException
eval in interface FlowEnginechainId - 链exchanger - 交换器startId - 开始Iddepth - 执行深度FlowExceptionpublic void eval(Node startNode, int depth, FlowExchanger exchanger) throws FlowException
eval in interface FlowEnginestartNode - 开始节点depth - 执行深度exchanger - 交换器FlowExceptionprotected void prepare(FlowExchanger exchanger)
protected void evalDo(ChainInvocation inv) throws FlowException
FlowExceptionprotected void onNodeStart(FlowDriver driver, FlowExchanger exchanger, Node node)
protected void onNodeEnd(FlowDriver driver, FlowExchanger exchanger, Node node)
protected boolean condition_test(FlowDriver driver, FlowExchanger exchanger, Condition condition, boolean def) throws FlowException
FlowExceptionprotected void task_exec(FlowDriver driver, FlowExchanger exchanger, Node node) throws FlowException
FlowExceptionprotected boolean node_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean activity_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth)
protected boolean inclusive_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean inclusive_run_in(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean inclusive_run_out(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean exclusive_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean parallel_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean parallel_run_in(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean parallel_run_out(FlowDriver driver, FlowExchanger exchanger, Node node, int depth) throws FlowException
FlowExceptionprotected boolean iterator_run(FlowDriver driver, FlowExchanger exchanger, Node node, int depth)
protected boolean iterator_run_in(FlowDriver driver, FlowExchanger exchanger, Node node, int depth)
protected boolean iterator_run_out(FlowDriver driver, FlowExchanger exchanger, Node node, int depth)
Copyright © 2025. All rights reserved.