You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by kodeninja <ko...@gmail.com> on 2009/07/15 11:20:36 UTC

How to filter events only for a particular BPEL process?

Hi,

Suppose I have 3 BPEL processes (P1, P2 & P3) deployed in ODE. Now, using
the ODE event listener API, is it possible to receive events only for say,
P1? Or is it possible inside the event listener to somehow check which
process instance it is that has caused the onEvent() to be fired and then
act accordingly?

Thanks,
-Kodeninja
-- 
View this message in context: http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24494505.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: How to filter events only for a particular BPEL process?

Posted by Alex Boisvert <bo...@intalio.com>.
Right now, the eventContext is only set for ScopeEvents apparently.   I
don't know if ProcessCompletion/ProcessTerminationEvent have been considered
or not.  On the outset, I think it would be possible to set the context for
these events as well since it's still available (although only the root
scope would still be available AFAIK).

I don't have time to look into this right now so if you could please file an
issue we can get back to it later.   And if you want to work it out yourself
and see if it suits your purpose, a patch would be most welcome!

alex


On Thu, Jul 16, 2009 at 1:32 AM, kodeninja <ko...@gmail.com> wrote:

>
> Thanks for the reply, Alex.
>
> I have one more question wrt the EventContext object available thru the
> BpelEvent object. When I intercept a
> "ProcessCompletionEvent"/"ProcessTerminationEvent" event, I want to get the
> value of a particular "variable" (declared in the ROOT SCOPE of the bpel
> process) from the process instance, but at this point the eventContext is
> returned null. How can I fetch the variable's value in the onEvent() method
> now?
>
> Thanks,
> -Kodeninja
>
>
> Alex Boisvert-3 wrote:
> >
> > No, BpelEventListeners get all the events.  However, all ProcessEvents
> and
> > ProcessInstanceEvents provide you with the process identifier and the
> > instance identifier, respectively, so you can do your own filtering.
> >
> > alex
> >
> >
> > On Wed, Jul 15, 2009 at 2:20 AM, kodeninja <ko...@gmail.com>
> > wrote:
> >
> >>
> >> Hi,
> >>
> >> Suppose I have 3 BPEL processes (P1, P2 & P3) deployed in ODE. Now,
> using
> >> the ODE event listener API, is it possible to receive events only for
> >> say,
> >> P1? Or is it possible inside the event listener to somehow check which
> >> process instance it is that has caused the onEvent() to be fired and
> then
> >> act accordingly?
> >>
> >> Thanks,
> >> -Kodeninja
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24494505.html
> >> Sent from the Apache Ode User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24512475.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Re: How to filter events only for a particular BPEL process?

Posted by kodeninja <ko...@gmail.com>.
Thanks for the reply, Alex.

I have one more question wrt the EventContext object available thru the
BpelEvent object. When I intercept a
"ProcessCompletionEvent"/"ProcessTerminationEvent" event, I want to get the
value of a particular "variable" (declared in the ROOT SCOPE of the bpel
process) from the process instance, but at this point the eventContext is
returned null. How can I fetch the variable's value in the onEvent() method
now?

Thanks,
-Kodeninja


Alex Boisvert-3 wrote:
> 
> No, BpelEventListeners get all the events.  However, all ProcessEvents and
> ProcessInstanceEvents provide you with the process identifier and the
> instance identifier, respectively, so you can do your own filtering.
> 
> alex
> 
> 
> On Wed, Jul 15, 2009 at 2:20 AM, kodeninja <ko...@gmail.com>
> wrote:
> 
>>
>> Hi,
>>
>> Suppose I have 3 BPEL processes (P1, P2 & P3) deployed in ODE. Now, using
>> the ODE event listener API, is it possible to receive events only for
>> say,
>> P1? Or is it possible inside the event listener to somehow check which
>> process instance it is that has caused the onEvent() to be fired and then
>> act accordingly?
>>
>> Thanks,
>> -Kodeninja
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24494505.html
>> Sent from the Apache Ode User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24512475.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: How to filter events only for a particular BPEL process?

Posted by Alex Boisvert <bo...@intalio.com>.
No, BpelEventListeners get all the events.  However, all ProcessEvents and
ProcessInstanceEvents provide you with the process identifier and the
instance identifier, respectively, so you can do your own filtering.

alex


On Wed, Jul 15, 2009 at 2:20 AM, kodeninja <ko...@gmail.com> wrote:

>
> Hi,
>
> Suppose I have 3 BPEL processes (P1, P2 & P3) deployed in ODE. Now, using
> the ODE event listener API, is it possible to receive events only for say,
> P1? Or is it possible inside the event listener to somehow check which
> process instance it is that has caused the onEvent() to be fired and then
> act accordingly?
>
> Thanks,
> -Kodeninja
> --
> View this message in context:
> http://www.nabble.com/How-to-filter-events-only-for-a-particular-BPEL-process--tp24494505p24494505.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>