mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-15 04:22:09 +08:00
29 lines
771 B
XML
29 lines
771 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE flow PUBLIC "liteflow" "liteflow.dtd">
|
|
<flow>
|
|
<nodes>
|
|
<node id="s1" name="普通脚本1" type="script" language="python">
|
|
<![CDATA[
|
|
import json
|
|
x='{"name": "Jack", "age": 75, "nationality": "China"}'
|
|
jsonData=json.loads(x)
|
|
temperature=jsonData['name']
|
|
print(temperature)
|
|
|
|
|
|
a=6
|
|
b=10
|
|
if a>5:
|
|
b=5
|
|
print 'hello'
|
|
else:
|
|
print 'hi'
|
|
defaultContext.setData("s1",a*b)
|
|
]]>
|
|
</node>
|
|
</nodes>
|
|
|
|
<chain name="chain1">
|
|
THEN(a, b, c, s1);
|
|
</chain>
|
|
</flow> |