bug #I61H49 脚本异常希望可以抛出到response

This commit is contained in:
everywhere.z
2022-11-30 17:14:12 +08:00
parent 2bd8e0a86b
commit d5f78e2eff
8 changed files with 91 additions and 33 deletions

View File

@@ -0,0 +1 @@
liteflow.rule-source=throwException/flow.xml

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<nodes>
<node id="s1" name="普通脚本1" type="script" language="js">
<![CDATA[
var a=3;
var b=2;
var c=1;
var d=5;
function addByArray(values) {
var sum = 0;
for (var i = 0; i < values.length; i++) {
sum += values[i];
}
return sum;
}
var result = addByArray([a,b,c,d]);
r=y;
defaultContext.setData("s1",parseInt(result));
]]>
</node>
</nodes>
<chain name="chain1">
THEN(a, s1);
</chain>
</flow>