🍍Component tag
You can add tag values to each component in EL expressions, using the tag
keyword:
<chain name="chain1">
THEN(
a.tag("tag1"),
b.tag("tag2"),
c.tag("tag3")
);
</chain>
You can get the current tag through this.getTag()
in the code, which is very useful especially when there are multiple same components in the EL rule, you can get different parameters according to tag
. Or make different judgments for the same component according to the tag.
@LiteflowComponent("b")
public class BCmp extends NodeComponent {
@Override
public void process() {
String tag = this.getTag();
...
}
}
Of course the following examples are allowed:
<chain name="chain1">
THEN(
a.tag("1"), a.tag("2"), a.tag("3"), a.tag("4"), a.tag("5"), a.tag("6")
);
</chain>
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27