On Sat, Aug 27, 2011 at 11:34 AM, Koray Gulcu <[email protected]>wrote:
> 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). > Hi Koray, You can try out process properties as in http://ode.apache.org/javadoc/org/apache/ode/bpel/pmapi/ProcessManagement.html#setProcessProperty(javax.xml.namespace.QName, javax.xml.namespace.QName, java.lang.String) . Or as a last resort the solution I would implement is a separate process which act as a global variable registry. So the other processes can invoke this variable registry and request the variable value. But again you have to touch business logic somehow :). Cheers, Denis > Regards, > Koray > > On Sat, Aug 27, 2011 at 8:42 AM, Denis Weerasiri <[email protected] > >wrote: > > > On Fri, Aug 26, 2011 at 11:21 PM, Koray Gulcu <[email protected] > > >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 < > [email protected] > > > >wrote: > > > > > > > On Fri, Aug 26, 2011 at 1:39 AM, Koray Gulcu <[email protected] > > > > > > 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> > > > -- 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>
