Happy Business Starts Here

Highlighted
New Student

How to stop a workflow from inside the workflow?

I want to be able to stop a workflow from inside the actual workflow.

e.g.

Iterate over some data, if a task is completed, then on success end the workflow instead of continuing to iterate. I can't figure out a way to do this. Can anyone provide some insight?

5 REPLIES 5
Highlighted
Valued Scholar

Re: How to stop a workflow from inside the workflow?

You can probably let it iterate, but not perform any activity inside the iterate. Meaning you can have a If condition just after the Iterate. Not an efficient solution, but in the absense of an option to 'break' out of the loop, this is a workaround.

Highlighted
New Student

Re: How to stop a workflow from inside the workflow?

Hi arindamkesh,

I tried your solution, and unfortunately my issue still persists. I'm attempting to update a field in an object, and once that field has been update, exit my iteration(or do nothing). The problem is my condition is checking if a field is black(as I have no other way to check whether or not to populate said field). With this sort of population method, it will populate all empty fields, instead of just the single one. Is there really no way to end a workflow or break out of an iteration clause?

Thanks.

Highlighted
Valued Scholar

Re: How to stop a workflow from inside the workflow?

Not that I know of. I would wait for others to reply. Maybe somebody can provide a better way t do it.

Did you try adding a condition to your blank check (i.e. certainField = blank AND anotherField = 'xyz') to see if only 1 record gets updated? Or maybe you can think of Iterating for a unique value of a field rather than all rows...

New Student

Re: How to stop a workflow from inside the workflow?

Unfortunately, I have 5 identical objects, and the object that takes the data is irrelevent, as long as it's one of the 5. Thank you for your assistance though.

Highlighted
Valued Scholar

Re: How to stop a workflow from inside the workflow?

"I have 5 identical objects" - how about iterating for a unique field only, assuming there will be atleast 1 field will be identical in all the 5 objects