IBM Support

How to publish order audits to an external system in Sterling Order Management 9.3 and 9.4

Question & Answer


Question

Sterling Order Management 9.3 fix pack 13 and 9.4 fix pack 5 provide an ability to publish order audit data to an external systems. Publishing of the order audit happens asynchronously, such as in parallel threads in the form of XML. A custom listener must be implemented to work upon the published order audit XML. For example, The listener could store this data into an external database. If this feature is enabled, then the order audits are no longer stored in the underlying Oracle or DB2 databases. To enable this feature, the following properties are set in the customer_overrides.properties yfs.publish.mode=OrderAudit yfs.order.audit.publish.listener=. Is there any documentation on how to implement it ?

Answer

Publishing of order audit data to any external system of choice IDataPublishListener contains only one method called "onPublish". This needs to be implemented by custom class. This interface has Java
documentation in it which can be accessed by developers in nay IDE tool like eclipse. This method will receive the XML data for all order audits created in a transaction like API call or service call etc.

Note: Since this publish happens asynchronously (without blocking ongoing Java thread) after commit of transaction, any errors happening in custom implementation need to be handled by the custom
implementation.

sample code is as below
------------------------------
public class MyOrderAuditPublishListener implements
IDataPublishListener {
/* order audit xml received for one transaction.
*<OrderAudits>
* <OrderAudit>
* <OrderAuditLevels>
* <OrderAuditLevel>
* <OrderAuditDetail/>
* </OrderAuditLevel>
* </OrderAuditLevels>
* </OrderAudit>
*</OrderAudits>
*/
public void onPublish(YFCDocument publishedData) {
try {
// custom code to send/insert data into external system.
} catch (Exception e) {
// exception handling
}
}
}

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.3;9.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg22000181