DB XML Import

The DB XML import process takes a transaction set, contained in an input XML file or message, and inserts, updates, or deletes rows in Transportation and Global Trade Management Cloud tables. It can also completely replace a current set of child records with a new set.

The valid parent/child relationships are determined by the persistence logic internal to the Transportation and Global Trade Management application server. Therefore, imports should normally only be used for data exported using the Migration Entity export type. Content exported via other DBXML execution modes in earlier releases may still be imported but any customer-defined parent/child relationship tree must be a subset of that produced by the Migration Entity export type.

Transaction Code

The Transaction Code specifies how the transaction set is to be processed and will be one of:

  • I: Insert new records
  • II: Insert new record or ignore (i.e. do not fail) if already existing
  • IU: Insert new records or update if already existing
  • D: Deletes record.
  • RC: Replace Children. Delete existing children and replace with new.
Note: The use of the Delete transaction code should be used with care. The delete process attempts to also remove any objects which contain a foreign key to the object being deleted which may not always be the desired effect. Therefore it is strongly advised NOT to use this transaction code for object types that may be referenced from transaction data. An example of this is the Location object. Locations can be stand alone but they can also be ship from or ship to locations on Shipments and deleting such locations could have unintended consequences.

Replace Children

When using the RC transaction code the child tables that should be involved can be specified as Managed Tables. There are also some standard managed tables defined for some data objects which are combined with any managed tables entered as input.

Replace Children

Object Name Child Tables
LOCATION LOCATION_ACCESSORIAL, LOCATION_ADDRESS, LOCATION_CORPORATION, LOCATION_REFNUM, LOCATION_REMARK, LOCATION_ROLE_PROFILE, LOCATION_SPECIAL_SERVICE, LOCATION_STATUS
RATE_GEO RATE_GEO_STOPS, RATE_GEO_ACCESSORIAL, RG_SPECIAL_SERVICE, RG_SPECIAL_SERVICE_ACCESSORIAL, RATE_GEO_COST_GROUP, RATE_GEO_COST, RATE_GEO_COST_WEIGHT_BREAK
RATE_OFFERING RATE_OFFERING_STOPS, RATE_OFFERING_ACCESSORIAL, RATE_OFFERING_COMMENT
AGENT_EVENT AGENT_EVENTS_INVALID_ACTION
AGENT AGENT_EVENT_DETAILS, AGENT_ACTION_DETAILS
CORPORATION CORPORATION_INVOLVED_PARTY
SAVED_QUERY SAVED_QUERY_VALUES, SAVED_QUERY_SORT_ORDER
SAVED_CONDITION SAVED_CONDITION_QUERY
MONITOR_PROFILE MONITOR_AGENT, MONITOR_AGENT_LINK
SHIPMENT SHIPMENT_STOP, SHIPMENT_STOP_D, SHIPMENT_STOP_REMARK, SHIPMENT_ACCESSORIAL, SHIPMENT_BILL, SHIPMENT_COST, SHIPMENT_COST_REF, SHIPMENT_INVOLVED_PARTY, SHIPMENT_REFNUM, SHIPMENT_REMARK, SHIPMENT_SPECIAL_SERVICE, SHIPMENT_STATUS
STATUS_TYPE STATUS_VALUE
WORKFLOW_TOPIC_INFO WORKFLOW_TOPIC_PARAM, WORKFLOW_INFO, WORKFLOW_PARAM
OB_ORDER_BASE OB_ACCESSORIAL, OB_INVOLVED_PARTY, OB_LINE, OB_LINE_ACCESSORIAL, OB_LINE_ATTRIBUTE, OB_LINE_REFNUM, OB_LINE_REMARK, OB_LINE_SPECIAL_SERVICE, OB_LINE_STATUS, OB_ORDER_BASE, OB_ORDER_BASE_STATUS, OB_REFNUM, OB_REMARK, OB_SHIP_UNIT, OB_SHIP_UNIT_CONTENT, OB_SHIP_UNIT_REFNUM, OB_SHIP_UNIT_REMARK, OB_SHIP_UNIT_SEAL, OB_SHIP_UNIT_STATUS, OB_SPECIAL_SERVICE, OB_SU_ACCESSORIAL, OB_SU_CONTENT_ATTRIBUTE, OB_SU_CONTENT_REFNUM, OB_SU_CONTENT_REMARK, OB_SU_SPECIAL_SERVICE
BS_STATUS_CODE_PROFILE BS_STATUS_CODE_PROFILE_D
BS_EVENT_GROUP BS_EVENT_GROUP_ATTRIBUTE
OUT_XML_PROFILE OUT_XML_PROFILE_D, OUT_XML_PROFILE_XPATH, OUT_XML_PROFILE_CHILD
BS_REASON_CODE BS_REASON_CODE_PROFILE_D
REMARK_QUAL REMARK_QUAL_TEXT, REMARK_QUAL_ASSET_ATTRIBUTE
REPORT REPORT_PARAMETER, REPORT_CONTROL
SERVPROV SERVPROV_ALIAS, SERVPROV_CB_PROFILE
MIGRATION_PROJECT MIGRATION_OBJECT_GROUP, MIGRATION_OBJECT_GROUP_D

Refresh Cache

The Transportation and Global Trade Management Cloud application maintains a number of in-memory cache objects to improve performance. Historically, DBXML was not able to refresh these cache objects and so occasionally required a restart of the application to pick up some modifications.

When importing, the Refresh Cache flag is available to indicate that any cache objects associated with the imported data should be refreshed. For example, if the imported data contained a new workflow Agent which is ‘active’, this agent would automatically subscribe to its listening events and be available to be triggered by, for example, SHIPMENT – MODIFIED events.

Lifetime Events

Whenever certain objects are modified via the application, lifetime events are raised for CREATE, MODIFIED and REMOVED modifications. When the new Lifetime Events flag is used, these events will now also be raised for data imported via DBXML. For example, if a TRANSACTION_SET contains a new LOCATION, the LOCATION – CREATED event will be published.

Commit Scope

By default, each parent element in a TRANSACTION SET is treated as a separate database transaction i.e. if one failed others could potentially succeed.

There is now a new field for Commit Scope which defaults to the current behavior with the scope of ‘PK’. There is a new value of ‘SET’ which indicates that all elements in the TRANSACTION SET must succeed or all will fail.

Custom Attributes

Certain DB XML elements support attributes not represented in the underlying table. These include:

Table Element Attribute Use
GLUSER GL_PASSWORD PasswordType

If TEXT, the incoming password value is assumed to be text and will be hashed on storage to the database.

Otherwise, the value is assumed to be the hash, obtained from a DBXML export of the GL_USER record.