🌯Define file script
LiteFlow supports script files since 2.6.4. In addition to writing the script content in the configuration file, you can also write it in a file. If the script is large, it is recommended to write it in a file. The IDE is also relatively friendly to the syntax highlighting and code hinting of files. Writing scripts would be more convenient.
It should be noted that currently LiteFlow only supports script files in the classpath, and absolute paths cannot be defined here. May be supported in the future.
You can define it like this (example in xml file format):
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<nodes>
<node id="s1" name="Common Script" type="script" file="xml-script-file/s1.groovy"/>
<node id="s2" name="Switch Script" type="switch_script" file="xml-script-file/s2.groovy"/>
</nodes>
<chain name="chain1">
THEN(a, b, c, s1)
</chain>
<chain name="chain2">
THEN(d, SWITCH(s2).to(a, b))
</chain>
</flow>
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27