Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-3847

Entity ECAs not triggered correctly when using Delegator.storeAll() method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Release Branch 10.04
    • Fix Version/s: 17.12.01
    • Component/s: framework
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      The conditions don't work when updating (not creating) entities using the Delegator.storeAll() method. E.g. the following condition does not work:

      <eca entity="Product" operation="create-store" event="return">
              <condition field-name="autoCreateKeywords" operator="not-equals" value="N"/>
              <action service="indexProductKeywords" mode="sync" value-attr="productInstance"/>
      </eca>
      

      The indexProductKeywords service is called anyway when the product is updated and the autoCreateKeywords was "N" and stays "N". It works correctly for newly created products.

      The problem is in the method GenericDelegator.storeAll(), where unchanged field values are not passed down to the store() method. The store method calls the ECA engine, which does not receive the unchanged values at all and thus cannot evaluate the EECA conditions correctly.

        Attachments

        1. OFBIZ-3847_Entity-ECAs-not-triggered-correctly.patch
          4 kB
          Jacques Le Roux
        2. OFBIZ-3847_Entity-ECAs-not-triggered-correctly.patch
          4 kB
          Anne Jessel
        3. GenericDelegator.java.diff
          2 kB
          Martin Kreidenweis

          Activity

            People

            • Assignee:
              paulfoxworthy Paul Foxworthy
              Reporter:
              mkreidenweis Martin Kreidenweis
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: