Is there any way to keep count of the postpone activity?
I’m also having trouble with the deadline getting reset through every run.
I have a switch statement in my script that catches only certain business rule exceptions.
If it catches any of the exceptions that can be postponed, and depending on the exception type, it sets the number of days this transaction should be postponed.
An example would be if the account wasn’t created yet, I would want to retry in 2 days, but for an account that is on vacation I would want to retry in one week.
So the amount of time it needs to be postponed is variable.
The switch statement, sets up this amount of time, and the deadlines to which they should then stop trying.
So if the business exception keeps occuring there is no way for it to stop.
It just keeps retrying the script and resetting the deadline further and further out every time it runs.
I need a way to make it only try up to 3 times, so I can then throw the final received exception. I was thinking the best way to do this would be to somehow get the transactionItem.RetryNo But that never gets set and it’s null when I try to call it. I’m not sure how to set it though.