bug #I69UVL 如果switch返回为空或者null,无法选取到default组件

This commit is contained in:
everywhere.z
2023-01-10 19:07:50 +08:00
parent 1299055a7c
commit f46b6024ae
2 changed files with 8 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ public class SwitchELSpringbootTest extends BaseTest {
//switch返回如果是空会走default选项
@Test
public void testSwitch8() throws Exception{
LiteflowResponse response = flowExecutor.execute2Resp("chain7", "arg");
LiteflowResponse response = flowExecutor.execute2Resp("chain8", "arg");
Assert.assertTrue(response.isSuccess());
Assert.assertEquals("a==>j==>d",response.getExecuteStepStr());
}

View File

@@ -46,8 +46,14 @@
<chain name="chain7">
THEN(
a,
SWITCH(j).to(b, c).DEFAULT(d)
SWITCH(i).to(b, c).DEFAULT(d)
);
</chain>
<chain name="chain8">
THEN(
a,
SWITCH(j).to(b, c).DEFAULT(d)
);
</chain>
</flow>