transactionResult property

String? get transactionResult

Gets or sets the name of the transaction to be committed by #stopTransaction

If null, the transaction will be rolled back.

If this is non-null at the time of a call to #stopTransaction, it calls Diagram#commitTransaction with this transaction name; if this is null at that time, it calls Diagram#rollbackTransaction.

The default value is null; #startTransaction will also set this to null. Because a value of null when #stopTransaction is called will rollback the transaction, it is important that your code sets this property to a non-null value when it thinks it has succeeded.

This property exists so that no matter what execution path occurs to end the usage of a tool, any ongoing transaction can be properly committed or rolled-back. Many tools call #startTransaction and #stopTransaction; thus they set this property for their transaction to be committed. #doCancel also sets this property to null.

Implementation

_i2.String? get transactionResult => _i4.getProperty(
      this,
      'transactionResult',
    );
set transactionResult (String? value)

Implementation

set transactionResult(_i2.String? value) {
  _i4.setProperty(
    this,
    'transactionResult',
    value ?? _i5.undefined,
  );
}