GOTO statement

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.

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.

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

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.

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

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

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.

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