lr.setTransactionStatus

Sets the default end status of open transactions.

Example: TransactionsTransaction Functions

Syntax

lr.setTransactionStatus ( status );

Arguments

ArgumentComments
status One of the Transaction Status constants for pass, fail, or stop. The auto status is not applicable.

The lr.setTransactionStatus function sets the status of those transactions currently open which have LR_AUTO in their lr.endTransaction statement.

A transaction's status is defined in the status parameter of lr.endTransaction. If this status is LR_AUTO, the value is automatically assigned. By default, this value is LR_PASS, signifying a successful transaction. lr.setTransactionStatus changes this default value to status.

Return Values

Not applicable

Parameterization

Parameterization is not applicable to this function.

Example

    lr.startTransaction("t2");
    lr.startTransaction("t1");
    ....
    lr.setTransactionStatus(lr.FAIL);
    ....
    lr.endTransaction("t1", lr.AUTO);
    lr.endTransaction("t2", lr.PASS);