TypeError: Cannot find function in object http://docs.oasis-open.org/wsbpel/2.0/process/executable

With Soa 12.2.1 , we can create BPEL component and use Javascript inside the BPEL activities like assign, while , if , wait, etc

We also have a Javascript activity in which we can write block of javascript code to manipulate the data.

“bpel” is one of the global object which binds to bpel functions. We can use these functions in Javascript code. For example to generate uuid , we can use “bpel.uuid()”.

If we use these bpel functions, at runtime, we might get the following error

TypeError: Cannot find function <name> in object http://docs.oasis-open.org/wsbpel/2.0/process/executable
TypeError: Cannot find function processName in object http://docs.oasis-open.org/wsbpel/2.0/process/executable
Error

There seems to be conflict with respect to namespace prefix “bpel” used in .bpel file and  global object “bpel” used in Javascript.

To overcome the error, open the bpel component in source mode, look for namespace prefix “bpel”.

TypeError: Cannot find function
BPEL Namespace Prefix

Change it to any other name. Search for  any code  using this prefix, make modification in all those places also.

TypeError: Cannot find function
New Prefix

 

After this change, deploy the code and test it. “bpel” object referred in Javascript should get executed without any error.

For some of the “bpel” functions, please refer “BPEL with Javascript” section of Oracle documentation.

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *