Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27339

Workflows activated for 'Mutable' documents do not show on Folders

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Workflow

      Description

      Create a new workflow e.g. "wf1". On 'Activation' tab in Studio Modeler, include 'Folder" in 'Current document has one of the types', and select "Current document is 'Mutable Document'". Save and hot reload. View JSON output e.g.

      /nuxeo/site/api/v1/id/422fe222-a601-407d-aebb-9190c9bce22d?enrichers.document=runnableWorkflows

      Expected result: list of runnable workflows should include the new "wf1".

      Actual result: list of runnable workflows does not include "wf1"

      According to http://community.nuxeo.com/api/nuxeo/10.10/javadoc/org/nuxeo/ecm/core/api/DocumentModel.html#isImmutable-- a document `isImmutable` if it is `a version or a proxy to a version, false otherwise`. By changing the activation filter above from "Current document is 'Mutable Document'" to "Current document is 'Any'", the workflow is then returned in the list of runnable workflows for a Folder. Hence it appears that Folders are being treated as "Immutable" in this context, which in fact they are not. (Note that Folders have "isVersion": false, "isProxy": false in the JSON output, thus do not qualify as Immutable by above definition.)

      Workaround:

      Change the activation "Custom EL expression" from (e.g. for ParallelDocumentReview):

      #{!currentDocument.locked and currentDocument.currentLifeCycleState != 'approved' and !currentDocument.trashed}

      to:

      #{!currentDocument.locked and currentDocument.currentLifeCycleState != 'approved' and !currentDocument.trashed and !currentDocument.immutable}

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: