Some 'more, in-depth' information on Oracle BPEL PM, ESB and other SOA, day2day things

Tuesday, May 23, 2006

BPEL 10.1.2.0.2: the 'right' usage of boolean

Today Flemming,
a fellow from Denmark (I went there earlier this year to give a BPEL course) - posted some strange behaviour on the OTN BPEL forums.

"The implementation of the boolean() function in BPEL (version 10.1.2.1.0) have an FATAL ERROR.

boolean(0) gives 1 and
boolean(false) gives 1"


Sounds little strange indeed, so I build a little testcase to see what is going on, the results are strange - but can be used to conclude a workaround.

Here are my findings (all within an <assign> activity).

<resultTrueWith>true</resultTrueWith>
comes from boolean('true')

<resultTrueWithOut>false</resultTrueWithOut>
comes from boolean(true)

<resultFalseWith>false</resultFalseWith>
comes from boolean('false')

<resultFalseWithOut/>
comes from boolean(false)

<result0true>false</result0true>
comes from boolean(0)

<result1false>true</result1false>
comes from boolean(1)

The conclusion is to use boolean('true') to get true and boolean('false') to get false, Or use numbers.

I have filed bug 5241764 for this - and hope to get it into the upcoming 10.1.3.1 release.

0 Comments:

Post a Comment

<< Home