log.info("[BA PARTICIPANT COMPL SERVICE] Prepare the backend resource and if successful notify the coordinator that we have completed our work");
if (ServiceCommand.isPresent(DO_COMPLETE, serviceCommands)) {
try {
// Tell the coordinator manager we have finished our work
log.info("[BA PARTICIPANT COMPL SERVICE] Prepare successful, notifying coordinator of completion");
participantManager.completed();
} catch (Exception e) {
/* Failed to notify the coordinator that we have finished our work. Compensate the work and throw an Exception
* to notify the client that the add operation failed. */
log.error("[BA PARTICIPANT COMPL SERVICE] 'completed' callback failed");
throw new RuntimeException("Error when notifying the coordinator that the work is completed", e);