Commit/Rollback/End
Manual transaction sets can be committed or rolled back. Commit, rollback, and end requests to the database are made by using the endTransaction element. The transaction set is identified by the trans attribute. The action attribute indicates the action to take on the transaction set. The value can be commit, rollback, or end.
This element is always an empty element, as indicated by the forward slash.
It is recommended that you manage the session ID when doing manual commits and terminate the session after the transaction is complete.
<?xml version='1.0'?> <jdeRequest type='callmethod' user='steve' pwd='xyz' environment='prod' role='*ALL' session='' <endTransaction trans='t1' action='commit'/> </jdeRequest> <?xml version='1.0'?> <jdeRequest type='callmethod' user='steve' pwd='xyz' environment='prod' role='*ALL' session='' <endTransaction trans='t1' action='end'/> </jdeRequest>
If startTransaction and endTransaction are in separate documents, one of these scenarios occurs:
The session attribute is not sent in the second document. In this case, the system uses the user ID, password, and environment to match the previous session.
The session number from the response of the first document is sent in the session attribute of the documents associated with the same transaction.