0
Fixed

Relational transformations with optional DN generators can break on change detection.

Tony Sheehy 12 years ago updated by anonymous 8 years ago 2

Relational transformations with optional DN generators can break on change detection if the optional DN generator is configured.

The factory being used for this does not add a contribution for the target of the DN Generator attribute mapper on ApplyChainedChangeDetection, which can result in a NullReferenceException during change detection.

This appears in the logs as

Changes register item processing on failed.
Changes register item processing on connector CSV Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:01:47.7557745
Error details:
System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Product.IdentityBroker.ChainedTransformationChangeProcessor.PublishChange(IEnumerable`1 changedEntities, DateTime changeProcessTime, ICollection`1 changeRecords) in S:\hg\Product\IdentityBroker\Master-Changes\Source\Adapter\Unify.IdentityBroker.Adapter.EntityTransformation\ChainedTransformationChangeProcessor.cs:line 132
at Unify.Product.IdentityBroker.ChainedTransformationChangeProcessor.ProcessChangeReport(IDictionaryTwoPassDifferenceReport`4 changesReport, DateTime changeProcessTime) in S:\hg\Product\IdentityBroker\Master-Changes\Source\Adapter\Unify.IdentityBroker.Adapter.EntityTransformation\ChainedTransformationChangeProcessor.cs:line 109
at Unify.Product.IdentityBroker.ChangeReportProcessor.<>c__DisplayClass12.<ProcessCurrentReport>b__11(ITransformationChangeProcessor processor) in S:\hg\Product\IdentityBroker\Master-Changes\Source\ChangeDetection\Unify.IdentityBroker.ChangeDetection\ChangeReportProcessor.cs:line 159
at Unify.Framework.Visitor.<>c__DisplayClass1`1.<Visit>b__0(T item, Int32 index) in S:\hg\Framework\Core\a\Source\DesignPatterns\Unify.Framework.DesignPatterns\Visitor.cs:line 23
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor) in S:\hg\Framework\Core\a\Source\DesignPatterns\Unify.Framework.DesignPatterns\Visitor.cs:line 47
at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`1 visitor) in S:\hg\Framework\Core\a\Source\DesignPatterns\Unify.Framework.DesignPatterns\Visitor.cs:line 23
at Unify.Product.IdentityBroker.ChangeReportProcessor.ProcessCurrentReport(IEnumerable`1 adapterTransformationProcessors, IDictionaryTwoPassDifferenceReport`4 differenceReport, DateTime changeTime) in S:\hg\Product\IdentityBroker\Master-Changes\Source\ChangeDetection\Unify.IdentityBroker.ChangeDetection\ChangeReportProcessor.cs:line 158
at Unify.Product.IdentityBroker.ChangeReportProcessor.CreateAndProcessReport[T](IEnumerable`1 adapterTransformationProcessors, IEnumerable`1 sourceEnumerable, DateTime changeTime, Action`2 addAction) in S:\hg\Product\IdentityBroker\Master-Changes\Source\ChangeDetection\Unify.IdentityBroker.ChangeDetection\ChangeReportProcessor.cs:line 147
at Unify.Product.IdentityBroker.ChangeReportProcessor.ProcessReport(IChangeReportProcessingRequest request) in S:\hg\Product\IdentityBroker\Master-Changes\Source\ChangeDetection\Unify.IdentityBroker.ChangeDetection\ChangeReportProcessor.cs:line 118

Additionally the Time Relational transformation adds a contribution for the target twice, resulting in a argument exception.

This has been tested in the regression tests, and personally looking at the code I can see the optional DN generators contributions have been added. Reassigned for confirmation of completion.

Confirmed in beta regression testing. Closed.