5 Replies Latest reply on Jul 27, 2014 11:22 AM by Ranjani Vasan

    Correlation Set in BPEL (11G)

    Ranjani Vasan

      I was trying to learn the concept of correlation set and did a simple POC. built 3 simple service A,B,C. A -> B -> C -> A. Services A and C are asynchronous and B is one way. Service A has Invoke to B and a Receive from C. Defined Correlation set with appropriate property and Aliases (one with service B's Request Message type and another with service C's Response Message Type). Initiated the correlation set in Invoke from A -> B and set patter as 'IN' as the request is sent. Used the same correlation set for receive from A <- C with initiate set to 'NO'. When I tested this flow, I got an error "Correlation set no initialized.It cannot be used in receiving activity". Blindly going by the error message, initiated the correlation set at the first receive of service A. Now got no error but the process A is running for long time, pending receive response from C. I know this is not conceptually correct solution to overcome the initiate error in receive of A <- C. Can someone explain me what's the mistake am making here and a solution to complete this POC successfully?


      Thanking in advance


        • 1. Re: Correlation Set in BPEL (11G)
          Ankit kalanoria

          Hello Ranjani,


          How is C getting invoked from B? You are passing parameters to B, but wheather those parameters are being passed to C in input while invoking from B?


          By reading above, i am suspecting something is missing when C is invoked from B.


          Did you find an answer to your question yet?




          • 2. Re: Correlation Set in BPEL (11G)
            Ranjani Vasan

            Hi Ankit


            B is one way service invoking C. I can see instances of B invoking C and inputs getting passed correct. C is an async service and from the instance of C I also see reply variable of C holding the response.


            As its just a POC, I'm using a simple employee finder where I give employee ID from A, the same passes thro' B and invokes C, which access a file to get the relevant employee details as response. Here I'm using employee ID as the correlation property.


            Please let me know if my process is correct and if you need any more inputs to find a solution to fix this. I can also share the code with you




            • 3. Re: Correlation Set in BPEL (11G)
              Ankit kalanoria



              Sorry for late response.


              I have 1 more question before that.

              • When C is replying then how does service 'C' knows that it is replying to service 'A'?


              I'm asking this because B is 1 way service, but it is invoking service C which is asynchronous so at some point of time B is expecting a response from service C. On other hand if you have used both receive and reply activity in the flow of service C using same partner link then what it does is that it sends response back to service B. There is ReplyTo http header which comes in input request and based on URL present inside it, reply activity knows where to send response back. This case will require 2 partner links in service C. receive will be based on input from B and reply(A is not waiting for response since it did 1 way invocation to service B hence I think we should use Invoke activity here instead of reply activity to send response back to service A, will have to findout using POC) will be based on partner link for service A (Callback port).


              Just try to explore on this direction once since I am currently away from my system. As soon as I get back, I will implement this POC in my system if it doesn't work. Meanwhile see if above direction works.




              • 4. Re: Correlation Set in BPEL (11G)
                Dhaval Parikh-Oracle

                Hi Ranjani,


                Please refer the following section in the Development Guide on Correlation sets.


                Using Correlation Sets and Message Aggregation - 11g Release 1 (


                Also Refer the Sample provided at following location for the same case as yours.



                • 5. Re: Correlation Set in BPEL (11G)
                  Ranjani Vasan

                  Hi Ankit


                  Thanks again for responding. Sorry for the delay as I was also stuck with work. I tried the same way you advised me to do. If I got your proposal right, I replaced the reply from C (final service) with Invoke pointing to Service A. I added serve A in the composite of 'C' (Exposed Service lane) and had the response operation on 'A' invoked by 'C'.When I executed the flow I'm getting below error, in the invoke of 'C' to 'A'.


                  oracle.fabric.common.FabricInvocationException: No source URI specified for the given invocation or callback. Please make sure there is a wire specified for the context InvocationContextImpl{compositeName='default/EmployeeFinder!1.0*soa_0433dd3a-9e2f-4970-a636-4c7fa6938bb4', reference='null', wire=null:EmployeeFinder}


                  I dint understand why will the request - response of 'C' be dependent on the behavior of calling service, here 'B' being one way and calling 'C'. As 'C' is an Async service the request and reply should point to same client.


                  Please let me know if I can share the entire project to you so that you can have a look at the implementation and suggest a solution.