#Groovy #script #bdm

Unable to retrieve/get persistence id

I need to get the persistence id and save it in a different attribute/property of the BDM. The business variable has been defined in the pool lane so it has a init script in the default value. I tried this but when i checked in the h2 object, id column is still null: The business variable has been used under Instantiation form

import com.model.bdm.MyApps

def myapp= new com.model.bdm.MyApps()
myapp.id = myapp.persistenceId
myapp.name = mayappInput?.name
myapp.address= mayappInput?.address

Notifications