We have set up a port for file polling. A service is called when a file is dropped in the configured folder.
The question is “what determines which folder the file get moved to on completion? It either goes to the done or error folder.” Right now all our files go to the done folder. How do we make it go to the error folder?
just make the calling service failed
How do you do that? Is there a service to call to create a failure? Or do you return a special parameter from the called service?
Easiest way (and sufficient here). Insert an exit step with exit flow and signal failure.
Alternative for throwing errors: pub.flow:throwExceptionForRetry
This enables calling the service from within a repeat step which repeats on error.
Please look into Developer_Users_Guide for more Details.
Thanks very much Martin for your quick and concise answer.
That worked. Thanks again.