Functions
-
transactions
ballerina/transactions:0.5.0.<init>0 |
|
ballerina/transactions:0.5.0.<init>1 |
|
ballerina/transactions:0.5.0.<init>2 |
|
ballerina/transactions:0.5.0.<init>3 |
|
ballerina/transactions:0.5.0.<init>4 |
|
beginTransaction |
Deprecated
When a transaction block in Ballerina code begins, it will call this function to begin a transaction.
|
cleanupTransactionContext |
Deprecated
Cleanup the transaction context.
|
endTransaction |
Deprecated
When a transaction block in Ballerina code ends, it will call this function to end a transaction.
|
getAndClearFailure |
Deprecated
Get and Cleanup the failure.
|
getCurrentTransactionId |
Deprecated
Get the current transaction id.
|
rollbackTransaction |
Deprecated
Rollback the transaction.
|
setTransactionContext |
Deprecated
Set the transactionContext.
|
beginTransaction
(string? transactionId, string transactionBlockId, string registerAtUrl, string coordinationType)
returns TransactionContext | errorParameters
- transactionId string?
-
Globally unique transaction ID. If this is a new transaction which is initiated, then this will be null. If this is a participant in an existing transaction, then it will have a value.
- transactionBlockId string
-
ID of the transaction block. Each transaction block in a process has a unique ID.
- registerAtUrl string
-
The URL of the initiator
- coordinationType string
-
Coordination type of this transaction
-
Return Type
(TransactionContext | error) Newly created/existing TransactionContext for this transaction.
Parameters
- transactionBlockId string
-
ID of the transaction block.
Parameters
- transactionId string
-
Globally unique transaction ID.
- transactionBlockId string
-
ID of the transaction block. Each transaction block in a process has a unique ID.
-
Return Type
(string | error) A string or an error representing the transaction end succcess status or failure respectively.
-
Return Type
(boolean) is failed.
oncommit
or onabort
functions registered for a transaction can retrieve that state using the
transaction that is passed in to those functions.
-
Return Type
(string) A string representing the ID of the current transaction.
Parameters
- transactionBlockId string
-
ID of the transaction block.
- err error? (default <error?> ())
-
The cause of the rollback.
Parameters
- transactionContext TransactionContext
-
Transaction context.
- prevAttempt Info? (default <ballerina/transactions:0.5.0:Info?> ())
-
Information related to previous attempt.