cancel
Showing results for 
Search instead for 
Did you mean: 

why? Nuxeo doesn't show workflow tab when type document is Folderish

geekonspace
Star Contributor
Star Contributor

Nuxeo doesn't show workflow tab when type document is Folderish. I need show this tab in my case

1 ACCEPTED ANSWER

Wojciech_Sulejm
Star Contributor
Star Contributor

Workflow is enabled by default only on two document types: File and Note. This does not mean however that it cannot be enabled for other document types.

To enable the workflow on other document types please use these instructions: Enable workflow on your document type

Please note that Folderish refers to a facet, not a document type, and the procedure in the link above provides workflow association with document types.

Now when the workflow is enabled you can activate/display the "Workflow" tab on your "Folderish" documents:

<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
  <action id="TAB_CONTENT_JBPM" link="/incl/tabs/document_process.xhtml"
     enabled="true" label="action.view.review" icon="/icons/file.gif"
     order="60">
     <category>VIEW_ACTION_LIST</category>
    <filter id="jbpm-process" append="true">
      <rule grant="true">
	<facet>Folderish</facet>

Afterwards you'll need to associate specific workflows to be available for the required document types (please note I'm listing here document types, not facets - this is because the default JbpmService filter operates on types - however you still could rewrite the default filter):

<extension target="org.nuxeo.ecm.platform.jbpm.core.JbpmService"
   point="typeFilter">
   <type name="Folder">
     <processDefinition>review_parallel</processDefinition>
   </type>
<type>
...

The last important thing to do is to provide the "require" clause to make sure your workflow/tab definitions are not overridden by those defined in another extension.

View answer in original post

4 REPLIES 4

Wojciech_Sulejm
Star Contributor
Star Contributor

Workflow is enabled by default only on two document types: File and Note. This does not mean however that it cannot be enabled for other document types.

To enable the workflow on other document types please use these instructions: Enable workflow on your document type

Please note that Folderish refers to a facet, not a document type, and the procedure in the link above provides workflow association with document types.

Now when the workflow is enabled you can activate/display the "Workflow" tab on your "Folderish" documents:

<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
  <action id="TAB_CONTENT_JBPM" link="/incl/tabs/document_process.xhtml"
     enabled="true" label="action.view.review" icon="/icons/file.gif"
     order="60">
     <category>VIEW_ACTION_LIST</category>
    <filter id="jbpm-process" append="true">
      <rule grant="true">
	<facet>Folderish</facet>

Afterwards you'll need to associate specific workflows to be available for the required document types (please note I'm listing here document types, not facets - this is because the default JbpmService filter operates on types - however you still could rewrite the default filter):

<extension target="org.nuxeo.ecm.platform.jbpm.core.JbpmService"
   point="typeFilter">
   <type name="Folder">
     <processDefinition>review_parallel</processDefinition>
   </type>
<type>
...

The last important thing to do is to provide the "require" clause to make sure your workflow/tab definitions are not overridden by those defined in another extension.

Indeed, that piece of documentation specifies only how to activate a workflow on a document type but does not add the tab to the ui. (because of the way this tool works, let me just modify my answer to include the missing information)

you don't need to override the action, overriding the filter definition is enough

you're right