I use a Servicetask to complete some work.
but when the task takes too long time to end,there happened some exception:connection had been closed !
I found that because of transation,so i use a thread to finish the work
I write MyServiceServiceeTask extends TaskActivityBehavior ,such as
@Override
public void signal(ActivityExecution execution, String signalName,
Object signalData) throws Exception {
leave(execution);
}
@Override
public void execute(ActivityExecution execution) throws Exception {
//this is need
execution.getVariables();
Thread t = new AsynRunThread(execution);
t.start();
}
and at the end of thread,I call signal method to leave this task.
there some times happened that task finished but table act_hi_actinst's end_time_ is null
because Thread sometime finished before the Main class(MyServiceServiceeTask)'s transaction end
who encoutered this problem or give me some advices