服务编排(Esf框架Flow)
<p>服务编排(Esf框架Flow)
版本需求
需要微服务框架1.0.5</p>
<pre><code><parent&
<groupId&com.ailk.ecs</groupId&
<artifactId&ecs-framework-parent</artifactId&
<version&1.0.5</version&
</parent&
<dependencies&
<dependency&
<groupId&com.ailk.ecs</groupId&
<artifactId&ecs-framework</artifactId&
<version&1.0.5</version&
</dependency&
</dependencies&</code></pre>
<p>使用
规范
stepsKey必须是以flow.xxx其中即为flow的名称(驼峰命名方式,不能有.号)
开发
编写step
名称为step1的step</p>
<p>原Esf框架中的step只需把所继承的类引用修改下,再加上@Component注解即可
名称为test.step的step(step的名称可以自定义,不填写默认为类名,但首字母小写)</p>
<p>设定流程
[Steps]
1, step1
2, test.step, TERMINATE
[Transitions]
1, StepCase01, TERMINATE
与Esf框架中不同的是,原Esf框架在此处指定的具体的类,此框架中直接指定component的名称
调用step</p>
<p>stepsKey的命名规范请参照【规范】
此处flow.test的值存储在zk的path节点下,值为已设定的流程
假如application的名称为test,对应的环境为testenv,则flow.test的数据节点path为/config/test,testenv/flow/test,值为:
[Steps]
1, step1
2, test.step, TERMINATE
[Transitions]
1, StepCase01, TERMINATE
备注
step的步骤可以通过配置中心,在线修改实时生效</p>