Conditionally stop executing loop/branch

Hello,

I have a Workflow process with a xml loop in a branch. I want to stop/exit the loop/branch as soon as a special event is triggered. I only know the way to raise an error (e.g. VBScript script: Err.Raise 449) and set error handling in the script plugin to stop executing branch.

My Workflow:

  1. Folder Listing
  2. XML Splitter
  3. Math Operation ( %{count} + 1 )

What I need:
If %{count} > 1 stop executing the loop/branch.

Thanks
Thomas

You got it right already: that’s the only way to do it.

By the way, you don’t need to manage your own %{count} variable, that’s what the %i system variable is there for. It’s available inside loops and splitters and gets incremented by one with each iteration. Note that the %i counter is 0-based.

Ok, thank you for your reply and the tip.