I need to call one third party service and if it succeeds, then i will call another service of my application. What is the best approach to encapsulate this calls? and ensure that its become a single transaction?
For Example, call this services in one single point:
public class ThirdPartyService(){
sendProduct(){
// Call external service
}
}
public class ProductService(){
confirmProduct(){
// Do stuff
}
}
Aucun commentaire:
Enregistrer un commentaire