Entity Transaction Accessor API (DEPRECATED)
The com.intalio.core.data.api.EntityTransactionAccessor class, which is used to access the current entity transaction, was deprecated in the Max 22.1 release (April 10, 2022). If you accessed this API in your source code, follow the steps below to replace your previous API calls with Max APIs.
To migrate deprecated entity transaction accessor code:
1. Remove the com.intalio.core.data.api.EntityTransactionAccessor class from your source code if applicable.
2. If you need to access the EntityTransactionAccessor.getCurrentTransaction().putContextParameter(String key, Object value) API in your source code, import the com.servicemax.core.Max class:
import com.servicemax.core.Max
3. After you import the com.servicemax.core.Max class, replace EntityTransactionAccessor.getCurrentTransaction().putContextParameter with Max.putContextParameter(), for example:
◦ Deprecated Code
EntityTransactionAccessor.getCurrentTransaction().putContextParameter('para_name', 'para_value')
◦ Replacement Code
Max.putContextParameter('para_name', 'para_value')
4. If you also accessed the EntityTransactionAccessor.currentTransaction.createEntityManager API in your source code, replace it with Max.createEntityManager(), for example:
◦ Deprecated Code
def apptEntityManager = EntityTransactionAccessor.currentTransaction.createEntityManager('svmx_appointment')
◦ Replacement Code
def apptEntityManager = Max.createEntityManager('svmx_appointment')
For more information: