Share this page

# lr_end_cross_vuser_transaction

Marks the completion in this vuser of a transaction started by a different vuser.

    int lr_end_cross_vuser_transaction( char *transaction_name, char *trans_id_param, int status);

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
transaction_name | The name of the cross-Vuser transaction.
trans_id_param | The parameter that contains the string ID of the transaction. The value of the parameter must be identical to the value of the transaction_id_param that the vuser initiating the transaction used in lr_start_cross_vuser_transaction.
status | The transaction completion status to report. One of: LR_PASS LR_FAIL LR_AUTO LR_ABORT LR_STOP LR_TIMED_OUT LR_USER_DEFINED

Invoke lr_end_cross_vuser_transaction to indicate that an action initiated by another Vuser is finished from the point of view of this Vuser. For example, a message sent from another Vuser was received or not by this Vuser. The initiating vuser invokes lr_start_cross_vuser_transaction to start a transaction for the action. This Vuser invokes lr_end_cross_vuser_transaction to indicate the end of the transaction.

This function does not detect any events. Your script logic determines when the transaction ends and what the status is; and then calls lr_end_cross_vuser_transaction.

If the initiating the user performed a broadcast activity to several recipients, each of the recipient vusers must call lr_end_cross_vuser_transaction.

If the transaction ID identifier parameter value is longer than 16 bytes, or contains a null character (0x00), the value is replaced with the equivalent MD5 hash value.

lr_end_cross_vuser_transaction is not recorded. You can add it to the script manually.

## Return Values

This function returns zero on success, -1 on failure, TRANSACTION_MSGS_EMPTY_START_TRANSACTION_STRING if the transaction name is not specified, or TRANSACTION_MSGS_EMPTY_IDENTIFIER_DATA if transaction_id_param is empty.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

The following example illustrates the ending of several cross transactions.

Copy code

    lr_think_time(30);
    lr_end_cross_vuser_transaction("cross_trans_1", "{CVTIdentify}", LR_AUTO);
    lr_end_cross_vuser_transaction("cross_trans_2", "{CVTIdentify}", LR_AUTO);
    lr_end_cross_vuser_transaction("cross_trans_end_only", "{CVTIdentify}", LR_AUTO);
    lr_end_cross_vuser_transaction("error_trans", "{CVTIdentify}", LR_FAIL);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: