2

I am getting the following error when running the pipeline bathc. "Pipeline step is missing at least one required plugin." I have an AddPlugins method in my pipeline step:

protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep)
{
  AddEndpointSettings(source, pipelineStep);
}

I also have it in my end point converter. I doesn't look like this gets hit:

 protected override void AddPlugins(ItemModel source, Endpoint endpoint)
{
  var settings = new ContactSettings();
  settings.CollectionName = base.GetStringValue(source, "Collection Name");

  endpoint.Plugins.Add(settings);

}

I looked through the DEF dlls using dotPeek, but wasn't quite sure where this error is coming from. What could of I have missed? Thanks.

Processor code:

 public class ReadContactsStepProcessor : BaseReadDataStepProcessor

{ public override bool CanProcess(PipelineStep pipelineStep, PipelineContext pipelineContext) { return base.CanProcess(pipelineStep, pipelineContext); } public override void Process(PipelineStep pipelineStep, PipelineContext pipelineContext) { base.Process(pipelineStep, pipelineContext); } protected override void ReadData(Endpoint endpoint, PipelineStep pipelineStep, PipelineContext pipelineContext) { var contactSettings = pipelineStep.GetPlugin(); if (contactSettings != null) { pipelineContext.PipelineBatchContext.Logger.Info( "Hello world! Create some items here..." + contactSettings.CollectionName); }

  //add the plugin to the pipeline context
  pipelineContext.Plugins.Add(contactSettings);
}

}

17
  • 1
    To fix it, we need to see what is pipeline step processor used. if your pipeline step processor is based on already excited, it means, it may require some plugins for correct work. Attribute usage is default implementation to assign required plugins. If base class has it, the method canprocess will check it and throw an error if certain plugins are missed. .
    – Vlad Shpak
    Apr 10, 2017 at 9:26
  • I pasted the code. I based this on github.com/feniljacob/…. The ReadData does not get called on my processor.
    – RReilley
    Apr 10, 2017 at 12:17
  • What is DEF version? I see when this error appears, it should be displayed with missed plugin name.
    – Vlad Shpak
    Apr 10, 2017 at 13:46
  • I am using 1.3.
    – RReilley
    Apr 10, 2017 at 13:59
  • 1
    Maybe you can serialize the items (and templates), along with the code and email it to me.
    – Adam Conn
    Apr 10, 2017 at 19:15

1 Answer 1

2

So after talking to Adam and Vlad I figured out was wrong. First thing I needed was to define the endpoint settings in the pipeline step. I was doing the wrong plugin. When using BaseReadStepProcessor in your Pipeline processor endpoint settings must be added as a plugin.

protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep)
{
  AddEndpointSettings(source, pipelineStep);
}
private void AddEndpointSettings(ItemModel source, PipelineStep pipelineStep)
{
  var settings = new EndpointSettings();
  settings.EndpointFrom = base.ConvertReferenceToModel<Endpoint>(source, ContactReadStepItemModel.EndpointFrom);
  pipelineStep.Plugins.Add(settings);
}

The second thing I had wrong was my spelling for Converter in my endpoint in Sitecore was off. I had an extra space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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