Deep copy of Camunda Delegate Execution

Hello,

I’m using Camunda Version 7.15 and I’m trying to get a deep copy of delegate execution object.
Namely, I want to create a snapshot of delegate execution object provided by Spring Event Bridge in order to avoid mutations caused by Camunda during the processing of the spring event.

There have been cases where I query data from the process engine execution but the instance has already been closed, resulting to NPEs in my app - hence the deep copy idea.

I’m open to suggestions since this problem has been troubling me for quite some time.
Thank you!

Any ideas? I’ve hit a wall with this one and I’m pretty desperate tbh :\