mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
12982: Merged V3.0 to V3.1 12921: Merged V2.2 to V3.0 12524: Fix ETWOTWO-974: Submit Action Queue (...) 12687: Add missing workflow to bootstrap (follow on from 12524) ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.0:r12921 Merged /alfresco/BRANCHES/V2.2:r12524,12687 Merged /alfresco/BRANCHES/V3.1:r12982 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13545 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -182,7 +182,6 @@ public class WebProject implements Serializable
|
||||
|
||||
private final NodeRef nodeRef;
|
||||
private String storeId = null;
|
||||
private Boolean hasWorkflow = null;
|
||||
|
||||
public WebProject(final NodeRef nodeRef)
|
||||
{
|
||||
@@ -339,27 +338,9 @@ public class WebProject implements Serializable
|
||||
*/
|
||||
public boolean hasWorkflow()
|
||||
{
|
||||
if (this.hasWorkflow == null)
|
||||
{
|
||||
final NodeService nodeService = this.getServiceRegistry().getNodeService();
|
||||
List<ChildAssociationRef> webWorkflowRefs = nodeService.getChildAssocs(
|
||||
this.nodeRef, WCMAppModel.ASSOC_WEBWORKFLOWDEFAULTS, RegexQNamePattern.MATCH_ALL);
|
||||
this.hasWorkflow = (webWorkflowRefs.size() != 0);
|
||||
if (!this.hasWorkflow)
|
||||
{
|
||||
// might have a workflow assigned to one of the forms used in the website
|
||||
Map<String, Form> forms = getFormsImpl();
|
||||
for (Form form : forms.values())
|
||||
{
|
||||
if (form.getDefaultWorkflow() != null)
|
||||
{
|
||||
this.hasWorkflow = Boolean.TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.hasWorkflow.booleanValue();
|
||||
// note: there's always a submit workflow, as direct to staging is now
|
||||
// also routed via workflow
|
||||
return true;
|
||||
}
|
||||
|
||||
private Map<String, Form> getFormsImpl()
|
||||
|
Reference in New Issue
Block a user