🍑Component alias
LiteFlow supports the setting of component aliases, and you can fill in the names that are easy to remember.
If a component alias is set, the corresponding alias will be included when printing out the step information.
The setting of component alias is divided into two cases:
# Springboot & Spring scan type
In most cases, many people are using the springboot/spring framework, so just make the following changes
Replace @Component
with @LiteflowComponent
in your defined components:
@LiteflowComponent(id = "a", name = "cmpA")
public class ACmp extends NodeComponent {
@Override
public void process() {
System.out.println("ACmp executed!");
}
}
# Rules file type
In a non-spring system project, the component needs to be defined in the rule file, and the name attribute needs to be added to the <node>
node:
<node id="a" name="组件A" class="com.yomahub.liteflow.test.config.cmp.ACmp"/>
<node id="b" name="组件B" class="com.yomahub.liteflow.test.config.cmp.BCmp"/>
For the printing of aliases, please refer to Printing Details.
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27