Sterling Managed File Transfer

Sterling Managed File Transfer

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

 View Only

View and Find BPML in IBM Sterling B2B Integrator and Sterling File Gateway

By Tanvi Kakodkar posted Mon January 20, 2020 08:09 AM

  
Originally updated on July 31, 2014 by JeffAntley

The attached file is a small utility to extract and print to standard out the BPML associated with each WorkFlowDefinition in the system.
This utility can be used in combination with grep or other tools to search for specific strings or patterns in the BPML.

Instructions for installation:
1. Copy the dumpwfd.jar to the install/jar directory dumpBPML.zip (Updated - dumpBPMLv2)
2. Edit install/properties/dynamicclasspath.cfg.in and add a line pointing to the jar
3. Copy dumpWorkflowBPMLs.sh.in to install/bin and run setupfiles


Run the tool as:
  sh dumpWorkflowBPMLs.sh [-full]
  • With no options, you get the raw BPML for all BPs in the system.
  • With the -full option, you also get the metadata.

To recompile the source, use:
 javac -d . -classpath /install/jar/platform_ifcbase/1_3/platform_ifcbase.jar:/install/jar/platform_asi/1_3/platform_asi.jar DumpWorkflowBPMLs.java
 jar cf /install/jar/dumpwfd.jar com

Source
The utility uses public APIs in the product and the source is included:

package com.sterlingcommerce.woodstock.workflow;
import java.util.Vector;
import com.sterlingcommerce.woodstock.workflow.WorkFlowDef;
import com.sterlingcommerce.woodstock.workflow.InvalidWorkFlowDefException;

public class DumpWorkflowBPMLs {
   public static void main(String args[]) throws Exception {
      boolean full = false;
      if (args.length > 0) {
         if (args[0].equalsIgnoreCase("-full")) { full = true; }
      }
      WorkFlowDef wfd;
      Vector v = WorkFlowDef.listWorkFlowDefs();
      int size = v.size();
      System.out.println("<WorkFlowDefs>");
      for ( int i = 0 ; i < size ; i ++ ) {
         wfd = (WorkFlowDef) v.elementAt(i);
         wfd.load();
         if (full) {
            System.out.println(wfd.toString());
         } else {
            System.out.println("<WorkFlowDef name=\"" + wfd.getName() + "\">");
            System.out.println(wfd.getXML());
            System.out.println("</WorkFlowDef>\n");
         }
      }
      System.out.println("</WorkFlowDefs>");
   }
}
 
 
Special thanks to Drew Myers for helping with testing.

#DataExchange
#IBMSterlingB2BIntegratorandIBMSterlingFileGatewayDevelopers
0 comments
41 views

Permalink