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.  Flat File Conditional Formatting

    Posted 09/17/07 09:55 AM

    Hello,

    We have a record D in the flat file with the following structure:
    D^Field1^Field2^Field3^Field4. And now, we want to format the Field2 with the logic(when Field1==“AA” then Field2=Field1+Field2; else Field2=Field1). So can it be done with a format service? Thanks a lot.


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


  • 2.  RE: Flat File Conditional Formatting

    Posted 09/17/07 02:00 PM

    This is logic that is probably best placed within your transformation logic. Given the info so far, I would create a service named “getFieldsFromD” that would use the logic you describe to return the appropriately named fields.


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


  • 3.  RE: Flat File Conditional Formatting

    Posted 09/18/07 04:19 AM

    Thanks reamon. We have a standard process service of the flat files, but some times, our user may need us to do some conditional formatting like I showed before. So we need to develop some transformation services to do this as your suggested. And the problem is, we need to get the message types and branch on it to invoke the transformation services in the standard process service. Also,will the formatting service be more efficient than looping in a transformation service? Thanks a lot.


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


  • 4.  RE: Flat File Conditional Formatting

    Posted 09/18/07 06:26 AM

    A format service, as defined by pub.flatFile:FormatService, is applicable in relatively narrow scenarios. It takes just one field as input. And is invoked only in convertToString and convertToValues. So you won’t be able to implement anything like the logic you mentioned in your first post.

    Define a flat file schema that represents the structure of the source file as is. Then define 1 or more schemas that represent the various output document types that you need. Then, when you’re processing the source file, determine (by whatever means) what output document type you need to create. Then call the services that translate the source type to the target type. These translation services can be as sophisticated (field manipulation as described in your first post) or as simple as needed.

    If you separate the definitions and logic by document types, things will be easier to understand and maintain.


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


  • 5.  RE: Flat File Conditional Formatting

    Posted 09/18/07 07:28 AM

    Thanks reamon for all your information.


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