Sterling OMS Understanding Suspend API

By | 04/29/2020

Sterling OMS Understanding Suspend API

Suspend API Select this field if a suspendable exception is returned by an extended API, the message is retained in the queue and the execution restarts after the Suspend Wait Time interval.
Suspend Wait Time Enter the time to wait before attempting to reprocess the message.

Let us understand it better with a simple example:

Sterling OMS Understanding Suspend API : Let’s create an Async Service with an Extended API to throw the Exception. Which would then suspend the api for a certain wait time.

Sterling OMS Understanding Suspend API
Server name configuration
OMS Sterling Suspend API
Extended API configuration

TestCancelOrderSuspendAPI Java Class:

It is written to check the InputXML and if the Status Code is anything other than ‘CANCELLED’, it throws a ServiceSuspendException.

Export the Jar file. Build and deploy the ear file.

Start the Integration Server : test

Starting Integration server

Put a Test Message into the Queue.(MQ Explorer):

Here the Status code is sent as “TEST”. So, it will throw an exception and the api will be suspended.

<OrderStatus DocumentType=”0001″ StatusCode=”TEST” EnterpriseCode=”” OrderNo=”11550047 ” CustomerPONo=”11550047″ ModificationReasonCode=’CANCELLED’></OrderStatus>
IBM MQ Put Message

When the ServiceSuspendException is thrown, the server will automatically be Suspended for the Wait Time specified. The message will be retained in the queue and will be processed when the server is restarted later.

Sterling server suspended

Note :

  • The Service should be a newly created Service for this configuration to work.
  • When tried to configure with existing service this configuration does not work.
  • The Suspend wait time can only be between 0 and 99,999.

Any question please email to support@activekite.com

Happy Learning. Come lets learn together.

4 thoughts on “Sterling OMS Understanding Suspend API

    1. admin Post author

      Lets assume we trigger XML message (for email purpose) from OMS to WCS on order status changed (Like order is ready to pick) or inventory updates to OMS to WCS.
      if WCS is down (not working), all our updates fails. In this case if this process happens via Integration server we can halt the server for few minutes and retry after some time. When server gets halt messages stay in queue itself. Hope this helps !!!

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *