ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koray Gulcu <koray.gu...@ozu.edu.tr>
Subject Re: updating partnerlink for all instances
Date Sat, 27 Aug 2011 06:04:50 GMT
Thank you Denis, your offering is definitely is a solution. However, my main
goal is not to touch business logic. In your case, client should send
another message to complete process. What I am looking for is handling the
issue using something like "class variable" in OO languagea which belongs to
class (bpel process) not to instances (bpel process instances).

Regards,
Koray

On Sat, Aug 27, 2011 at 8:42 AM, Denis Weerasiri <ddweerasiri@gmail.com>wrote:

> On Fri, Aug 26, 2011 at 11:21 PM, Koray Gulcu <koray.gulcu@ozu.edu.tr
> >wrote:
>
> > Hello,
> >
> > Actually, I already have a partner link variable for the invocation in
> > "process" activity. When I pick onUpdate message, I simply assign its
> > payload to the partnerlink, say "fooPartnerLink".
> >
> > <bpel:copy>
> >   <bpel:from>
> >        <![CDATA[$endpoint.url]]>
> >   </bpel:from>
> >    <bpel:to partnerLink="fooPartnerLink"></bpel:to>
> > </bpel:copy>
> >
> > Now, I updated the partner link and I can use the new address for further
> > invocation. Like
> >
> > <bpel:invoke name="InvokeFoo" partnerLink="fooPartnerLink"
> > operation="getBar" portType="ns:FooServicePortType"
> > inputVariable="barRequest" outputVariable="barResponse">
> > </bpel:invoke>
> >
> > This is how I am planning to use.
> >
> >
> > Since my "process" actiivty completes its business logic quickly, the
> > instance goes to completed state after created. Hence I can not set up a
> > correlation mechanism where newly created instances can refer to the
> > updated
> > partner link. You said that correlation sets can be used in this
> scenario,
> > is it possible to open up how I can set up for this purpose?
> >
> Hi Koray,
> What I would do is adding a <receive> activity before "AssignReturn"
> activity. This will enables the BPEL process to wait on a new
> operation(let's say "completeInstance" which is defined in the
> wsdl:portType) to proceed further.
> So until a client invoke the BPEL process with "completeOperation" the
> instance will be in "ACTIVE" state. So you can use message correlation to
> change the epr dynamically.
>
> eg -
> <portType name="SampleEventHandlerProcess">
>        <operation name="createInstance">
>            <input message="tns:SampleEventHandlerProcessRequestMessage"/>
>            <output message="tns:SampleEventHandlerProcessResponseMessage"/>
>        </operation>
>        <operation name="completeInstance">
>            <input message="tns:SampleEventHandlerProcessRequestMessage"/>
>        </operation>
>    </portType>
>
> In my new <receive> activity after "AssignReturn" activity would be
> something like below.
>
> <bpel:receive name="ReceiveWait" partnerLink="client"
> operation="completeInstance" portType="tns:SampleEventHandlerProcess"
> variable="waitReceiveVar">
>                    <bpel:correlations>
>                        <bpel:correlation set="IDCorrelationSet"
> initiate="no"></bpel:correlation>
>                    </bpel:correlations>
>                </bpel:receive>
>
> Please let me know if you need any clarification.
> Cheers,
> Denis
>
> >
> > Thanks,
> > Koray
> >
> >
> > On Fri, Aug 26, 2011 at 8:35 PM, Denis Weerasiri <ddweerasiri@gmail.com
> > >wrote:
> >
> > > On Fri, Aug 26, 2011 at 1:39 AM, Koray Gulcu <koray.gulcu@ozu.edu.tr>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I am trying to implement a business process but need some help.
> Simply
> > I
> > > > have a "process" activity which invokes a partner link and returns
> > > obtained
> > > > information when called. In addition, I have another activity called
> > > > "onUpdate" which I receive an endpoint reference. "onUpdate" activity
> > > > receives new end point reference which I use for invocation in
> > "process"
> > > > activity. As a result, end point reference which is used for obaining
> > > > information in "process" activity changes dynamically. I know it is
> > > simple
> > > > but I also added its diagram <http://tinypic.com/r/1572fz4/7> to
> avoid
> > > > misunderstandings.
> > > >
> > > Hi,
> > > Can you explain how you are going to refer the new epr in invocation
> for
> > > "process" activity.?
> > >
> > > >
> > > > Currently, I can properly update end point reference. However, since
> a
> > > new
> > > > instance is created on each "process" activity call, invocation is
> done
> > > via
> > > > initial end point reference rather than dynamically updated reference
> > > > because I loose out new endpoint reference with its instance. I need
> a
> > > > variable to store endpoint reference which can be used by all other
> > > > instances. How can I accomplish this? Is it possible via correlation
> > > sets?
> > > >
> > > Yes, Message correlation can be used in these sort of scenarios.
> > >
> > > >
> > > > Thanks all,
> > > > Koray
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks,
> > > Denis
> > > ----------------------------------------------------------
> > > *Denis Weerasiri*
> > > *
> > > *
> > >  <http://wso2.com/>**** <http://wso2.com/>*site: **
> > > https://sites.google.com/site/ddweerasiri/*<
> > > https://sites.google.com/site/ddweerasiri/>
> > > *blog: **http://ddweerasiri.blogspot.com* <
> > > http://ddweerasiri.blogspot.com/>
> > > *
> > > twitter: **http://twitter.com/ddweerasiri* <
> > http://twitter.com/ddweerasiri
> > > >*
> > > linked-in: **http://lk.linkedin.com/in/ddweerasiri*<
> > > http://lk.linkedin.com/in/ddweerasiri>
> > >
> >
>
>
>
> --
> Thanks,
> Denis
> ----------------------------------------------------------
> *Denis Weerasiri*
> *
> *
>  <http://wso2.com/>**** <http://wso2.com/>*site: **
> https://sites.google.com/site/ddweerasiri/*<
> https://sites.google.com/site/ddweerasiri/>
> *blog: **http://ddweerasiri.blogspot.com* <
> http://ddweerasiri.blogspot.com/>
> *
> twitter: **http://twitter.com/ddweerasiri* <http://twitter.com/ddweerasiri
> >*
> linked-in: **http://lk.linkedin.com/in/ddweerasiri*<
> http://lk.linkedin.com/in/ddweerasiri>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message