While working on this I found out that my above approach is not going to
work because, we can't detect which partner link we currently use for the
incoming message when creating new myRole message exchange in
BpelServerImpl's createMessageExchange method. Is that means we can't use
BPEL to implement this scenario or is this BPEL wrong according to the BPEL
concepts or is there a limitation in current design of ODE.

WDYT?

Thanks
Milinda

On Tue, Dec 15, 2009 at 10:28 AM, Milinda Pathirage <
[email protected]> wrote:

> When there two asynchronous service interaction which calls same callback
> interface of ODE didn't work due to bug in mapping endpoint to
> myRole(ODEProcess.java/ODE trunk). This kind of process scenario is
> described in [1] and [2]. In this scenario we have two partners which expose
> same service interface(end points are different) and invoke the same
> callback interface of the calling process. So in this case we'll have same
> my role and partner link type for both partner links which interact with the
> partner services which has same interface. For example we have this
> similarity in AmericanAirlines partner link and DeltaAirline partner link.
>
> <partnerLinks>
>       <partnerLink name="client"
>                    partnerLinkType="trv:travelLT"
>                    myRole="travelService"
>                    partnerRole="travelServiceCustomer"/>
>
>       <partnerLink name="employeeTravelStatus"
>                    partnerLinkType="emp:employeeLT"
>                    partnerRole="employeeTravelStatusService"/>
>
>       <partnerLink name="AmericanAirlines"
>                    partnerLinkType="aln:flightLT"
>                    myRole="airlineCustomer"
>                    partnerRole="airlineService"/>
>
>       <partnerLink name="DeltaAirlines"
>                    partnerLinkType="aln:flightLT"
>                    myRole="airlineCustomer"
>                    partnerRole="airlineService"/>
>    </partnerLinks>
>
>
> If we implement both these partner services as processes in ODE and when we
> invoke the process one callback invocation will fail due to the way we
> handle and populate end point to myRole map in ODEProcess.java. When
> populating this map we use endpoint as the key and in this case we have two
> which calls to same myRole endpoint and when populating inside the loop in
> ODEProcess#setRoles method first endpoint -> myRole pair will be replaced by
> second pair which has same endpoint.
>
> I am planning to fix this by introducing multi valued map to endpoints to
> myRole map and improving logic we are currently using to select the target
> in ODEProcess#invokeProcess method.
>
> Current logic:
> PartnerLinkMyRoleImpl target = getMyRoleForService(mexdao.getCallee());
>
>   private PartnerLinkMyRoleImpl getMyRoleForService(QName serviceName) {
>         assert _hydrationLatch.isLatched(1);
>
>         for (Map.Entry<Endpoint, PartnerLinkMyRoleImpl> e :
> _endpointToMyRoleMap.entrySet()) {
>             if (e.getKey().serviceName.equals(serviceName))
>                 return e.getValue();
>         }
>         return null;
>     }
>
> What do you think about this? Please feel free to comment on this.
>
> thanks
> Milinda
>
>
>
>
>
>
>
> [1]
> http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b15604/loandemo.htm
> [2] http://www.oracle.com/technology/pub/articles/matjaz_bpel1.html
>
> --
> Milinda Pathirage
> Senior Software Engineer & Product Manager WSO2 BPS; http://wso2.org/bps
> WSO2 Inc.; http://wso2.com
> E-mail: [email protected], [email protected]
> Web: http://mpathirage.com
> Blog: http://blog.mpathirage.com
>



-- 
Milinda Pathirage
Senior Software Engineer & Product Manager WSO2 BPS; http://wso2.org/bps
WSO2 Inc.; http://wso2.com
E-mail: [email protected], [email protected]
Web: http://mpathirage.com
Blog: http://blog.mpathirage.com

Reply via email to