[OPENIDM-14528] Relationship signal propagation not working for patch operations against singleton relationships Created: 31/Mar/20 Updated: 23/Jul/20 Resolved: 23/Jul/20
|Component/s:||Module - Relationships|
|Affects Version/s:||OpenIDM 6.0.0, 6.5.0, 7.0.0|
|Reporter:||Dirk Hogan||Assignee:||Dirk Hogan|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Sprint:||2020.04 - IDM, 2020.05 - IDM, 2020.06 - IDM, 2020.07 - IDM|
The notifyRelationships configuration can be applied to any managed object field. Its value is an array of relationship fields which should be signaled when the managed object field in question is changed. Any time a managed object is updated, or a signal received, this configuration is consulted to determine whether the signal should be sent/propagated. The configuration includes a JsonPointer of the field in question, and the List of roles to be signaled.
Now consider a patch on the manager field:
oldValue In MOS.propagateVertexStateChange
newValue in MOS.propagateStateChange
(note that the managerManager field is a new virtual property used to test the relationship-derived virtual property mechanism)
VertexStatePropagator#propagateVertexStateChange is invoked with each of the path fields from the resulting JsonPatch.diff(oldValue, newValue)
The results of JsonPatch.diff:
The propagation config in the manager field for my example is
But we never notify reports because manager/_ref or manager/_ref* is changed - not the bare relationship field.
This change should examine all parents of the path elements of the JsonPatch.diff elements, and then remove all duplicates so that relationship fields are not signaled redundantly.
|Comment by Chris Drake [ 22/Jul/20 ]|
|Comment by Lana Frost [ 23/Jul/20 ]|
Reopening to add to release notes