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.  GOTO statement

    Posted Wed July 04, 2018 10:48 AM

    Hi Team,

    I have a requirement where we need to implement the logic in such a way that it works as GOTO statement.

    Suppose we have a flow service where we need to check some condition , if condition matches we need to go to some particular step of the flow service.

    Could you please help me understand how can this be done.


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 2.  RE: GOTO statement

    Posted Thu July 05, 2018 10:51 AM

    Any integration tool, will and must support this kind of flow logic. You can achieve the same via the exit step (with some flag value set in the pipeline) and use the branch step to execute the steps underneath if it is satisfied.

    Let us know your code snippet in some programming language say java, we can transform the same to flow language.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 3.  RE: GOTO statement

    Posted Thu July 05, 2018 11:56 AM

    Hi Priyanka,

    can you provide an outline of your planned source code please?

    AFAIK there is no explicit GOTO step in wM Flow language.

    You might want to consider using BRANCH and EXIT steps instead.

    See Service Development Help for further informations.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 4.  RE: GOTO statement

    Posted Mon July 09, 2018 04:20 AM

    Hi Mahesh and Holger,

    Say i have 10 lines of code where in 5th line i have used a branch step to check the condition , say Country Name.

    If countryname ==INDIA we need to go back to the 5th line of code to agn check the condition on country.

    If country is not INDIA , then exit.

    I am not able to figure out how to go back to that step again if we are not using any loop and repeat flow steps.

    Kindly advise.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 5.  RE: GOTO statement

    Posted Mon July 09, 2018 07:49 AM

    Hi Priyanka,

    what exactly do you plan to check on the branch condition if countryname equals India on the first evaluation?

    Please provide some pseudo code snippet explaining your current approach and we might be able to provide a flow language equivalent.

    Regards,
    Holger


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 6.  RE: GOTO statement

    Posted Mon July 09, 2018 12:24 PM

    Assuming you are using the loop step (for those 10 lines of doc list for IDATA array) and inside it call Branch/Sequence steps for each of the country name equalization and accordingly call the next step and exit the loop once it satisfies your conditional step.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 7.  RE: GOTO statement

    Posted Tue July 10, 2018 03:10 PM

    Exit from Label is effectively a goto.

    I would caution against the use of this though. More often than not, the logic can be achieved using other structured techniques.

    To provide effective guidance, however, we need to know exactly what logic needs to be achieved. Post what you have so far and, as others have requested, the pseudo code.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: GOTO statement

    Posted Tue July 10, 2018 05:50 PM

    Hi, Any progress you made so far since from the above comments and pseudo code?


    #edi
    #Integration-Server-and-ESB
    #webMethods