Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-21475

REST API /nodes/{noderef}/children does not fire OnCreateChildAssociationRuleTrigger so folder rule is not run.

    Details

    • ACT Numbers:

      01005566

      Description

      Problem Description:
       
      When calling the POST /nodes/{noderef}/children REST API to create new content in a folder, the OnCreateChildAssociationRuleTrigger is not fired even though the content is created in the target folder and there is an association created between the folder and the content.
       
      If using the POST /nodes/{noderef}/move REST API to move content into the target folder, the OnCreateChildAssociationRuleTrigger is fired and the expected Rule is fired.

      Steps to Reproduce:
       
      1/. Install OOTB ACS v5.2.6.2
      2/. As 'admin' create a site 'Rules-Site', add 2 folders 'RulesTest' and 'Testfiles'.
      3/. Create a new text document in 'testfiles' called 'testdoc'.
      4/. Create a new Rule on the 'RulesTest' folder called 'Rule1'.
      Description:
       - Active (yes)
       - Run in background (no)
       - Rule applied to subfolders (no)
      When: Items are created or enter this folder
      If all criteria are met: All Items
      Perform Action: Add 'Geographic' aspect
      5/. Capture noderefs for testing:
       - testdoc: b6e59fe0-b5e1-4efa-92fe-28b110695ac3
       - Rulestest: 461d9b6c-352a-4c6b-8848-a532b4bf70bb
      6/. Call the REST API:
       

      http://host:port/alfresco/api/-default-/public/alfresco/versions/1/nodes/461d9b6c-352a-4c6b-8848-a532b4bf70bb/children?include=properties 
      
      { 
      "name": "1111111111111", 
      "nodeType": "cm:content" 
      }

       
      7/. Call the REST API:
       

      http://host:port/alfresco/api/-default-/public/alfresco/versions/1/nodes/b6e59fe0-b5e1-4efa-92fe-28b110695ac3/move?include=properties 
      
      { 
      "targetParentId": "461d9b6c-352a-4c6b-8848-a532b4b" 
      }

       
      Observed Behaviour:
       
      There are 2 documents in RulesTest - 'testdoc' and '1111111111111'.  'testdoc' has the Geographic Aspect applied but '1111111111111' does not.
       
      Expected Behaviour:
      There are 2 documents in RulesTest.  The Geographic aspect should be applied to both documents per the Folder Rule.
       
       

        Attachments

          Structure

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pbateman Paul Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel