Here, you should add the following line:

`Compoundable store = transaction != null ? transactions.get(transaction) : engine`