Uploaded image for project: 'Alfresco One Platform'
  1. Alfresco One Platform
  2. ACE-2560

Tracked Properties and Aspects are not synced at create

    Details

    • Epic Link:
    • Sprint:
      Platform Team Sprint 11 (Dev)
    • Cloud or Enterprise:
      Cloud and Enterprise

      Description

      When syncing content between cloud and enterprise (and vice-versa) the only properties tracked are cm:name and cm:locale. All other properties and aspects in the propertiesToTrack and aspectsToTrack lists are ignored during create on the target because the node is not part of a syncSetDefinition.

      This is caused by

         if(dynamicAspectsToTrack.contains(aspectTypeQName) &&  isNodeRefPartOfSync(nodeRef))
         {
                 syncAuditService.recordAspectAdded(nodeRef, aspectTypeQName);
         }
      

      and

         if(dynamicAspectsToTrack.contains(aspectTypeQName) &&  isNodeRefPartOfSync(nodeRef))
         {
                 syncAuditService.recordAspectAdded(nodeRef, aspectTypeQName);
         }
      

      The isNodeRefPartOfSync(nodeRef) will always return false when called during create because the node is not added to the SSD until after the properties and aspects are pulled from the remote node.

      Out of the box example: Exif

      If an image is added to a synced folder in cloud the exif metadata is extracted on cloud, but even though the exif aspect and its properties are set to be tracked none of the properties are actually copied from cloud to enterprise. When the node arrives at the enterprise server the metadata extractor kicks off extracting the metadata. (Some may argue that this is a good thing as it reduces the sync set size and I would agree ... in this case.)

      If you add a model to the list to be tracked and add content to a tracked folder that uses that model the metadata will not be synced. Interesting to this is that the new cloud custom content model feature is not affected by this. If I add a custom content model to enterprise and cloud and then add content (via salesforce) the property from the custom content model is synced, but the properties from the tracked models are not synced.

      Expected result: All properties and aspects listed in the propertiesToTrack and aspectsToTrack would be synced during create.

      Aspects and properties can be add from an Amp to the lists using a format like the following:

      Namespaces should be added at the root beans element

      <beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:context="http://www.springframework.org/schema/context"
          xmlns:tx="http://www.springframework.org/schema/tx"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
                                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
                                 http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
      

      A bean is used to list the aspects and properties with a merge attribute set to true

          <bean id="salesforceSyncModels" parent="syncChangeMonitor">
              <property name="propertiesToTrack">
                  <list merge="true">
                      <value>attach:attachment.*</value>
                      <value>crm:accountRelated.*</value>
                      <value>crm:opportunityRelated.*</value>
                      <value>crm:contractRelated.*</value>
                      <value>crm:caseRelated.*</value>
                      <value>dct:documentType.*</value>
                  </list>
              </property>
              <property name="aspectsToTrack">
                  <list merge="true">
                      <value>attach:attachment</value>
                      <value>crm:accountRelated</value>
                      <value>crm:opportunityRelated</value>
                      <value>crm:contractRelated</value>
                      <value>crm:caseRelated</value>
                      <value>dct:documentType</value>
                  </list>
              </property>
          </bean>
      

        Attachments

        1. cstest-cloud.txt
          37 kB
        2. HEAD-Enterprise-onPrem.txt
          12 kB
        3. HEAD-HSTEST-cloud.txt
          40 kB
        4. local.txt
          4 kB

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                jottley Jared Ottley
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel