{"id":4038,"date":"2014-03-30T07:20:01","date_gmt":"2014-03-30T07:20:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/pass-values-to-pipeline-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:20:01","modified_gmt":"2014-03-30T07:20:01","slug":"pass-values-to-pipeline-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/pass-values-to-pipeline-collection-of-common-programming-errors\/","title":{"rendered":"Pass values to pipeline-Collection of common programming errors"},"content":{"rendered":"<p>Hi Ravi,<\/p>\n<p>Not sure that I have explained the problem correctly. I don&#8217;t have any problems running the pipeline, what I have problem with is to pass values to pipeline at a\u00a0runtime.<\/p>\n<p>In CS 2007 I could assign some value to pipeline info using specific key (see the code example above) and then access this value in my pipeline component. In CS 2009 I cannot find the place where this can be done since all pipeline execution logic is hidden in corresponding sequence component (Microsoft.Commerce.SequenceComponents.Components.OrderPipelinesProcessor).<\/p>\n<p>Looking at the source code of\u00a0OrderPipelinesProcessor component (using reflector) I can see that it creates core pipeline info from MCF pipeline info:<\/p>\n<pre> internal static PipelineInfo CreatePipelineInfo(PipelineBase pipeline, string siteName, PipelineInfo requestPipelineInfo)\n{ PipelineInfo commercePipelineInfo = new PipelineInfo(pipeline.Name); AddItemsToPipelineInfo(commercePipelineInfo, requestPipelineInfo); ....... return commercePipelineInfo;\n}\n\n<\/pre>\n<p>\nIt also adds items from MCF pipeline info to core one:<\/p>\n<pre> private static void AddItemsToPipelineInfo(PipelineInfo commercePipelineInfo, PipelineInfo requestPipelineInfo)\n{ foreach (string str in requestPipelineInfo.Items.Keys) { object obj2 = requestPipelineInfo.Items[str];\n    commercePipelineInfo[str] = obj2;\n  }\n}\n\n<\/pre>\n<p>\nSeems like I need to pass my data to MCF pipeline info so that then it is passed to core pipeline info during runtime. But I cannot find a way to do this.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi Ravi, Not sure that I have explained the problem correctly. I don&#8217;t have any problems running the pipeline, what I have problem with is to pass values to pipeline at a\u00a0runtime. In CS 2007 I could assign some value to pipeline info using specific key (see the code example above) and then access this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4038","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4038"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4038\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}