Order management & Fulfillment

Order Management & Fulfillment

Come for answers, stay for best practices. All we're missing is you.

 View Only

Accelerating Sterling OMS Development: How to Test/Debug Locally in IntelliJ without Server Deployment

  • 1.  Accelerating Sterling OMS Development: How to Test/Debug Locally in IntelliJ without Server Deployment

    Posted Mon February 23, 2026 11:10 AM

    In the world of IBM Sterling Order Management (OMS), developer velocity is often throttled by "The Wait." Traditionally, testing a Custom API, User Exit, or Property Provider requires a full rebuild and deployment to an Agent or Application Server.

    To bypass this cycle entirely configure IntelliJ IDEA to simulate the Sterling runtime, you can execute and debug your code locally. Here is how to set up your environment.

    📋 Pre-Requisites

    You will need a local copy of the Foundation directory. (Either installation/ copy of the Foundation Folder from your development environment ) (e.g., <INSTALL_DIR>/FoundationV10).






    Step 1: Configuring the Project Structure (Classpath)

    We need to ensure IntelliJ recognizes the Sterling engine and your custom logic.

    1. Open Project Structure (Ctrl+Alt+Shift+S) > Modules > Dependencies.

    2. Add Sterling Jars: Add all necessary OOB and Custom Jars from your codebase.

    3. Map Properties: Add your <INSTALL_DIR>/properties folder as a dependency.

    4. Map Foundation: Add the <INSTALL_DIR> directory itself.

    5. Prioritize Resources: > Crucial Step: Move resources.jar to the very top of the dependencies list. This ensures that the engine picks up the correct configuration files during initialization.

    Step 2: Create Run/Debug Configuration In IntelliJ

    • Main Class: Point this to your specific Test Class or the logic you are validating.

    • Working Directory: Set this to your local <INSTALL_DIR>/FoundationV10.

    • Program Arguments:

      <response-element class="" ng-version="0.0.0-PLACEHOLDER"></response-element>
      -class com.yantra.integration.adapter.IntegrationAdapter -f <INSTALL_DIR>/properties/AGENTDynamicclasspath.cfg

      Step 3: JVM Bootstrapping (VM Options)

       Copy these into your VM Options field (replacing <INSTALL_DIR> with your path):

      <response-element class="" ng-version="0.0.0-PLACEHOLDER"></response-element>

      -Dvendor=shell
      -Dyfs.instance=dev
      -Dyfs.home=<INSTALL_DIR>
      -DINSTALL_DIR=<INSTALL_DIR>
      -DRESOURCES_DIR=<INSTALL_DIR>/resources
      -Dsci.op_env=local
      -DvendorFile=<INSTALL_DIR>/properties/servers.properties
      -Dyfs.logging.defaultLevel=VERBOSE
      -Dyfs.logall=Y
      -DLOG_DIRECTORY=<INSTALL_DIR>/logs
      -DDLOCK_LOG_DIR=<INSTALL_DIR>/logs
      -Djava.io.tmpdir=<INSTALL_DIR>/tmp
      -Dfile.encoding=UTF-8
      -Dnet.sf.ehcache.skipUpdateCheck=true
      -Djava.util.Arrays.useLegacyMergeSort=true
      -DDISABLE_DS_EXTENSIONS=Y
      -Djavax.net.ssl.trustStoreType=jks
      -Djavax.net.ssl.trustStore=<INSTALL_DIR>/jdk/jre/lib/security/cacerts
      

      <response-element class="" ng-version="0.0.0-PLACEHOLDER"></response-element>

      public class OMSTest2 {
      
          public static void main(String[] args) {
              try {
                  YIFApi api = createApi();
                  YFSEnvironment env = createEnvironmentObject(api);
                  //once environment is created, we can call any service
                  //for example, we can call getCustomerDetails service
      //            String xmlString = "<Customer><CustomerKey>123</CustomerKey></Customer>";
      //            Document doc = convertStringToDocument(xmlString);
      //            Document responseDoc = api.invokeService(env, "getCustomerDetails", doc);
      //            System.out.println(responseDoc);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      
          public static Document convertStringToDocument(String xmlString) throws Exception {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
      
              InputSource inputSource = new InputSource(new StringReader(xmlString));
              Document document = builder.parse(inputSource);
      
              document.getDocumentElement().normalize();
      
              return document;
          }
      
      
          private static YIFApi createApi() throws YIFClientCreationException {
              YIFApi yifapi = null;
              yifapi = YIFClientFactory.getInstance().getApi();
              return yifapi;
          }
      
          private static YFSEnvironment createEnvironmentObject(YIFApi api) throws Exception {
              String envString = "<Environment userId=\"<userid>\" progId=\"<ProgId>\"/>";
              return api.createEnvironment(convertStringToDocument(envString));
          }
      
      }
      <response-element class="" ng-version="0.0.0-PLACEHOLDER"></response-element>


    ------------------------------
    Sudheer Chadalavada
    ------------------------------