This API documentation is for Ballerina 1.2.0. View API documentation for the latest release.

Functions - transactions


Get the current transaction id.



returns string

Get the current transaction id. This function is useful for user code to save state against a transaction ID, so that when the oncommit or onabort functions registered for a transaction can retrieve that state using the transaction that is passed in to those functions.

  • Return Type

  • A string representing the ID of the current transaction.