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.  Calculate X = 10 * Y + X within a single MAP step

    Posted Wed December 05, 2018 06:51 AM

    Can one calculate X = 10 * Y + X in a single step (i.e., as a single expression), in a Flow service?
    – It is crazy to have a separate MAP for each elementary math operation!

    If

    X = 10 * Y + X

    is not a possibility, then, maybe,

    Z = 10 * Y + X

    is, at least?


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


  • 2.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Wed December 05, 2018 02:48 PM

    Hi,

    the easiest way might be to write a java service doing the calculation and invoke this one from the flow service.

    Regards,
    Holger


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


  • 3.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Wed December 05, 2018 04:07 PM

    Writing a java service would be even more insane for this purpose than invoking multiple simple operations. I agree that the situation is absolutely horrible for anyone coming from other programming languages.

    One could create a java service that would calculate any math expression – e.g. using JavaScript in the implementation. I’m not sure about the performance, but if it doesn’t matter then math calculations would be much more elegant. E.g. create a service having 5 parameters: x, y, z, t and expr. Expr is a string that specifies the expression to calculate. In the expression, you can use x, y, z and t. This would be a universal calculator for expressions having no more than four variables.

    But the truth is that (at least according to my experience) complex math calculations are a rare thing in wM code. wM is used for integration where calculations usually do not happen often.


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


  • 4.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Wed December 05, 2018 05:00 PM

    As mentioned above, you can create a java service and perform mathematical operations. You can still do the same via flow, not with a single map step.

    I think SAG should support this feature like other tools where we can write expressions and provide a result.

    You can raise a feature request on SAG Brainstorm.


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


  • 5.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Thu December 06, 2018 07:48 AM

    Holger, fml2 *, M@he$h, all your answers are good, thank you!

    And, M@he$h, I will try to accost the SAG Brainstorm with this :wink:

    Regards,
    Maksym


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


  • 6.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Thu December 06, 2018 09:52 AM

    Don’t expect too much. In my experience, brain storm is like the null device.


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


  • 7.  RE: Calculate X = 10 * Y + X within a single MAP step

    Posted Thu December 06, 2018 10:28 AM
    • That’s, probably, so about any facility alike…

    Anyways, I think, I’ll give it a shot. We’ll see what comes out )


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