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)
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>
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>