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

Fix value of node variables used in automation chains called in workflows when values are entered in 'Process' fancy box of 'TASKS DASHBOARD'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.10, 9.3, 9.10-SNAPSHOT
    • Fix Version/s: 8.10-HF23, 9.10-HF01, 10.1
    • Component/s: Workflow
    • Release Notes Summary:
      All workflow and node variables are correctly resolved to be used in Automation chains
    • Backlog priority:
      700
    • Sprint:
      nxcore 10.1.1, nxcore 10.1.2
    • Story Points:
      5

      Description

      When manipulating multiple tasks using the TASKS DASHBOARD as describied in Nuxeo documentation How to Set Up a Tasks Dashboard, node variables' value entered in Process fancy box have null values in automation chains called from node transitions or called as a node's output automation chain.

      How to reproduce:

      Configuration

      Studio

      Import external template Default Nuxeo Platform Workflows Configuration in the Studio project.

      Table layout

      • create a new *table layout named NXP-XXXXX_tasks with the following columns:
        • select Process Id widget from schema task
        • select Target document Id widget from schema task
        • select Actors widget from schema task
        • select Initiator widget from schema task
        • select Due Date widget from schema task
        • select Created widget from schema dublincore
        • select Lifecycle state widget from Built-in Widgets

      Content views

      • create a new content view named NXP-XXXXX_chooseParticipants with:
        • Query filter nt:type = 'Task38e' AND ecm:currentLifeCycleState != 'ended'
        • select table layout NXP-XXXXX_tasks for Reference an existing table layout in tab Results
      • create a new content view named NXP-XXXXX_validate with:
        • Query filter nt:type = 'Task6d8' AND ecm:currentLifeCycleState != 'ended' AND ecm:currentLifeCycleState != 'cancelled'
        • select table layout NXP-XXXXX_tasks for Reference an existing table layout in tab Results

      XML extension

      Define the Task dashboard's tabs and subtabs, sub-tabs' action ID MUST match content views' name:

      <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
        
        <action id="workflow_dashboard" link="view_workflow" label="Tasks Dashboard" order="30" enabled="true">
          <category>MAIN_TABS</category>
        </action>
      
          <action id="NXP-XXXXX_dashboard" link="/incl/tabs/workflow_dashboard_tab.xhtml" label="NXP-XXXXX Tasks" order="10">
              <category>WORKFLOW_DASHBOARD</category>
          </action>
        
          <action id="NXP-XXXXX_chooseParticipants" link="/incl/tabs/workflow_dashboard_sub_tab.xhtml" label="Choose Participants" order="10">
              <category>NXP-XXXXX_dashboard_sub_tab</category>
          </action>
        
          <action id="NXP-XXXXX_validate" link="/incl/tabs/workflow_dashboard_sub_tab.xhtml" label="Validate" order="10">
              <category>NXP-XXXXX_dashboard_sub_tab</category>
          </action>
      
      </extension>
      

      Reproduction

      • Deploy Studio project in a Nuxeo 8.10. You can use the following docker-compose file:
        version: '2'
        
        services:
          nuxeo:
            image: nuxeo:8.10
            environment:
              - TZ=US/Pacific
              - NUXEO_CLID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
              - NUXEO_DEV_MODE=true
              - NUXEO_INSTALL_HOTFIX=true
              - NUXEO_PACKAGES=nuxeo-jsf-ui nuxeo-diff YOUR_STUDIO_PROJECT_HERE-0.0.0-SNAPSHOT
              - NUXEO_CUSTOM_PARAM=org.nuxeo.automation.trace=true\n#JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
            ports:
              - "8080:8080"
              - "8787:8787"
        

        Replace YOUR_STUDIO_PROJECT_HERE with the name of your Studio project, set a proper NUXEO_CLID environment variable. Command docker-compose up to start container, docker-compose down to stop it.

      • Create a new Workspace
      • in the new Workspace, create 2 File document
      • start a Serial document review workflow on each 2 File documents
      • navigate to main tab TASKS DASHBOARD
      • in sub-tab Chosse participants select the 2 tasks
      • click Process button, a fancy box opens, enter Administrator as participant and my comment 1 as comment
      • click Start the review button
      • navigate to History tab of both File documents and you will see an entry (Performed Action Workflow task completed) with comment my comment 1
      • navigate to main tab TASKS DASHBOARD
      • in sub-tab Validate select the 2 tasks
      • click Process button, a fancy box opens, enter Administrator as participant and my comment 2 as comment
      • click Validate button
      • navigate to History tab of both File documents and you will see an entry (Performed Action Workflow task completed) with an empty comment and an entry (Performed Action Document validated) with Administrator chain.document.validated the document with the following comment: null as comment, null is supposed to be my comment 2

      In logs, automation traces shows that node variables entered in the fancy box (i.e. comment) are null in context variables displayed for automations chains (i.e. nextAssignee) called from a workflow (i.e. transition automation chains, node output automation chains).

      These null values for node variables does not happen when tasks are completed individually in the File documents' Workflow tab.

      I suspect a problem in class RoutingTaskActionsBean, see method GetTaskActions(String), getTaskActionsMap(Task) or endTasks(String, Action) called in XHTML template incl/workflow_content_view.xhtml.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour
                  2d 1h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.