I've found a good piece of documentation on correlation sets. Now it's
a lot clearer. The doubts that I still have are the difference between
using "onMessage" and "receive", and if, by any chance, onMessage
always need a correlationSet. I've tried both of them in my process
and only "receive" works, and somewhere I read they were equal.

Hope someone can explain me these two doubts, or at least tell me
where I could read about it. Thanks in advance.

On Fri, Jun 20, 2008 at 5:14 PM, Sebastian Gomez <[EMAIL PROTECTED]> wrote:
> Hi Matthieu, thanks for replying so quickly, this has me a bit blocked.
>
> My activity is the first in the process. I'm trying to create a
> process that can receive either an asynchronous or a synchronous
> exchange. I'm quite new to BPEL so maybe I'm wrong, but I think the
> process should start with a "pick" that will have the two options of
> receiving one message or the other. I've tried using "onMessage"
> inside the pick but it doesn't receive any message, but using
> "receive" it does (I thought they were sort of the same). The problem
> is that inside a "receive" it's not possible to put a "sequence" as
> you can do with the "onMessage", or is it? So I thought maybe
> "onMessage" does need a correlationSet.
>
> As you can see, I'm a bit lost, I've been looking for documentation
> but I haven't found much.
>
> In conclusion, should any correlation set be needed for something like
> the following?
>
> <process>
>  <pick>
>    <onMessage> (or receive)
>      <sequence/>
>    </onMessage> (or receive)
>    <onMessage> (or receive)
>      <sequence/>
>    </onMessage> (or receive)
>  </pick>
>  <sequence/>
> </process>
>
>
> On Fri, Jun 20, 2008 at 4:53 PM, Matthieu Riou <[EMAIL PROTECTED]> wrote:
>> On Fri, Jun 20, 2008 at 7:15 AM, Sebastian Gomez <[EMAIL PROTECTED]> wrote:
>>
>>> Hi everyone.
>>>
>>> I'm trying to implement a bpel process that will expect one of two
>>> possibilities of message type. I've thought the best way to implement
>>> it would be using a "pick", but all the examples I've seen seem to be
>>> using pick + correlation sets. Is it mandatory to use these
>>> correlation sets? Why are they needed?
>>>
>>
>> Ha! correlation sets, what a wondrous beast. Basically it's the only way in
>> BPEL to send two messages to the same instance. Doing so requires agreeing
>> on an identifier for the instance, correlation sets represent both the
>> identifier (by way of properties) and how to extract it from messages (by
>> way of property aliases).
>>
>> Getting back to your pick, if it's the first activity in the process, you
>> won't have to worry about correlating it (although you may need that later)
>> but if it's after the instance has been started, you will definitely have to
>> mess with correlation.
>>
>> Cheers,
>> Matthieu
>>
>>
>>>
>>> Thanks in advance.
>>>
>>> Sebastian Gomez.
>>>
>>
>

Reply via email to