0
Fixed

MultiValue Union transformation not working

Tony Sheehy 7 years ago • updated by anonymous 4 years ago 7

A multivalue union configured with a date field fails with:

Adapter import all entities for adapter failed.
Adapter import all entities for adapter 02dcad6e-a5d8-4b34-8650-1bb5e917ec2a failed with reason Invalid date time - the value passed was Unify.Framework.IValue[]. Duration: 00:00:01.3974610
Error details:
Unify.Product.IdentityBroker.EntitySchemaValidationException: Invalid date time - the value passed was Unify.Framework.IValue[] ---> System.Exception: Unify.Framework.IValue[] could not be parsed into a valid DateTime format.
--- End of inner exception stack trace ---
at Unify.Product.IdentityBroker.EntityDateTimeTypeSchemaValidator`1.CreateValue(Object dataValue)
at Unify.Product.IdentityBroker.MultiValueUnionTransformation.<Transform>d__0.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.IdentityBroker.Adapter.ReflectPage(IAdapterEntityPartitionUpdatableContext adapterContext, IEnumerable`1 entities, HashSet`1 seenEntities, ParallelGate gate)
at Unify.Product.IdentityBroker.Adapter.<>c__DisplayClass11a.<GetTransformedEntities>b__10d(IEnumerable`1 page)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unify.Framework.Collections.ActionOnExceptionEnumerator`1.MoveNext()
at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__17`1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at Unify.Framework.IO.LDIFComponentFileGenerator`1.GenerateFile(TextWriter writer, IEnumerable`1 entries)
at Unify.Product.IdentityBroker.LDIFAdapterBase.<>c__DisplayClass14`1.<CreateLDIFComponentStream>b__13(Stream stream)
at Unify.Framework.IO.LazyEvaluationStream.Evaluate(Object obj)

We believe the validator being passed through by the factory is incorrect.

Affected Versions:
Fixed by Version:

I have a feeling it was broken about 8 weeks ago when you took MultiValued off IEntitySchemaFieldDefinitionConfiguration.

Please debug MultiValueUnionTransformationFactory.Transform, groupTargetField and _FirstMembersField should be multi valued.

What tipped me off was the stack trace not even mentioning EntityMultiValueObjectTypeSchemaValidator.

This wasn't the issue - the input group members can only be multivalue fields in the transformation and the UI does not represent this.

Either the UI needs to restrict the selection to multi values, or multi value validator needs to be created if the target isn't already one.

I had a quick look at creating a validator, and I don't think it'd be as easy as the first option.

Reassigned for confirmation of completion.

Included prerequisite for multivalue union on service-side controller and UI part.