public async Task <IActionResult> RetryFailedActions(ResponseRetryFailedActionsModel responseObj) { ResponseModel result = await _responseDataManager.GetResponse(responseObj.ResponseId); if (result != null) { IEventSagaReceiveResponseUpdated newMessage = new EventSagaReceiveResponseUpdated() { Response = result, ActionStatus = ActionStatus.Error }; await _serviceBus.BusAccess.Publish(newMessage); } return(Ok(result)); }
public async Task <IActionResult> AddActionToResponse(ResponseChangeActionPlanModel responseObj) { ResponseModel result = await _responseDataManager.ChangeActionOnResponse(responseObj); if (result != null) { IEventSagaReceiveResponseUpdated newMessage = new EventSagaReceiveResponseUpdated() { Response = result, ActionStatus = ActionStatus.NotStarted }; await _serviceBus.BusAccess.Publish(newMessage); } return(Ok(result)); }
public async Task <IActionResult> LocateResponse([FromBody] ResponseStartModel responseObj) { var result = await _responseDataManager.LocateResponse(new ResponseUpdateModel() { ResponseId = responseObj.ResponseId, Geolocation = responseObj.Geolocation }); if (result != null) { IEventSagaReceiveResponseUpdated newMessage = new EventSagaReceiveResponseUpdated() { Response = result, ActionStatus = ActionStatus.NotStarted | ActionStatus.Skipped }; await _serviceBus.BusAccess.Publish(newMessage); } return(Ok()); }