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.1.N/root@127262 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2016-05-19 15:05:12 +00:00
parent d75e264fee
commit 4dcd2ce286
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();
}