Running pipelines in a Forms/Console application
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Running pipelines in a Forms/Console application

 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server
Author Message
Jerry
Guest





Posted: Wed Dec 08, 2004 8:15 am    Post subject: Running pipelines in a Forms/Console application Reply with quote

Is there any way to run a pipeline in a C# Forms or console application?

I read in another post that you can't use the PipelineInfo class in a
non-web application. Is this true? If so, is there any other way to run a
pipeline from a non-web app?

I'm stuck creating orders in a batch process and I'd prefer not to have to
hit the web server if at all possible.
Back to top
Sudha Raghavan [MSFT]
Guest





Posted: Tue Dec 14, 2004 6:18 am    Post subject: RE: Running pipelines in a Forms/Console application Reply with quote

The commerce Order context can only be obtained in a web application.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

--------------------
Thread-Topic: Running pipelines in a Forms/Console application
thread-index: AcTcy7ls9sWerKEmTxaLnQqU1cxOBA==
X-WBNR-Posting-Host: 168.230.130.248
From: "=?Utf-8?B?SmVycnk=?=" <Jerry@discussions.microsoft.com>
Subject: Running pipelines in a Forms/Console application
Date: Tue, 7 Dec 2004 18:15:02 -0800
Lines: 8
Message-ID: <D897EF18-B054-4A71-A25E-95D86B15E395@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15208
X-Tomcat-NG: microsoft.public.commerceserver.general

Is there any way to run a pipeline in a C# Forms or console application?

I read in another post that you can't use the PipelineInfo class in a
non-web application. Is this true? If so, is there any other way to run a
pipeline from a non-web app?

I'm stuck creating orders in a batch process and I'd prefer not to have to
hit the web server if at all possible.
Back to top
Jerry
Guest





Posted: Wed Dec 15, 2004 9:19 pm    Post subject: RE: Running pipelines in a Forms/Console application Reply with quote

That's not true. I can access the order context just fine (found that tidbit
in another posting). I am able to create and manipulate both baskets and
orders. The only thing I can't figure out how to do is run the basket and
totals pipelines on a new basket before I save it as an order.

"Sudha Raghavan [MSFT]" wrote:

Quote:
The commerce Order context can only be obtained in a web application.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

--------------------
Thread-Topic: Running pipelines in a Forms/Console application
thread-index: AcTcy7ls9sWerKEmTxaLnQqU1cxOBA==
X-WBNR-Posting-Host: 168.230.130.248
From: "=?Utf-8?B?SmVycnk=?=" <Jerry@discussions.microsoft.com
Subject: Running pipelines in a Forms/Console application
Date: Tue, 7 Dec 2004 18:15:02 -0800
Lines: 8
Message-ID: <D897EF18-B054-4A71-A25E-95D86B15E395@microsoft.com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15208
X-Tomcat-NG: microsoft.public.commerceserver.general

Is there any way to run a pipeline in a C# Forms or console application?

I read in another post that you can't use the PipelineInfo class in a
non-web application. Is this true? If so, is there any other way to run a
pipeline from a non-web app?

I'm stuck creating orders in a batch process and I'd prefer not to have to
hit the web server if at all possible
Back to top
Vinod Kumar[MSFT]
Guest





Posted: Sat Jan 15, 2005 7:38 am    Post subject: RE: Running pipelines in a Forms/Console application Reply with quote

If you want to run pipelines from the console application you should use OrderGroup.RunPipeline(pipeInfo, pipeline) method.
Here is some sample code for how to run pipelines from the console application.

PipelineInfo pipeInfo = new PipelineInfo(pipelineName);

//You'll need to manually configure the pipe context dictionary here.
//Here is some sample of configuring the message manager and cache manager.
// In this sample all caches are not configured so you'll need to configure all the caches in the cache manager.


CacheManagerClass cacheManager = null;
MessageManagerClass msgManager = null;
try
{

//Create the Cachemanager object
cacheManager = new CacheManagerClass();
//Create the Messagemanager object
msgManager = new MessageManagerClass();
msgManager.AddLanguage("en-US", 1033);
msgManager.AddMessage("pur_badsku", "One or more items were removed from the basket", "en-US");
msgManager.AddMessage("pur_noitems", "No items were found in the basket", "en-US");
msgManager.AddMessage("pur_badplacedprice", "Placed price was not correct", "en-US");

//Set the components in the dictionary
ConfigureCatalogSystem(pipeInfo, cacheManager);
ConfigureMarketingSystem(pipeInfo, cacheManager);
ConfigureOrderManagementContext(pipeInfo, cacheManager);

pipeInfo["cachemanager"] = cacheManager;
pipeInfo["MessageManager"] = msgManager;
pipeInfo["CommerceResources"] = this.resources;
}
finally
{
if (cacheManager != null)
Marshal.ReleaseComObject(cacheManager);
if (msgManager != null)
Marshal.ReleaseComObject(msgManager);
}

//Like wise you'll need to configure the catalog system , Order system and campaigns system properties in the context dictionary.

PipelineBase pipeline = new OrderPipeline(pipelineName, pcfFilePath, false, logFilePath, false);
basket.RunPipeline(pipeInfo, pipeline);


I don't have the complete sample right now so give it a shot and if you've problems then get back to me.

Thanks
-Vinod


This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
--------------------
Thread-Topic: Running pipelines in a Forms/Console application
thread-index: AcTiuWoFHAdF5dMHS9WwkoP44ZUloQ==
X-WBNR-Posting-Host: 168.230.130.248
From: "=?Utf-8?B?SmVycnk=?=" <Jerry@discussions.microsoft.com>
References: <D897EF18-B054-4A71-A25E-95D86B15E395@microsoft.com> <k7jBFKX4EHA.3388@cpmsftngxa10.phx.gbl>
Subject: RE: Running pipelines in a Forms/Console application
Date: Wed, 15 Dec 2004 07:19:04 -0800
Lines: 49
Message-ID: <732123B5-51DE-4E91-8F4B-5CF37150F5B9@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15248
X-Tomcat-NG: microsoft.public.commerceserver.general

That's not true. I can access the order context just fine (found that tidbit
in another posting). I am able to create and manipulate both baskets and
orders. The only thing I can't figure out how to do is run the basket and
totals pipelines on a new basket before I save it as an order.

"Sudha Raghavan [MSFT]" wrote:

Quote:
The commerce Order context can only be obtained in a web application.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

--------------------
Thread-Topic: Running pipelines in a Forms/Console application
thread-index: AcTcy7ls9sWerKEmTxaLnQqU1cxOBA==
X-WBNR-Posting-Host: 168.230.130.248
From: "=?Utf-8?B?SmVycnk=?=" <Jerry@discussions.microsoft.com
Subject: Running pipelines in a Forms/Console application
Date: Tue, 7 Dec 2004 18:15:02 -0800
Lines: 8
Message-ID: <D897EF18-B054-4A71-A25E-95D86B15E395@microsoft.com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15208
X-Tomcat-NG: microsoft.public.commerceserver.general

Is there any way to run a pipeline in a C# Forms or console application?

I read in another post that you can't use the PipelineInfo class in a
non-web application. Is this true? If so, is there any other way to run a
pipeline from a non-web app?

I'm stuck creating orders in a batch process and I'd prefer not to have to
hit the web server if at all possible
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Commerce Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB