Sorry for letting this on the sideI think I just got diverted at some point. Anyway looking into this a bit more the correct mechanism would be, as you first mentioned, to set the servicemix correlation id as an ODE message exchange property for the MyRoleMex created in OdeService.invokeOde(). Now the problem is to retrieve it in MessageExchangeContextImpl.invokePartner() which is virtually impossible as is as you only have the parner mex created for the invocation and lost track of the myrole mex.
So I guess it would make sense to have the engine copy the mex properties from myrole mex to partnerrole mex when it's invoking. Some sort of property propagation feature. The only place where this is possible is when the partner role mex is created, right where the invocation is triggered in BpelRuntimeContextImpl.invoke(). Here you have the partner mex that is being created and also the my role mex that originated the exchange (_instantiatingMessageExchange). So copying properties from the latter to the former wouldn't be so hard I guess. And then it would be easy in MessageExchangeContextImpl.invokePartner() to get the properties from the partner mex and and set them on the jbi mex. Makes sense? Matthieu On 3/28/07, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
Well, I'm not sure where the best place would be to store such properties. Hopefully someone with more knowledge of Ode internals can help here. I think the IAPI may give a slot for the integration layer to store something in the database. And this will be a definite need if we want to be able to not keep the JBI exchange in memory (I don't think the JBI exchange is stored somewhere). The exchanges ( org.apache.ode.bpel.iapi.MessageExchagne) has some placeholders for properties but afaik, they are specific to a given exchange, so that there is no way to link an outgoing exchange to the MyRoleExhcange that created the process instance. On 3/28/07, Roger Menday <[EMAIL PROTECTED]> wrote: > > > Hi Guillaume, > > I am also interested in seeing such a feature, i.e. allowing the > properties of the initiating JBI exchange to be copied into the messages > leaving the process. Do you think it's a big thing to add ? > > regards, > > Roger > > > Hum, not sure if it will really help me. > > Let me restate what I need: the incoming JBI exchange > > contain a known property and I want to store it with the > > process instance somehow (in a variable or any other way). > > Then, when an invocation is performed, I meed to set this > > property on the newly created JBI exchange. > > > > This is not about correlation for the BPEL process itself. > > And I can't reuse something generated by Ode as the property > > value is usually already set on the incoming exchange. > > > > So I'm not sure if the session ids can be used, especially > > because i need to use existing values and not let Ode > > generate those. And it seems there is no way to override that > > currently: see BpelRuntimeContextImpl.initializePartnerLinks > > > > I was thinking about using the MessageExchange DAO to set > > the property, but my problem is that I haven't found a way > > to retrieve the MyRoleMessageExchange that was used > > to create the process when inside an > MessageExchangeContext.invokePartner > > call. > > > > On 3/7/07, Matthieu Riou <[EMAIL PROTECTED]> wrote: > >> > >> Hi, > >> > >> I think you'll just need to do something like: > >> > >> String mySess = mex.getProperty( > >> PartnerRoleMessageExchange.PROPERTY_SEP_MYROLE_SESSIONID); > >> String partnerSess = mex.getProperty( > >> PartnerRoleMessageExchange.PROPERTY_SEP_PARTNERROLE_EPR); > >> > >> For more information on how we handle the correlations this way: > >> > >> http://incubator.apache.org/ode/implicit-correlations.html > >> http://incubator.apache.org/ode/stateful-exchange-protocol.html > >> > >> Cheers, > >> Matthieu > >> > >> On 3/5/07, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > >> > > >> > Hi guys ! > >> > > >> > In ServiceMix, there is a property named " > >> > org.apache.servicemix.correlationId" > >> > that is used to correlate MessageExchanges. > >> > For example, if a JBI endpoint receives a JBI exchange, and send > >> another > >> > jbi exchange while processing it, the components will forward this > >> > property > >> > from the inbound exchange to the outbound exchange (or create it > >> with a > >> > unique > >> > id if none was set). This enables tracking of a "JBI process". I > >> think > >> > ODE > >> > would benefit of such a behavior when deployed inside ServiceMix, > >> so I'm > >> > trying > >> > to implement it. > >> > > >> > However, I'm not sure what the best way to do that. I would say that > >> the > >> > best way > >> > is to use properties defined on > >> org.apache.ode.bpel.iapi.MessageExchange > >> , > >> > but I haven't been able to find a way to retrieve these properties > >> from > >> > a MessageExchangeContext.invokePartner call. > >> > > >> > Any hints on how to do that ? > >> > > >> > Cheers, > >> > Guillaume Nodet > >> > ------------------------ > >> > Architect, LogicBlaze (http://www.logicblaze.com/) > >> > Blog: http://gnodet.blogspot.com/ > >> > > >> > > > > > > > > > -- Cheers, Guillaume Nodet ------------------------ Architect, LogicBlaze (http://www.logicblaze.com/) Blog: http://gnodet.blogspot.com/
