Add an entry point to the patron request controller that allows a request to be rolled back to its previous state if it is in the ERROR state

Description

When a request is in the ERROR state we sometime want to roll it back to its previous state as the reason it ended up in the ERROR state has been resolved.

The following needs to happen

  1. Check that the request to be rolled back is in the ERROR state, if it is not return an error to say so

  2. Add an audit message with brief description set to “Rollback Triggered”, the from status being ERROR and the to status being the previous state of the request

  3. On the request, set the error_message to null, next scheduled poll to now and the status code to the previous status code.

Note Steps 2 and 3 should be in the same transaction

I am assuming we have a standard object we return, that says whether we are successful or not and a place in which to put the error message and any additional details that may be appropriate to accompany the error message if we are not.

Activity

Show:

Details

Assignee

Reporter

Components

Fix versions

Sprint

Priority

Created August 29, 2024 at 8:57 AM
Updated September 24, 2024 at 4:41 PM

Flag notifications