Use of boolean variables in BPEL switch statements
438622Jun 30 2005 — edited Jul 12 2005I have a workflow with a single boolean input parameter:
<element name="input" type="boolean"/>
I wish to use a switch statement within the workflow, based on the value of that boolean parameter.
When I use the following XPath expression:
bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")
I get the correct functionality, although I get the following BPEL compiler warning:
" [bpelc] [Warning ORABPEL-10078]: return value of this expression may not be a boolean
[bpelc] [Description]: in line 35 of "C:\eclipse\workspace\Boolean\Boolean.bpel", xpath expression "bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")" used in <switch> may not return boolean type value, the xpath engine would automatically try to convert the return value to boolean..
[bpelc] [Potential fix]: Please use one of the built-in boolean functions from xpath http://www.w3.org/TR/xpath#section-Boolean-Functions to convert the return value to boolean.."
However, the boolean functions referenced do not appear to be relevant to a variable which is already of a boolean type. If I attempt to use the boolean() function in my XPath expression, I get rid of the compiler error, but the workflow now does not work as required.
How can I get rid of the compiler warning and still get the required functionality, and/or am I doing the wrong thing?
I am currently running on JBoss, with BPEL release 2.1.2 [build #1226].
Thanks for any help or ideas.