Example: lr_set_transaction_instance_status

In the following example,the transaction instance "withdraw" measures the time it takes to perform a withdrawal from a bank server. When the server API call bank_withdraw() is completed, it returns a value to the statusvariable and the transaction instance is complete.

If the withdrawal fails, then lr_set_transaction_instance_status changes the default status for the transaction to LR_FAIL. The LR_FAIL status is automatically assigned to the LR_AUTO flag in the lr_end_transaction_instance statement because it uses the LR_AUTO flag.