Failure in one workflow among several

What is the best way to structure a combination of workflows where the front end data will be sent to 3 different APIS, in 3 different databases receiving this information, but for example if the first 2 are successful and the last one fails, I can’t have a database not synchronized with others, is there any way to evaluate them all before actually running them? Or do I have to redo all of them, except the 2 that worked? my fear is the lack of data integrity on all bases

You can do the 3 API calls as actions, then trigger a custom event with a condition on it like Result of step 1 is success and Result of step 2 is success and Result of step 3 is success.. (or however you determine the 3 were successful with no errors)

Then put the rest of the workflow in the custom event and pass through all the data from the API calls as parameters :blush:

I recommend checking the box for “Capture errors and continue workflow” so you can handle it yourself instead of the workflow just stopping.

Ok, mas caso o resultado 1 e 2 forem sucesso e o 3 for falha, os 2 primeiros terão recebido os dados, já que a API já executa o POST, o terceiro não, essa falha que prejudicaria a integridade dos dados, visto que eu teria que excluir os 2 primeiros? Pois eu estaria com 2 bases atualizadas e 1 não, essa falha que eu queria ver a melhor forma de tratar, acho que não existe outra saida a desfazer todo o processo que deu certo, né?

Obrigado!

Maybe you can retrieve or GET the data first to make sure the server responds, your authorization is correct, and save the response of all the data. Then if one of the initial checks fails you can stop it before you make changes via POST requests. Then also if one of the POSTs fails you have the information from the GET previously in case you have to put all the information back? :sweat_smile: