⚙️Config
# Definition of components
After depend on the above jar package, you need to define and implement some components to ensure that SpringBoot will scan these components and register them in the context.
@Component("a")
public class ACmp extends NodeComponent {
@Override
public void process() {
//do your business
}
}
And so on to define components b,c:
@Component("b")
public class BCmp extends NodeComponent {
@Override
public void process() {
//do your business
}
}
@Component("c")
public class CCmp extends NodeComponent {
@Override
public void process() {
//do your business
}
}
# SpringBoot configuration file
Then, add configuration to your SpringBoot's application.properties or application.yml (here properties is the example, yaml is the same)
For more configuration items please refer to the Configuration items section.
liteflow.rule-source=config/flow.el.xml
# Definition of rules file
Next you need to define the rules in config/flow.el.xml
under resources:
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<chain name="chain1">
THEN(a, b, c);
</chain>
</flow>
SpringBoot will automatically load the rules file when it starts.
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27