IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Prevent input variable value from changing

    Posted 11/19/09 06:03 PM

    I need to know how I can prevent input variable value from changing. For example, I have service TestInputVariable with input parameter of InputDoc (document). See below structure. Inside my service, I map “Profile” to “tmpProfile”. I then use toUpper service for “tmpProfile/name”. My “tmpProfile/name” is uppercased which is the behavior I’m expecting :), but then “Profile/name” is also uppercased :confused:. How can I prevent “Profile/name” value from changing?

    InputDoc Structure:

    • InputDoc
      ** Profile
      *** name
      *** message
      *** phonelist
      **** cell
      **** work
      **** home

    Thanks for help!


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: Prevent input variable value from changing

    Posted 11/19/09 06:14 PM

    Map at the individual field level, not the document level.

    Think of this in Java terms.

    java.util.HashMap a = new java.util.HashMap();
    java.util.HashMap b = a;

    b.put(“foo”, “bar”);

    With this code, there is just one HashMap object with two variables pointing to it. Any modification through either var will be reflected in the other.

    String value = a.get(“foo”); // value will be “bar”
    String value2 = b.get(“foo”); // value2 will also be “bar”

    When you map at the document level, you’re creating a variable that points to the same underlying document/record. To avoid that, you need to create a new record. That is done by mapping at the field level to a new document.

    Hope this helps.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Prevent input variable value from changing

    Posted 11/19/09 06:40 PM