6.12.7.3 TMM_COMMIT_TX Function

Used by the transaction initiator application to commit a global transaction.

Syntax

TMM_COMMIT_TX (
   microTxTransaction IN MicroTxTransaction,
   forwardHeaders     IN ForwardHeaders DEFAULT NULL
);

TMM_COMMIT_TX Function Parameters

Parameter Description
microTxTransaction Mandatory parameter. The MicroTxTransaction object that the TMM_BEGIN_TX function returns.
forwardHeaders

Optional. The application forwards the specified headers to the MicroTx coordinator, and then the coordinator uses these headers while communicating with the application. An application can forward the following headers: authorization token, transaction token, and a unique ID to trace the transaction across the microservices.

If you have enabled authorization by setting tmmConfiguration.authorization.authTokenPropagationEnabled to true in the values.yaml file for the coordinator, your application must forward the authorization token.

If you have set tmmConfiguration.transactionToken.transactionTokenEnabled to true in the values.yaml file for the coordinator, your application must forward the transaction token.

Examples

The following sample code demonstrates how you can commit a transaction using the TMM_COMMIT_TX function.

TMM_COMMIT_TX (l_microTxTransaction, l_forwardheaders);

Where, l_microTxTransaction is the name of the MicroTxTransaction object that the TMM_BEGIN_TX function returns and l_forwardheaders that the headers that the application forwards.