Merged 5.2.N (5.2.1) to HEAD (5.2)

127287 cturlica: 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/HEAD/root@127877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-06 09:22:05 +00:00
parent 2fe43c3c6b
commit 620e24ef29
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();
}