Event Handlers often depend on checking 'dirty' field values for pre-commit modifications. Having a selector to specify which dirty fields to check would be extremely helpful.
Presales already do it using either an EL expression (like Document.doc.getProperty("xpath").isDirty()) or inside a JS automation (input.doc.getProperty("xpath").isDirty()).
Having Studio generating this would help a lot: Type ahead for the XPATHs so you don't make typos, typically, but a list (a choice, kind like when selecting fields in a PP) could be ok.
- A new activation filter is added in the event handlers screen
- only active if the "before document modification" is selected, disabled otherwise
- Placed below "Current document is"
- Named "Current document properties have changed"
- Contextual help says
Activated only if the value of at least one of the selected properties has changed. It only works with the "before document modification" event. Equivalent to using a custom EL expression such as: Document.doc.getProperty("xpath").isDirty().
- The experience to select / add fields is similar to the page provider screen "default sort" option, without the sort criteria (see attached video).
- As a Studio dev, I can select one or several document properties to map it to
- For complex properties, I can only select the "root" property, not one of its sub-properties (not supported by Nuxeo Server)
- If the event mentioned above is part of the selection
- The event handler is triggered if any of the selected document properties are dirty
- Otherwise the condition is not added to the event handler generated during build
- Available only for TP 9.10 and above