cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
394
Views
0
Helpful
0
Replies

How to handle a service update as a delete + commit + create?

Good morning,
my goal is to create a SERVICE in JAVA that must delete, through a template, the instance of a different service and then commit it. We say Service1 the service that must delete and Service2 the service that must be deleted.
Subsequently Service1 must recreate the instance of Service2 with a new json.
All this must be done in Service1 .
The problem is not the cancellation and creation of Service2 but the commit between cancellation and creation.
I open a transaction inside wich I delete Service2 instance and I apply the template:
   maapi.ncsApplyTemplate(tid, "deleteService2-Template", newPath, myVarsDelete, true, true);
  maapi.applyTrans(tid, false);
But I take Aborted: TimeOut on instruction maapi.applyTrans(tid, false);.
 
My question is:
1) is it right way to implement in a single transaction both the operations? (cancellation and creation)
2) If so, do anyone has idea in wich way can I overcome the timeout?
 
Thanks a lot for any contribution 
0 Replies 0