cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to have default workflows in custom document types?

Bauke_Roo
Star Contributor
Star Contributor

Hi,

I've created two custom document types using studio. But the default workflows (parallel and serial review) are not available. Is there a way to make these available on my custom workflows?

Thanks, Bauke Roo

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

Yes it’s possible to have the two default workflows on your custom document type. To do so, you need to override the default filters for these workflows, and include your custom type. If you are using Nuxeo Studio add them in the XML Extensions menu. Here is the example for the default Serial workflow:

<require>studio.extensions.nuxeo-routing-default</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="filters">
  <filter id="filter@wf@SerialDocumentReview" append="true">
    <rule grant="true">
      <permission>ReadWrite</permission>
      <type>CUSTOM DOC ID</type>
      <condition>#{!currentDocument.locked}</condition>
    </rule>
  </filter>
</extension>

and for the default Parallel workflow:

<require>studio.extensions.nuxeo-routing-default</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="filters">
  <filter id="filter@wf@ParallelDocumentReview" append="true">
    <rule grant="true">
      <permission>ReadWrite</permission>
      <type>CUSTOM DOC ID</type>
      <condition>#{!currentDocument.locked}</condition>
    </rule>
</extension>

For more information about Workflows, don’t hesitate to have a look at our documentation.

Thanks,

View answer in original post

3 REPLIES 3

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

Yes it’s possible to have the two default workflows on your custom document type. To do so, you need to override the default filters for these workflows, and include your custom type. If you are using Nuxeo Studio add them in the XML Extensions menu. Here is the example for the default Serial workflow:

<require>studio.extensions.nuxeo-routing-default</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="filters">
  <filter id="filter@wf@SerialDocumentReview" append="true">
    <rule grant="true">
      <permission>ReadWrite</permission>
      <type>CUSTOM DOC ID</type>
      <condition>#{!currentDocument.locked}</condition>
    </rule>
  </filter>
</extension>

and for the default Parallel workflow:

<require>studio.extensions.nuxeo-routing-default</require>
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="filters">
  <filter id="filter@wf@ParallelDocumentReview" append="true">
    <rule grant="true">
      <permission>ReadWrite</permission>
      <type>CUSTOM DOC ID</type>
      <condition>#{!currentDocument.locked}</condition>
    </rule>
</extension>

For more information about Workflows, don’t hesitate to have a look at our documentation.

Thanks,

Perfect Thanks!

Thank you