cuba-platform / bpm

Business Process Management Addon
https://www.cuba-platform.com/
Apache License 2.0
43 stars 23 forks source link

Process Instances remain Active if they do not have user tasks #17

Closed haulmont-git closed 5 years ago

haulmont-git commented 7 years ago

ProcessRuntimeManagerBean:93

ProcessInstance activitiProcessInstance = runtimeService.startProcessInstanceById(procInstance.getProcDefinition().getActId(), variables);

procInstance.setActProcessInstanceId(activitiProcessInstance.getProcessInstanceId());
procInstance.setStartComment(comment);
procInstance.setActive(true);
procInstance.setStartDate(timeSource.currentTimestamp());
procInstance.setStartedBy(userSessionSource.getUserSession().getCurrentOrSubstitutedUser());
procInstance = em.merge(procInstance);

In fact, after runtimeService.startProcessInstanceById call process is already completed, but here we rewrite active flag and other variables.


Original issue: https://youtrack.haulmont.com/issue/PL-9292

haulmont-git commented 5 years ago

Git changesets by gorbunkov:

a32f66e1 in master - Process Instances remain Active if they do not have user tasks #17