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.  Database connector dynamic query

    Posted Tue January 17, 2017 05:36 AM

    I have a SearchApp with few text inputs for a user (name, lastName, address etc.) to filter the database. In my connector I have a huge query with few table joins and a lot of conditions. Point is I added all those conditions, because if user inputs value to all of the fields then they are necessary, but if user inputs only a name and leaves every other field empty then those conditions are unnecessary and I could send just a simple query to the database, instead I’m doing 5 joins with 10 conditions that are gonna evaluate to true anyway.

    I want to dynamically change query of the connector, something like:

    if (nameTextInput != null)
    query.append("WHERE name = " + nameTextInput);

    You get the idea. Is that possible?


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 2.  RE: Database connector dynamic query

    Posted Tue January 17, 2017 07:40 AM

    Hi Hara,

    where is the connector running?
    On MWS or IS?

    Which wM Version are you using?

    Regards,
    Holger


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 3.  RE: Database connector dynamic query

    Posted Tue January 17, 2017 10:52 AM

    Hi, it’s running on MWS and wm version is 9.5.


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 4.  RE: Database connector dynamic query

    Posted Sun January 22, 2017 06:23 AM

    HI Hara,

    You must be using IS adapter to run the query on the back end. And the query is built on UI.

    Using dynamic query adapter should suffice your needs.


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods