-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 7.10, 8.10, 9.3
-
Component/s: Core
-
Release Notes Summary:The options parameter is passed to events when following a transition
-
Sprint:nxcore 10.1.1
-
Story Points:1
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.
- depends on
-
NXP-13860 Allow to pass comment when following a transition
- Resolved