Question & Answer
Question
In certain scenarios, the implementation requires that while calling a set of services/APIs the DB commit should not happen after each API or service execution. The data should be committed once all the executions have been completed successfully. For example, one such flow could be Execute service1. Execute API. Execute service2. Requirement here is to commit the result to DB together after the entire flow is finished successfully rather than after each execution.
Answer
This can be achieved by calling the services/APIs in a multiApi. The multiApi API is used to call multiple APIs from a single API invocation. It makes sure that data is committed to the DB only after all the executions are successful. This wrapper API ensures that all the APIs/services within a invocation reside in the same commitment boundary. This permits a set of work to be submitted as a unit; either all the work, as represented by the API calls, succeeds or fails. If any individual API throws an exception, the multiApi API throws an exception, and the work done so far is rolled back.
Was this topic helpful?
Document Information
More support for:
Sterling Order Management
Software version:
9.2, 9.1, 9.0
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows
Document number:
488427
Modified date:
16 June 2018
UID
swg21632893