1

Im using DEF 2.0.1 and Sitecore 9, with an example adapted from the File Reader example.

When I run the pipeline, I'm getting an error in the logs:

ManagedPoolThread #3 08:35:25 ERROR [Data Exchange] No value was read from identifier object. (pipeline: Experience from Source to Item Sync Pipeline, pipeline step: Resolve Experience Info Item, pipeline step identifier: 64c4f165-f978-4b5b-a7ee-ccaf1b92eae3)

The pipeline step is set-up as per the tutorial : http://integrationsdn.sitecore.net/DataExchangeFramework/v2.0.1/cookbooks/custom-providers/implementing-a-provider/use-the-provider/add-pipeline-step-to-resolve-target-item.html

Where else should I be looking? All types and template ids appear to be correct

I can see my processor is adding the expected data to the pipeline including a value for the ID field

protected override void ReadData(
            Endpoint endpoint,
            PipelineStep pipelineStep,
            PipelineContext pipelineContext,
            ILogger logger)
        {
....

        //add the data that was read from the file to a plugin
        var data = this.GetIterableData(settings);
        var dataSettings = new IterableDataSettings(data);

        //
        //add the plugin to the pipeline context
        pipelineContext.AddPlugin(dataSettings);
    }

    protected virtual IEnumerable<Experience> GetIterableData(FileSettings settings){..}
1

I've found what was causing my issue ..

I have an entity with fields such as

[JsonProperty("name")]
public string Name { get; set; }

However, although my json is deserialised successfully, and uses the JSonProperty (Newetonsoft JSON), this does not work unless I also give the property itself the same case. i.e.

[JsonProperty("name")]
public string name { get; set; }

This makes no sense to me however as I can see the json is deserialised successfully in my processor using the uppercase "Name". Why would the case need to match in the DEF? Could it be due to my Converter?

[SupportedIds(JsonValueAccessorTemplateId)]
    public class JsonValueAccessorConverter : ValueAccessorConverter
    {
        public const string JsonValueAccessorTemplateId = "{926B7450-07BB-4A97-B44A-CF4E008EDE62}";
        public const string TemplatePropNameField = "PropertyName";
        public JsonValueAccessorConverter(IItemModelRepository repository) : base(repository)
        {
        }
        protected override IValueReader GetValueReader(ItemModel source)
        {
            var reader = base.GetValueReader(source);
            if (reader == null)
            {
                // get the field name
                var fieldName = this.GetStringValue(source, TemplatePropNameField);


                if (String.IsNullOrEmpty(fieldName)) return null;
                reader = new PropertyValueReader(fieldName);
            }
            return reader;
        }

        protected override IValueWriter GetValueWriter(ItemModel source)
        {
            var writer = base.GetValueWriter(source);
            if (writer == null)
            {
                var fieldName = this.GetStringValue(source, TemplatePropNameField);
                if (String.IsNullOrEmpty(fieldName)) return null;
                writer = new PropertyValueWriter(fieldName);
            }
            return writer;
        }

    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.