Use .impersonate=onBehalfOfInitiator directive and do any field change in a rule.
Run with aggregator 1.2
Expected behavior
Aggregator should save the changes.
Actual behavior
The impersonate directive clears the ChangedBy field then set it back to the original value again thus resetting the IsDirty flag for the workitem so nothing is saved.
IsDirty flag should probably be set to Changes.Any()
Impersonate will always set a value to it's original value, thus removing the change entirely.
If the last change you do is set a value back to the original value it will flag the workitem as not IsDirty and not save anything regardless if other values should be changed.
Impersonate happens after the rule execution and thus will make 2 happen.
Steps to reproduce
Use .impersonate=onBehalfOfInitiator directive and do any field change in a rule. Run with aggregator 1.2
Expected behavior
Aggregator should save the changes.
Actual behavior
The impersonate directive clears the ChangedBy field then set it back to the original value again thus resetting the IsDirty flag for the workitem so nothing is saved.
IsDirty flag should probably be set to Changes.Any()
Diagnostic logs
Environment
Custom wrapper around the aggregator engine code.