Timeline for Unable to get policy object when running pipeline from Startup class Config method in Commerce Engine in Sitecore Commerce 8.2.1
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 24, 2018 at 14:27 | comment | added | Andrei Paliakou | Try to configure your pipeline in ConfigureServices method in Startup.cs file | |
Jan 24, 2018 at 13:22 | comment | added | Geykel |
...also the first line in the only block that the pipeline has is a log entry _logger.LogInformation($"{Name}: Started!"); which is logged fine, the line that fails is the one asserting the policy property, all the policy properties are null or empty.
|
|
Jan 24, 2018 at 13:17 | comment | added | Geykel | My pipeline is configured in code, in my plugin ConfigureSitecore class, as I mentioned in the description of the problem, my pipeline runs fine if it is executed from any other place, for example, if I insert my pipeline in the add cart line pipeline or any other existing one it runs perfectly but of course I don't want that, I want to run it only one time as soon as the engine starts (the purpose of the pipeline is to start a new thread that will be listening for messages on a queue, so that is why I need it to run only one time right after the engine starts). | |
Jan 24, 2018 at 13:08 | comment | added | Andrei Paliakou | First of all you should be sure that you added your pipeline configuration to right Environment Configuration. After that you need to run Bootstrap() and check again your pipeline run | |
Jan 24, 2018 at 12:56 | comment | added | Geykel | That's what I said, I tried with your example with the .Wait() also without it and it doesn't work | |
Jan 24, 2018 at 12:48 | comment | added | Andrei Paliakou | try to call .Wait() for run your pipeline synchronously | |
Jan 24, 2018 at 12:46 | comment | added | Geykel |
Thanks, that was one of the things I already tried and didn't work, my line is the last one in Configure method, also tried this one testPipeline.Run(string.Empty, NodeContext.GetPipelineContextOptions());
|
|
Jan 23, 2018 at 9:19 | history | answered | Andrei Paliakou | CC BY-SA 3.0 |