cancel
Showing results for 
Search instead for 
Did you mean: 

Loosing database connections

tomdc
Champ in-the-making
Champ in-the-making
Hi,

I'm using the following code with activiti 5.7 on postgresql

        ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault(). buildProcessEngine();
        TaskService taskService = processEngine.getTaskService();

        taskService.claim(task, user);
        taskService.complete(task , taskMapVariables);

        processEngine.close();

Everytime I execute this code I'm loosing 2 database connections ( select count(*) from pg_stat_activitySmiley Wink
However, when I put the taskService.claim in comments I don't have this problem.

Is this the wrong way to complete a task?

Thanks
1 REPLY 1

falko_menge
Champ in-the-making
Champ in-the-making
No, it's not the wrong way to complete a task.