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
  • 1.  How to check if received input value matches the allowed list of values

    Posted Wed January 31, 2018 02:05 PM

    Hi Everyone,

    I have a field orderType which can have any value like customer , customer order , cust order etc.
    The allowed valued for order type are customer , cut , install , HTYR,… etc.
    How can i check if the orderType received in input is the same as allowed list.

    I have tried using indexOf service but it fails in the below case
    input - customer order
    configured allowed type - customer , cut , install , HTYR, GTYU, UITO, UTYFST
    pub.string:indexOf gives me output as positive , here 1 , as it takes customer as a value and shows the index of customer , hence it fails . because the actual input is ‘customer order’ which should not be allowed

    Kindly suggest me a solution.
    Appreciate a quick response.

    Thanks


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


  • 2.  RE: How to check if received input value matches the allowed list of values

    Posted Wed January 31, 2018 02:29 PM

    Hi,

    what about checking the “input validation” checkbox in Designer on the Input/Output-tab of the service?

    When the field has a properly configured pick list, this input validation should fail and the service should be bypassed with an error message in the error log or server.log.

    Regards,
    Holger


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


  • 3.  RE: How to check if received input value matches the allowed list of values

    Posted Wed January 31, 2018 02:41 PM

    “Validate input” won’t force check the pick list choices settings.

    To avoid unexpected value, you need check “Validate input” checkbox, and set the content type property of the field as below.

    1. Select “string {XML Schema}”
    2. Click “Customize” button
    3. Add all the allowed value in the “pattern” list

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


  • 4.  RE: How to check if received input value matches the allowed list of values

    Posted Wed January 31, 2018 03:28 PM

    This field OrderType is in a document , which i am using as a reference in mid of the code somewhere. Since its not a part of input i can not select validate input.
    I just need a way to compare input string which is customer order with the pre configured values like customer, HGTY, cut, install etc.
    If my input string matches the configured string i shall go ahead with the processing.

    Also this is just one field which i need to check on , rest other fields has no such condition.


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


  • 5.  RE: How to check if received input value matches the allowed list of values

    Posted Wed January 31, 2018 04:10 PM

    If you can’t update the field definition in document type, you could add Branch step in the flow to choose different way based on the field value.


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


  • 6.  RE: How to check if received input value matches the allowed list of values

    Posted Thu February 01, 2018 12:07 PM

    Hi,

    in this case you can try to use pub.schema:validate using your document definition for the conformsTo parameter if the document contains the values in the constraints for the field.

    If pub.schema:validate is not an option, you can use the fallback scenario described by Xiaowei.
    Remember to add a $default-Sequence at the end of the branch to log an error message “Unknown value for field ”.

    Can you provide a snippet which shows how the field is defined in document?

    Regards,
    Holger


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