Bytecode Mapping Issue For Boolean Implicit Cast

(Doc ID 1529594.1)

Last updated on FEBRUARY 18, 2013

Applies to:

Oracle(R) BPEL Process Manager - Version and later
Information in this document applies to any platform.


On : version, BPEL Compiler

Actual Behavior
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, however it stopped working after migrating to SOA  The cause has been discovered a being due to a bytecode generation issue.

When this composite is deployed in the SOA Suite version and the expression is compiled, the bytecode generated is:

This occurs due to an implicit casting from String to Boolean, on the 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 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.

Expected Behavior
No changes in the bytecode between versions.

The issue can be reproduced at will with the following steps:

  1. Deploy composite
  2. Notice the bytecode:  setExpression("bpws:getVariableData('CancellationInProgressVariable')!='true'");
  3. Deploy composite
  4. Notice the bytecode: setExpression("bpws:getVariableData(\"CancellationInProgressVariable\") = ora:tryToCastToBoolean(\"true\")");

Business Impact
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