My Oracle Support Banner

Error in assigning data to JSON variable inside a scope (Doc ID 2319115.1)

Last updated on DECEMBER 15, 2023

Applies to:

Oracle SOA Suite - Version 12.2.1.2.0 and later
Information in this document applies to any platform.

Symptoms

Assigning data to JSON variable which is inside a scope (under the main Scope) is not working. In the BPEL process, we have added a new scope and created a variable of type JSON inside this scope. While assigning some string value to this variable, the below error is being thrown:


ERROR
-----------------------
Expression execution error.
js expression: "Scope1.Variable1" executed with an exception.
The js expression most likely did not execute correctly because: ReferenceError: "Scope1" is not defined.
Check the source of the js expression and the assumptions that are made in the process.
</summary>
,code=<code>XPathExecutionError</code>}
cause: {Expression execution error.
js expression: "Scope1.Variable1" executed with an exception.
The js expression most likely did not execute correctly because: ReferenceError: "Scope1" is not defined.
Check the source of the js expression and the assumptions that are made in the process.



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


1. Open JDeveloper
2. Create a new composite
3. Create a BPEL
4. Inside BPEL, create a Scope
5. Inside the scope, create a JSON variable
5.1. Click on the X on top left of the scope to view the scope variables
5.2. Green "+" to create new variable
- Type: JSON
- Magnifier (to Browse Types) -> JSON primitive types -> String
- OK
5.3. Apply -> Ok
6. Inside Scope, add an assign activity
7. Inside assign, assign a string to the JSON variable created at Step 5 (eg.
"Test")
8. Deploy and test the composite from EM console
9. Notice the results: Instance fails with Unhandled BPELFault.
10. Check the audit trail of the instance - notice the results:


- same assignment works in main BPEL process, but fails when inside scope
- XML to XML assignments work as expected inside scope



Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.