Is it possible to get the number of times a workflow step has retried? I'd like to call some code on

Is it possible to get the number of times a workflow step has retried? I'd like to call some code on the final retry to prevent future jobs from picking up the same item.

I know I could technically keep it in a variable outside of the step but I worry that context would be lost on retries. Any options?
Was this page helpful?