Sunday, March 20, 2011

Oracle BPM 11g ORABPEL-02118 Variant not found Exception

While modelling the BPM workflow, there might be few service tasks to call external services. These services would essentially be referenced in the SCA composite.xml (External References Swim Lane). These would then be wired to the BPMN workflow when the service task is added on the BPM process and the service is referred. Until this moment everything is fine as expected.

However, when the external service definitions change, we will have to rebuild/refresh the adapters in the SCA so that the service definition changes are reflected properly. Now, everything seems good but at run-time, the process throws ORABPEL-02118 Variant not found exception (Detailed exception looks as below)

<Error> <oracle.soa.bpel.engine.dispatch> <BEA-000000> <failed to handle message
ORABPEL-02118 Variant not found.
The variable "Services.Externals.UpdateDBRecord.reference" is not declared in the current scope. All variables must be declared in the scope before being accessed.
This was an internal error. The flow was not generated correctly by the BPMN compiler.
Contact Oracle Support Services. Provide the error message, the composite source, and the exception stack trace in the log files (with the logging level set to debug mode).

On closer look at the Composite.xml we can notice that the wiring between the service adapters and BPMN workflow component missing. This is an intermittent issue. Solution would be to manually add the 'wiring' information into the Composite.xml and re-deploy. [Where UpdateDBRecord is the external service referenced]

<wire> <source.uri>BPMProcess/Services.Externals.UpdateDBRecord.reference</source.uri>
<target.uri>UpdateDBRecord</target.uri>
</wire>

7 comments:

  1. Thanks for the post, it helped me a lot, but I've found out that also a element should be added for the external service referenced if it is missing as in my case:



    4
    1
    2
    120


    where getDefaultValues is the external service referenced

    ReplyDelete
  2. Thanks for the post but sometimes even then you wont be able to wire it then in those cases, you need to manually add reference in *Process.componentType :-



    ReplyDelete
  3. Sometimes even then you wont be able to route in those case add reference manually to *process.componentType



    ReplyDelete
  4. thanks you, but the solution didn't work for me. I resolved it updating the project in the BPM Project Navigator.

    ReplyDelete
  5. I got this issue. The problem is due to an error when refreshing components in the Jdeveloper IDE, and my steps to solve it were the following:

    1 - Update the composite
    2 - Remove the Activity Service that make reference to this composite
    3 - Create again the Activity Service from the beginning, and re-map to the Interface of the composite.

    Dario

    ReplyDelete
  6. We have installed and configured WSM, SOA, OSB, ODI & AIA in a 2 node cluster.

    Issue: While starting the SOA managed servers, we are getting the following error.

    <<.> Workflow Service Engine not ready. SOA server is still starting.
    Could not obtain instance of Workflow Service Engine as the SOA server is still initializing.
    Wait for SOA server to finish starting up, and retry.

    ORABPEL-30132

    Workflow Service Engine not ready. SOA server is still starting.
    Could not obtain instance of Workflow Service Engine as the SOA server is still initializing.
    Wait for SOA server to finish starting up, and retry.

    ReplyDelete
    Replies
    1. Looks like a clear case of installation problem. Please seek Oracle support to get the installation right or write to forums.oracle.com

      Delete