Hi
I Need Open Hibernate Session in one Service Task and close it in end of process. So how can i do this? Can I Set the session As a Process Variable in first "Service Task" and get it in second "Service Task" ? Something like this
public class ServiceTask1 implements JavaDelegate
{
@Override
public void execute(DelegateExecution arg0) throws Exception
{
….
arg0.setVariable("myVar", session);
…
}
}
———————————————————————————-
public class ServiceTask2 implements JavaDelegate
{
@Override
public void execute(DelegateExecution arg0) throws Exception
{
….
((Session)arg0.getVariable("myVar")).close();
…
}
}
Best Regards