Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)

127262 arebegea: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
      127234 cpopa: MNT-16063 : Activiti workflows without userTask does not work
         - Prevent tasks retrieval from finished executions


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127287 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Cristian Turlica
2016-05-20 13:17:01 +00:00
parent 0cd4e43ec5
commit 7992f174cf
4 changed files with 69 additions and 26 deletions

View File

@@ -100,7 +100,9 @@ public class WorkflowBuilder
NodeRef packageRef = packageMgr.create(packageNode);
params.put(WorkflowModel.ASSOC_PACKAGE, packageRef);
WorkflowPath path = workflowService.startWorkflow(definition.getId(), params);
signalStartTask(path);
if (path.isActive()){
signalStartTask(path);
}
return path.getInstance();
}