Value not getting set inside Repeat

I am setting one of the flag to “a” before executing a repeat statement. After that I am resetting the value of the flag to “b” if something inside the repeat fails. But when the control goes to the repeat statement 2nd time I again see the value of flag as “a” where as it should be “b”.
My repeat condition is set to execute on FAILURE.
So the value set inside repeat is not getting retained on Failure.
Has somebody see this behavior before.

Thanks for your help.

Some thoughts:

  • Do you have Overwrite Pipeline Variable checked when you set the value to b?
  • Is the other failure a ServiceException? If so, the service will only retain the set value if you are Tracing - Run or Step will not.

It looks like the repeat creates it’s own scope. There is probably a link to do with the behavior when you code try catch blocks with sequences and you lose pipeline values when an error is thrown. I guess that on error in a repeat, you lose any set variable inside of it.