Quantcast
Channel: OTMFAQ Forums
Viewing all articles
Browse latest Browse all 2772

MATCH SHIPMENT when use "By Saved Query" as matching method

$
0
0
Hi All,

I am confuse for MATCH SHIPMENT, please help.

OTM Version: 6.3.1;
Two domains: domainone(used for internal build shipments), domaintwo(used by 3rd party update shipment status);
Two shipments: 001, 002, belong to domainone;
Two Service Providers: sp1, sp2;
shipment 001's Service Provider is sp1, shipment 002's Service Provider is sp2, but they have the same reference number.(e.g. BM:12345678).

I use the reference number to identify the shipment, just like i will send(belong to ShipmentStatus interface):
<ShipmentRefnum>
<ShipmentRefnumQualifierGid>
<Gid>
<DomainName>PUBLIC</DomainName>
<Xid>BM</Xid>
</Gid>
</ShipmentRefnumQualifierGid>
<ShipmentRefnumValue>12345678</ShipmentRefnumValue>
</ShipmentRefnum>
But I have two shipments have the same reference number, so when perform match shipment will got the errors. If I change the "Maximum Number of Matches" to 2, no errors but it is wrong at business level, for it will match two shipments belong to two service providers(Say, it have two shipment links to one tracking event), but the event I sent just from one service provider.

So, I need to add a service provider reference number, just like(belong to ShipmentStatus interface):
<ServiceProviderAlias>
<ServiceProviderAliasQualifierGid>
<Gid>
<Xid>GLOG</Xid>
</Gid>
</ServiceProviderAliasQualifierGid>
<ServiceProviderAliasValue>NYK</ServiceProviderAliasValue>
</ServiceProviderAlias>

So I can identify just one the right shipment.
But seems the MATCH SHIPMENT action does not use the information above, it continue to match two shipments.

After that, I changed my method, I updated the "Matching Method" from "By Shipment ID" to "By Saved Query", so I also need to new a "Saved Query" to supported it. My question is: What results should I return by that "Saved Query" ? ?
I had tried two cases below:
(1) select s.shipment_gid from shipment s, shipment_refnum sr, servprov_alias spa, ie_shipmentstatus ies, ie_shipment_refnum iesr where ies.i_transaction_no=$i_transaction_no and ies.servprov_alias_qual_gid=spa.servprov_alias_qua l_gid and ies.servprov_alias_value=spa.alias and spa.servprov_gid=s.servprov_gid and ies.i_transaction_no=iesr.i_transaction_no and iesr.shipment_refnum_qual_gid=sr.shipment_refnum_q ual_gid and iesr.shipment_refnum_value=sr.shipment_refnum_valu e and sr.shipment_gid=s.shipment_gid
(2) select s.* from shipment s, shipment_refnum sr, servprov_alias spa, ie_shipmentstatus ies, ie_shipment_refnum iesr where ies.i_transaction_no=$i_transaction_no and ies.servprov_alias_qual_gid=spa.servprov_alias_qua l_gid and ies.servprov_alias_value=spa.alias and spa.servprov_gid=s.servprov_gid and ies.i_transaction_no=iesr.i_transaction_no and iesr.shipment_refnum_qual_gid=sr.shipment_refnum_q ual_gid and iesr.shipment_refnum_value=sr.shipment_refnum_valu e and sr.shipment_gid=s.shipment_gid

But OTM always gave me a error:
Error Exception java.lang.ClassCastException: glog.ejb.shipmentstatus.db.IeShipmentstatusPK

I guess my return result format is wrong, but what is the right one? Should I return some values from table ie_shipmentstatus?

Viewing all articles
Browse latest Browse all 2772

Trending Articles