Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-7506

Cannot read before/after args with onUpdateProperties behaviour

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.c Community
    • Fix Version/s: None
    • Component/s: Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      Windows XP, v3.4c
    • Testcase ID:
      Hide

      Behaviour is set on the update of a calendarevent. Create new calendarevent. Then update the properties of the event using Share calendar. Expect that args(1)(2) contain before and after maps of properties.

      Show
      Behaviour is set on the update of a calendarevent. Create new calendarevent. Then update the properties of the event using Share calendar. Expect that args(1)(2) contain before and after maps of properties.
    • Resolution Time Custom Field:
      96 weeks, 2 days, 23 hours, 50 minutes, 26 seconds

      Description

      I've created a simple behaviour on the onUpdateProperties policy using Javascript. args(1) and args(2) always return a null value – these are the before and after image of the properties. behaviour.args(0) is returning the proper result. I found one forum user with the same issue: http://forums.alfresco.com/en/viewtopic.php?f=4&t=20776

      Expecting that args(1)(2) return a map of the node properties, before and after modification.

      <bean id="onCreateCalendarEventNode"
      class="org.alfresco.repo.policy.registration.ClassPolicyRegistration"
      parent="policyRegistration">
      <property name="policyName">
      <value>

      {http://www.alfresco.org}

      onUpdateProperties</value>
      </property>
      <property name="className">
      <value>

      {http://www.alfresco.org/model/calendar}

      calendarEvent</value>
      </property>
      <property name="behaviour">
      <bean class="org.alfresco.repo.jscript.ScriptBehaviour"
      parent="scriptBehaviour">
      <property name="location">
      <bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
      <constructor-arg>
      <value>alfresco/extension/scripts/onCalendarEventUpdate.js</value>
      </constructor-arg>
      </bean>
      </property>
      </bean>
      </property>
      </bean>

      Can't read before/after args with onUpdateProperties behavior . args are null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                stevegreenbaum Steve Greenbaum
              • Votes:
                4 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: