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

Link Party feature stop the EECA rules globally

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 18.12, Release Branch 17.12, Trunk, Upcoming Branch
    • 22.01.01
    • None
    • None

    Description

      In the Link Party Feature(partymgr > profile > Link Party) there is a code that stops EECA rules globally in the system and as a result it caused major issues in the process which are driven from EECA's.

      PartyServices.java

      public static Map<String, Object> linkParty(DispatchContext dctx, Map<String, ? extends Object> context) {
          Delegator delegator = dctx.getDelegator();
          Locale locale = (Locale) context.get("locale");
          delegator.setEntityEcaHandler(null);
      .
      .
      .
      } 

       
      In the above code you can see that we are updating EntityEcaHandler on delegator object to null.  

      GenericDelegator.java

      protected void evalRules(String event, String currentOperation, GenericEntity value, boolean isError) throws GenericEntityException {
          if (entityEcaHandler == null) {
              return;
          }
          entityEcaHandler.evalRules(currentOperation, eventMap, event, value, isError);
      } 

      On any DB operation(find, create and store) using delegator above method run and due to null EntityEcaHandler object it won't execute any EECA's globally in the system

      Attachments

        1. image-2021-12-01-17-18-37-279.png
          152 kB
          Rohit Koushal
        2. image-2021-12-01-17-20-21-196.png
          464 kB
          Rohit Koushal
        3. OFBIZ-12424.patch
          2 kB
          Jacques Le Roux
        4. image-2021-12-01-18-18-40-267.png
          119 kB
          Rohit Koushal
        5. OFBIZ-12424_v1.patch
          2 kB
          Rohit Koushal

        Activity

          People

            rohit.koushal Rohit Koushal
            rohit.koushal Rohit Koushal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: