B2B Import : replace flag
By Krishnamoorthy on Jun 29, 2010
While doing B2B Import page, it is possible to either set true or false to replace flag, and the same is used in merging xml elements in repository.
If Import set with replace = false , following new objects will be added to repository
- document protocol objects like version, type, and definition found in source
- trading partner found in source
- agreement found in source
- delivery channel found in source for existing trading partner
- supported document definition found in source for existing trading partner
- identification found in source for existing trading partner
None of the existing document protocol objects, trading partner, agreement, delivery channel, supported document definition, and identification will be affected.
In this mode, most of the properties like host, port details which are captured in ParameterValue elements which will not be modified/added. For instance, Deliverychannel Acme_HTTP_Outbound exist with port=7777, importing configuration comes with port=8888
If Import set with replace = true , following objects will be added/modified to repository.
In addition to adding new objects to repository, it replaces
- existing delivery channel
- existing agreements
- existing document protocol objects
- existing ParameterValue list
- attributes of deliverychannel like ackMode, retryInterval.
- wallet location in host
B2B Import identifies particular element exist or not based on the value of name attribute along with the parent
For example, in case of delivery channel
1. Trading partner Acme has delivery channel name Acme_HTTP_Outbound in repository.
If import file has trading partner Acme with delivery channel name as Acme_HTTP_Outbound, it is considered as same and with replace flag set to true existing delivery channel will be replaced. Otherwise existing delivery channel in repository is untouched.
2. Trading partner Acme has delivery channel name Acme_HTTP_Outbound in repository. if import file has host trading partner GlobalChips with delivery channel name as Acme_HTTP_Outbound, then it is considered as different because the delivery channel appears in different trading partner. This delivery channel will be added to trading partner GlobalChips.
3. The point 2 behaves little different for MLLP channels. Trading partner Acme has delivery channel name Acme_MLLP_Outbound in repository. If source trading partner GlobalChips has delivery channel name as Acme_MLLP_Outbound, then treated as equal, because of the fact that all the MLLP delivery channels are get created in tp_MyCompany.xml(Host) itself.
Merge logic for Agreement and Trading partner is pretty simple, if existing trading partner name is found in the import then this is considered as same, similar logic is used for Agreement as well.