Bytecode Mapping Issue For Boolean Implicit Cast
Last updated on FEBRUARY 18, 2013
Applies to:Oracle(R) BPEL Process Manager - Version 18.104.22.168.0 and later
Information in this document applies to any platform.
On : 22.214.171.124.0 version, BPEL Compiler
Bytecode mapping issue for boolean implicit cast
After defining a "Switch" activity in a BPEL process with the following expression: bpws:getVariableData('CancellationInProgressVariable') !='true'
This executed correctly in SOA 126.96.36.199.0, however it stopped working after migrating to SOA 188.8.131.52.0. The cause has been discovered a being due to a bytecode generation issue.
When this composite is deployed in the SOA Suite 184.108.40.206 version and the expression is compiled, the bytecode generated is:
This occurs due to an implicit casting from String to Boolean, on the 220.127.116.11 version the compiler adds the function ora:tryToCastToBoolean to do the cast, but the operator is replaced from “not equal” to “equal”, completely inverting the logic. You did some tests, replacing the string ‘true’ by the function true() in the expression and redeploying the composite. The issue does not happen in this case. Our main problem, however, is that the issue is happening in an old long running composite version. It means that there is no way to fix it doing a code change, because old instances already running will always complete using that version.
Is it possible to provide a patch to fix this issue in the bytecode generation for 18.104.22.168? As part of the patch deployment, you would need to shutdown your servers, remove all bytecode already there in the filesystem from all managed servers, apply the patch and restart the server. It would recreate the bytecode again when the servers are restarted after apply the patch, this time without the issue.
No changes in the bytecode between versions.
The issue can be reproduced at will with the following steps:
- Deploy 22.214.171.124.0 composite
- Notice the bytecode: setExpression("bpws:getVariableData('CancellationInProgressVariable')!='true'");
- Deploy 126.96.36.199.0 composite
- Notice the bytecode: setExpression("bpws:getVariableData(\"CancellationInProgressVariable\") = ora:tryToCastToBoolean(\"true\")");
The issue has the following business impact:
it causes instances to be processed incorrectly when they are migrated to the newer version. The impact is felt across approximately 1000 instances.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms