Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24023

AbstractSession.followTransition ignores options parameter

    XMLWordPrintable

    Details

      Description

      In followTransition:
      https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core/src/main/java/org/nuxeo/ecm/core/api/AbstractSession.java#L2077

      The options parameter defined in the method signature:

      private boolean followTransition(DocumentRef docRef, String transition, ScopedMap options)
      

      is not used. Instead new eventOptions variable is instanciated without using options:

              // Construct a map holding meta information about the event.
              Map<String, Serializable> eventOptions = new HashMap<>();
              eventOptions.put(org.nuxeo.ecm.core.api.LifeCycleConstants.TRANSTION_EVENT_OPTION_FROM, formerStateName);
              eventOptions.put(org.nuxeo.ecm.core.api.LifeCycleConstants.TRANSTION_EVENT_OPTION_TO, doc.getLifeCycleState());
              eventOptions.put(org.nuxeo.ecm.core.api.LifeCycleConstants.TRANSTION_EVENT_OPTION_TRANSITION, transition);
      

      This prevents to modify dynamically the product behavior like disabling listeners and/or notifications.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m