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.  Conditional mapping using IF statement in webMethods.io

    Posted 05/13/21 12:56 PM

    Hi ,

    I want to check whether a certain variable CONTAINS some set of strings or not using IF condition in WebMethods.io. Based on the values, I want to execute my steps. Is this possible? If yes, please share the code snippet.

    Ex:- Whether string1 starts with “ABC” or “DEF” or “GHI”. Based on this, I want to execute 3 different flow steps in my flow service. string1 contains alphanumeric values.

    Thanks in advance.


    #webMethods-io-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Conditional mapping using IF statement in webMethods.io

    Posted 05/13/21 03:16 PM

    I have not used webmethod.io but you mentioned you’re using FLOW steps…

    Using BRANCH on ‘var’ you can use regex in the step labels to select the step/block you want execute for each:

    BRANCH on '/myVar'
    /^ABC/ : SEQUENCE
    /^DEF/ : SEQUENCE
    /^GHI/ : SEQUENCE
    

    If you want to ignore case, use /(?i)^ABC/

    The / / around the label indicates the label contains a regular expression. We use that a lot.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-io-Integration


  • 3.  RE: Conditional mapping using IF statement in webMethods.io

    Posted 05/13/21 03:24 PM

    Hello @atjha

    webMethods.io Integration FlowServices do not yet support regular expressions.
    As an alternate solution you could use the Substring utility to extract the first three characters from the string, and then use IF statements to determine if the substring value is equal.
    Obviously the begin and end index used in the Substring can be whatever you need (e.g. make these dynamic).

    For example

    In the first step, the Substring is checking String1, using a beginindex of 0 and endIndex of 3.
    The subStringValue is the first three characters of the string.
    The rest of the code uses regular IF statements to check if subStringValue equals to the compare value (e.g. ABC, DEF, or GHI).
    In the on-premise Flow Services world you can use regular expressions.

    Do you always want to check which characters are at the beginning? Of course you can make the begin index and end index used in the Substring dynamic using parameters.
    Anyway, this is a quick and dirty way. I am checking with our R&D team about when wM.io Integration FlowServices will support regular expressons.

    Regards
    Wayne


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-io-Integration


  • 4.  RE: Conditional mapping using IF statement in webMethods.io

    Posted 05/14/21 09:30 AM

    Hi Wayne,

    Thanks for providing the workaround. I would like to add some point, if I may. I don’t see much flexibility in terms of options available in WebMethods.io with Flow Services like we used to have with on-premise IS. Also, built in services are very less (to say the least).

    Hope to see them in future though. :slight_smile:


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-io-Integration


  • 5.  RE: Conditional mapping using IF statement in webMethods.io

    Posted 05/14/21 09:32 AM

    Also, are there any built in services in WebMethods.io to handle incoming SOAP Requests? Please let me know.


    #webMethods-io-Integration
    #Integration-Server-and-ESB
    #webMethods