We have a Domain object which is set as a process variable. This Domain object has ORM (Object Relationship Mapping) set in jBPM Database and is mapped to DOMAIN table. We set certain status in the domain object on entry script and on exit script of every human task. We need to persist this domain object when the task is completed and entry and exit scripts are executed.
This domain object should also get rollbacked if task completion throws any error.
Any help is appreciated.