Copy Variables State
Copies a constant or the value of a source variable to a session variable.
Source – the source from which to copy. If source is the name of a session variable, select the check box. Otherwise, the application assumes the value of source is a constant.
Destination – name of the destination session variable. If the session variable does not already exist, it is created.
Follow-up State – OK
Successfully copied the source to the destination variable.
Follow-up State – Fail
Failed to copy the source to the destination variable, usually because the source variable does not exist.
Follow-up State – Dynamic
This example copies the value of the session variable CUST_BALANCE into the session variable PRE_REMIT_BALANCE.
- If you specify a value surrounded by parentheses in the Expression field for a follow-up state, and specify the session variable name in the Assign To field.
- If a state returns values, they are copied to session variables, so they are accessible by follow-up states.
In the sample application below, the customer balance is retrieved twice, before and after calling the transaction. The customer balance is stored in a session variable called Balance. To prevent overwriting the pretransaction balance with the posttransaction balance, the application copies the pre-transaction balance into another session variable before calling Get New Balance. If Copy Customer Balance fails, Get Customer Balance is called again.