I created a pipeline and a command which runs the pipeline with XC 9.3.
The code of my command looks as follows:
public class MyCommand : CommerceCommand
{
...
public virtual async Task<string> Process(CommerceContext commerceContext, string id)
{
using (CommandActivity.Start(commerceContext, this))
{
string res = await pipeline.Run(new MyArgument(id),
commerceContext.PipelineContextOptions);
return res;
}
}
}
When I call GetPipelines()
from Postman I see that the pipeline and its block are registered.
Next when I attach the debugger I see that the pipeline is instantiated once the Command is constructed.
But when the pipeline.Run
method gets called nothing happens. Its look like creation of the pipeline fails. After some dotpeeking this seems to happen in the Pipeline
base class:
Sitecore.Framework.Pipelines {
public abstract class Pipeline<...> {
public override Task<TOutput> Run(TInput arg, TContext context)
{
return this.Configuration.CreateRunner().Run<TOutput>(this.Name, (object) arg, (IPipelineExecutionContext) context);
}
...
}
}
Any clues on why the pipeline does not run? What am I missing here?