How To Force Task Queue to Error

Hi all,   I have a manual ETL process that will not run often. However, the steps for the ETL process is executed using TaskQueues. The data lines are also processed line for line through TaskQueues. In order to 'ping' whether the processing is completed for a step, I initiate a separate TaskQueue using a helper entity that does an OQL count and based the state of the processing.   Is it possible to 'gracefully' fail a task queue task so that I can use the build-in retry functionality. Obviously, I can force an exception using the CommunityCommons' ThrowException Java action. Just wondering if there is a more elegant solution.   Thanks in advance!
2 answers

Hello Nico,


If I had to create this i would use a configurable entity with a boolean which i retrieve in the taskqueue and based on that boolean go through the normal flow(happy flow) or create an error (unhappy) flow.


But that is me, I will follow this thread to see and learn from the input from others.


Good luck!




Hi Nico,


I feel you! Personally, I solved this by creating a variable in which I divide 1 by 0. For the error handler, I use an error event. It's also possible to use the error event directly from, for example, a consumed REST service. As this is not always possible, it would be great to have an option to manually set a task to failed.


As I discussed this with many people over the last few months, it's finally time to put it on the Idea page. Feel free to spread the word and arrange some upvotes; I will do this as well.


NOTE: It's on my to-do list to return a boolean value from the scheduled microflow. Not that I read something about this in the documentation, but I can imagine that this would be a clean way to trigger a retry as well. Possibly, the feature is already there.