webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | Developing for webMethods OneData | REST Web Services | Ending a REST Call with Transaction Context
 
Ending a REST Call with Transaction Context
After you initiate a REST call with the transaction context of transactionId value, it remains in active state, until you complete or end the REST call by issuing an endTransaction request. The endTransaction request also commits or rolls back any DML actions associated to hooks.
Note: OneData does not support partial commit in a transaction context.
1. Create a POST request to end the transaction with the format:
http://<appsservername>:<port>/<contextRoot>/rest/<repositoryId>/<projectName>/TX/endTransaction
2. Specify the body of the body of the POST request with the following attributes in JSON string format:
*transactionId
*message
*action.Value could be commit or rollback.
Note: You cannot use multiple transaction IDs in a single endTransaction request.
Examples:
BODY
{"transactionId":"node112_1434955609000","message":"completed","action":"commit"}
{"transactionId":"node112_1434955609000","message":"rolling back due to failure","action":"rollback"}
3. Submit the request.

Copyright © 2011-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release