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.

 View Only
Expand all | Collapse all

Perform Variable Substitution

  • 1.  Perform Variable Substitution

    Posted Tue October 14, 2003 05:20 PM

    Hi
    Can some one help me how to keep perform variable inside a perform variable substitution.
    I need to give like this %X/Y[%iteration%]/Z% for my XML but its not working.

    Thanks in advance.


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


  • 2.  RE: Perform Variable Substitution

    Posted Tue October 14, 2003 05:34 PM

    Can you elaborate more about your xml structure.(X/Y/Z)

    Thanks,


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


  • 3.  RE: Perform Variable Substitution

    Posted Wed October 15, 2003 04:43 AM

    I tried a little test: A variable substitution of this form works fine:
    %X[$iteration]/Y/Z%
    works fine.

    Since you mentioned $iteration, your map step must be within a loop. If you data structure is ‘/X/Y/Z’ and you are looping over the Y array, you can directly map this:
    %X/Y/Z%
    The correct Y element for that iteration - Y[$iteration] - is automatically chosen.

    You cannot do something like this though:
    %X[$iteration+4]/Y/Z%


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


  • 4.  RE: Perform Variable Substitution

    Posted Wed October 15, 2003 05:55 PM

    Hi Sonam,
    Thanks for your help. Your soultion works just great.

    Thanks
    sivaram


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


  • 5.  RE: Perform Variable Substitution

    Posted Wed October 15, 2003 05:56 PM

    Hi Sonam,
    Thanks for your help. Your solution works just great.

    Thanks
    sivaram


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


  • 6.  RE: Perform Variable Substitution

    Posted Fri October 17, 2003 02:14 PM

    You’re welcome Sivaram. Glad to help.


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


  • 7.  RE: Perform Variable Substitution

    Posted Fri August 01, 2014 11:45 AM

    Hi sonam,

                 I am unable to do perform variable substitution the way you suggested. As i am getting same output what i have specified. 
    

    %X[$iteration]/Y/Z%

    Please let me know where I am wrong?


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


  • 8.  RE: Perform Variable Substitution

    Posted Mon August 04, 2014 01:00 PM

    Is the Branch Evaluate Labels set to True for the substitution to work?

    If not the syntax problems.

    HTH,
    RMG


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


  • 9.  RE: Perform Variable Substitution

    Posted Tue August 05, 2014 03:36 AM

    Make sure the branch is set to evaluate labels=true.


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


  • 10.  RE: Perform Variable Substitution

    Posted Tue August 05, 2014 05:36 AM

    I am not using Branch. Doing this process on loop


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


  • 11.  RE: Perform Variable Substitution

    Posted Tue August 05, 2014 11:14 AM

    I assume you have checked the option perform variable substitution :slight_smile:

    Can you explain what is the issue you are facing. May be screen shots would be helpful to assist you further.


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


  • 12.  RE: Perform Variable Substitution

    Posted Tue August 05, 2014 04:18 PM

    How can you use step substitution on the loop with out evaluate labels to True if you are not using as regular expressions?

    HTH,
    RMG


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


  • 13.  RE: Perform Variable Substitution

    Posted Wed August 06, 2014 03:15 AM

    My requirements is to just concatenate first name and lastname string lists into fullname string list .I’ve specified input array as firstname and output array as full name.Here I can do with indices but I want to use perform variable substitution to map lastnames


    loop1.png


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


  • 14.  RE: Perform Variable Substitution

    Posted Wed August 06, 2014 04:42 PM

    so can we assume this is checked in the setValue popup?

    " checked the option perform variable substitution"

    HTH,
    RMG


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


  • 15.  RE: Perform Variable Substitution

    Posted Thu August 07, 2014 06:26 AM

    What is your input and required output? May be something like below:
    First Name: Mahesh, Ani
    Last Name: Kumar, XXX
    Full Name: Mahesh Kumar, Ani XXX

    Correct me if I am wrong?


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


  • 16.  RE: Perform Variable Substitution

    Posted Fri August 08, 2014 07:10 AM

    Yes that is my requirement. I have checked “perform variable substitution”.


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


  • 17.  RE: Perform Variable Substitution

    Posted Fri August 08, 2014 09:49 AM

    Hi,
    FYI.

    As per my understanding, webMethods doesn’t have the in-built capability to do the substitution at more than one level.

    For example, i want to retrieve the data from a particular stringList (stringList_to_check) at particular index (index_to_retrive) without a loop and branch.

    So to do this we need to set value for a pipeline variable as %stringList_to_check[%index_to_retrive%]% along with pipelineVariableSubstitution checked. So it’s a dual level substitution which won’t work using this.

    So in-order to do this, there a special java service in PSUtilities package called as substituteVariables which will do this job.

    – Punith


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