Create and commit transaction after attributes of the template are changed and applied.

Change-Id: I4a1acdadcd1486ddd5dafcfc794c9b3b93e92592