Under the current arch you'd need to manually update the status field from the action pipeline, if a failure occurs. The gateway marks the field as done because it is actually done with the record - it has successfully delivered it async to the pipeline. The error has occurred asynchronously.
Are you in a position to rejig the problem?
OK. Yes I can rejig the problem.
What is missing from the original posting is that this is related an issue that was raised in JIRA and I asked for it to be moved here so that it could be discussed.
The issue requested synchronous behaviour to be added to the gateway and, as I commented on the issue, this is neither desirable nor safe in a transactional environment.
The issue is https://jira.jboss.org/jira/browse/JBESB-2207
I am going to move this topic to the design forum