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.


#TechXchangePresenter
 View Only
  • 1.  Using Variable Substitution from database field

    Posted Tue June 24, 2003 03:03 PM

    I am using wM 6.0.1 and the JDBC adapter service to select a format for an email message I would like to send out. When I get the format from the database, I want to be able to combine the format with the values in the pipeline to perform variable substitution for my email message. I want to be able to modify the format in the database to modify what goes into my email (what fields from the pipeline):
    database field: format= %email/subject%%email/body% where email is my document name.

    I populate the document, EMAIL, with values and I want to be able to do something like a MAP step using variable substitution to combine the format with the values from pipeline.

    Has anyone done anything like this? I can’t get the variable substitution to work.


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


  • 2.  RE: Using Variable Substitution from database field

    Posted Tue June 24, 2003 03:19 PM

    I want to be able to do what the wMTN_BuildingYourNetwork.pdf describes on page 328-329.
    C:\webMethods6\TNConsole\doc


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


  • 3.  RE: Using Variable Substitution from database field

    Posted Tue June 24, 2003 07:45 PM

    Philip,
    I believe you have 2 different fields “email” and “subject” in pipeline. So you can either concatenate both the fileds before you actually pass on to the format so that “email/subject” appears as a single field. OR you need to do is %email%/%subject% and %email%/%body%.

    Hope this helps.
    RC


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


  • 4.  RE: Using Variable Substitution from database field

    Posted Wed June 25, 2003 02:20 PM

    Let me try to clarify a little bit more what we are trying to do. In our pipeline, we will have a document called email. Email will contain the fields subject, system name, server id, basically all of the fields necessary to compose an email message. Now, instead of hard coding the format of the email message in flow service (body = %email/systemName%%email/serverId% etc. we would like to store the format of the email message in the database so we can change the format of the email message on the fly. For example, we can automatically change the format of the email message body to the server id being first instead of the system name: %email/serverId% %email/systemName%.

    Has anyone done anything like this? I can not get the variable substitution to work when grabbing the format from the database. Any help would be greatly appreciated. Thanks!


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


  • 5.  RE: Using Variable Substitution from database field

    Posted Wed June 25, 2003 03:07 PM

    The simplest solution is to use regular string formatting instead of the pipeline substitution. In your service, get the format from the database and then use the string formatting functions to put all the values together. You probably want to use pub.string:messageFormat to do this - it should work just like the Java message formatting functions. Then your email body is just the output of the messageFormat call.


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