It’s an exception and Origam doesn’t support exception handling in workflow yet.
So from my point of view I would think of one of the following ideas:
a) try to avoid exception, so that e.g. stock unavailability wouldn’t cause exception, but return e.g. some value, and the current iteration would be ended based on that returned value
b) sometimes the iteration can be transfromed into workqueues and asynchronous porcessing. Each iteration only create one work queue entry with automatic processing. The one-iteration logic is moved to work queue cmd. This approach is sometimes even better, becouse it is done in smaller transaction, but sometimes it isn’t feasible.
c) create a request to Origam to support exceptions in workflows.