Share this page

# lr_get_trans_instance_status

Returns the current status of a transaction instance.

    int lr_get_trans_instance_status( long transaction_handle ) ;

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
transaction_handle | The name of the transaction.

lr_get_trans_instance_status returns the current status of a transaction instance. lr_get_trans_instance_status cannot be invoked after lr_end_transaction_instance. It cannot report the final transaction instance status.

The transaction_handle is the handle returned by the call to lr_start_transaction_instance that created the instance.

This function can be useful when a transaction instance, which is made up of a number of steps, can fail at various points of its execution. By checking the status and terminating the Vuser, you can prevent unnecessary activity.

## Return Values

Returns the transaction instance status or a negative number on error. See Transaction Status

## Parameterization

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

## Example

The following example preempts calls to the web server that will probably fail, by checking the transaction instance status along the way.

Copy code

    long trans_handle;
    trans_handle = lr_start_transaction_instance("Web-tours", 0);
    web_url("home;sz=234x60;tile=1;ord=977672495775323400",
        "URL=http://ad.doubleclick.net/...ord=977672495775323400",
        ..
        "Mode=URL",
        LAST );

    if (lr_get_trans_instance_status(trans_handle) == LR_FAIL) {
         /* web_url has failed the transaction. No point in continuing,
        because future calls will probably fail. */
    lr_end_transaction_instance(trans_handle, LR_FAIL);
    return;<
    }
    /* Continue with the transaction instance */
    web_reg_save_param("WCSParam_Diff1", LB=http://", "RB=/", "Ord=17", "Search=body", LAST );

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: