-
1. Re: Weirdness with if-then-else in jboss-cli on Wildfly 8.1.0
x046866x Jul 24, 2014 5:29 AM (in response to x046866x)As it turns out; it seems that ALL the echo's are executed, even though the if-else-end is honored properly.
-
2. Re: Weirdness with if-then-else in jboss-cli on Wildfly 8.1.0
stanley.hillner Jul 24, 2014 8:35 AM (in response to x046866x)Hi, I'm also facing this issue and after searching a long time for possible workarounds I finally opened a bug: https://issues.jboss.org/browse/WFLY-3662.
I think there's no way getting commands to work as expected in control flows until they fixed it
-
3. Re: Re: Weirdness with if-then-else in jboss-cli on Wildfly 8.1.0
x046866x Jul 24, 2014 11:14 AM (in response to stanley.hillner)Stanley,
What I discovered is that the actual execution of the commands within the if-else-endif was honored as expected, but ALL the echos within the blocks were displayed.
Try this (make sure you add the AAA system-property first):
**************************************************************************
connect
if result.value==ELSE of /system-property=AAA:read-resource
echo "if block"
/system-property=AAA:write-attribute(name=value,value=IF)
else
echo "else block"
/system-property=AAA:write-attribute(name=value,value=ELSE)
end-if
reload
**************************************************************************
You can tinker with the value of AAA using the control panel adn you'll notice that ALL the echo's get displayed, but the properties are updated according to the try/catch.
-
4. Re: Re: Weirdness with if-then-else in jboss-cli on Wildfly 8.1.0
shi_1 Jul 25, 2014 2:16 AM (in response to x046866x)Yes that's exactly what I mean. This is just a bug and I hope it will be scheduled soon