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 retrieve every variables hardcoded using set value

    Posted Tue May 17, 2022 10:42 AM

    Hi there,

    I have a little question concerning the set value feature. Basically I’d need to retrieve every variable in my Pipeline out where a value was set using the “set a value for the selected variable” button. Is it something doable ?

    Thanks !


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How to retrieve every variables hardcoded using set value

    Posted Tue May 17, 2022 10:48 AM

    Hi Gauthier,

    can you describe your question in detail please.
    From the written above I am not sure what you are looking for.
    Some Screenshots might be helpful.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How to retrieve every variables hardcoded using set value

    Posted Tue May 17, 2022 10:56 AM

    Hi Holger,

    Thanks for your prompt answer.
    Actually the question is pretty simple but hard to formulate.
    I have a service to copy from a customer A to a customer B. Nothing needs to change between those two services except some variables where the value was set using right click, set Value.
    Like this:
    image.
    And I’m wondering if there’s a way to find all those variables or if I’m comdamned to check myself every step of the service to find them.

    Hope it’s clearer now :slight_smile:


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: How to retrieve every variables hardcoded using set value

    Posted Tue May 17, 2022 11:25 AM

    Hi Gauthier,

    yes, this makes it clearer now.

    But I think that this will be difficult to achieve with a service implementation.

    Basically this will be the outline:
    Scan the packages ns folder and subdirectories for the flow.xml files and query it for the MAP-Setter tags.
    After identifying these lines you can edit them, save the file and reload the package after completion.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: How to retrieve every variables hardcoded using set value

    Posted Tue May 17, 2022 12:51 PM

    From a practical perspective it might be best to avoid hard-coding values via setValue if they are likely to change. I would instead recommend using global variables or even using a config file that you host directly in the config directory of your package.

    You can use a utility service to read the file and return all of the properties so that they can be used instead.

    That way everything is externalised, albeit you still won’t know which values are used in which services unless you use a sophisticated naming scheme for keys.

    regards,
    John.


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: How to retrieve every variables hardcoded using set value

    Posted Wed May 18, 2022 03:17 AM

    Hi @John_Carter4 thanks for your answer, I totally agree with you. Unfortunately, I’m not the one in charge for this project so all I can do is obey ahahah.

    Hi @Holger_von_Thomsen, I will take a look on the xml, it can be a good option, I guess I can extract the variables from the file with a script, thanks a lot !


    #Integration-Server-and-ESB
    #webMethods