Hi Yong,
Transaction variable would reside in the transaction and can be referenced from parent transaction if it's nested.
For your case, you can write value in persistent MDO and utilize the same while executing another trx. This way even the implementation would be simpler.
Thanks,
Swaroop