| Author |
Message |
cgruber
Guest
|
Posted:
Thu Sep 08, 2005 12:52 am Post subject:
Completed Custom Pipeline |
|
|
Does anyone have a "fleshed out" example of Pipeline Component in C#
The example in MSDN doesn't really show much. I am interested in th
parameters coming in and the return values. They are mostly jus
objects. What should they be really? What should they be cast to
What type of object should I really return
I am specifically designing a new pipeline to do custom shipping usin
UPS's Rate Checking online service. A completed pipeline componen
would help me out tremendoesly to use as a better template than wha
Microsoft provides on their MSDN site
As of now I am modifying the sample MinMaxShipCSharp.cs file foun
at
C:\program files\Microsoft Commerce Server 2002\SDK\Samples\Orde
Processing\MinMaxShip\CSharp\MinMaxShipCSharp.c
It appears that many of the fields I will need to send to UPS are i
the dictionary, but it looks like Weight may not be. Any ideas o
how to get this in there easily
Thanks
Chri |
|
| Back to top |
|
 |
Ravi Shankar
Guest
|
Posted:
Thu Sep 08, 2005 12:51 pm Post subject:
RE: Completed Custom Pipeline |
|
|
Hi Chris,
The pipeline Components reference the COM+ Interfaces and not the .Net
objects. So refer to the COM/Interop section of the programmers guide and
reference the objects accordingly.
The "weight" property comes from the catalog where is a product level
property and should be defined as a "numeric" or "decimal" type. This is
loaded by the product properties component in the pipeline and is accessible
as lineitem._product_weight or something like that.
--
Ravi Shankar
"cgruber" wrote:
| Quote: | Does anyone have a "fleshed out" example of Pipeline Component in C#.
The example in MSDN doesn't really show much. I am interested in the
parameters coming in and the return values. They are mostly just
objects. What should they be really? What should they be cast to?
What type of object should I really return?
I am specifically designing a new pipeline to do custom shipping using
UPS's Rate Checking online service. A completed pipeline component
would help me out tremendoesly to use as a better template than what
Microsoft provides on their MSDN site.
As of now I am modifying the sample MinMaxShipCSharp.cs file found
at:
C:\program files\Microsoft Commerce Server 2002\SDK\Samples\Order
Processing\MinMaxShip\CSharp\MinMaxShipCSharp.cs
It appears that many of the fields I will need to send to UPS are in
the dictionary, but it looks like Weight may not be. Any ideas on
how to get this in there easily?
Thanks!
Chris
|
|
|
| Back to top |
|
 |
Vinod Kumar[MSFT]
Guest
|
Posted:
Wed Sep 14, 2005 6:13 am Post subject:
RE: Completed Custom Pipeline |
|
|
You'll need to extend you catalog schema to include the weight field. This filed will contain the weight for each product. QCI component populates all the product properties from the catalog system into the items
dictioanry. This you can access easily in your pipeline component.
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.
--------------------
NNTP-Posting-Date: Wed, 07 Sep 2005 19:43:09 -0500
Subject: Completed Custom Pipeline
From: cgruber@bgnet.bgsu-dot-edu.no-spam.invalid (cgruber)
Newsgroups: microsoft.public.commerceserver.general
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: newsSync (Commerce Server) 6925
Message-ID: <JNOdneYo_u2AFILeRVn_vQ@giganews.com>
Date: Wed, 07 Sep 2005 19:43:09 -0500
Lines: 1
X-Trace: sv3-hQD12CJgv30DfCaj4dzM7bYGltlBhja8+p8/AeGz8dSWY6UJ3C+jRNq+ApNPZADCmPjWyTuvrkMV7H2!uyNdIwtH1YNUmIsMkJbcF/x5tu9e+kI5vIVggnyw3c5UfTKlfUVTNffcml+0
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!
nntp.giganews.com!local01.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.general:16754
X-Tomcat-NG: microsoft.public.commerceserver.general
Does anyone have a "fleshed out" example of Pipeline Component in C#.
The example in MSDN doesn't really show much. I am interested in the
parameters coming in and the return values. They are mostly just
objects. What should they be really? What should they be cast to?
What type of object should I really return?
I am specifically designing a new pipeline to do custom shipping using
UPS's Rate Checking online service. A completed pipeline component
would help me out tremendoesly to use as a better template than what
Microsoft provides on their MSDN site.
As of now I am modifying the sample MinMaxShipCSharp.cs file found
at:
C:\program files\Microsoft Commerce Server 2002\SDK\Samples\Order
Processing\MinMaxShip\CSharp\MinMaxShipCSharp.cs
It appears that many of the fields I will need to send to UPS are in
the dictionary, but it looks like Weight may not be. Any ideas on
how to get this in there easily?
Thanks!
Chris |
|
| Back to top |
|
 |
cgruber
Guest
|
Posted:
Thu Sep 15, 2005 12:51 am Post subject:
re:Completed Custom Pipeline |
|
|
Thanks for your help guys. Unfortunatly I can't even get that far
I'm using the MinMaxCSharp component in the SDK and modifying it t
add up shipping weight instead of cost
However this line is giving me troubl
// retrieve the shipments that must be processe
ShipmentsToProcess
(ISimpleList)Context[ShipmentsToProcessKey]
I got it to throw this exception to the log
| Quote: | PIPELINE:-- component [0x4] returned hr: 0x80131500, IErrorLevel=
in 187 millisecond
Error Description: Component Execution failed for component[0x4
hr: 0x8013150
ProgID: Commerce.UPSShippin
Specified cast is not valid
PIPELINE:-- 2005/09/14 11:12:43.0968 Pipeline Execution complete
returning hr: 0x8013150
i: 0x
hrLoop: 0x8013150
*plErrorLevel: 100
Sink stopped at 2005/09/14 11:12:43.096
|
This is the source shipped with Commerce Server in the SDK, I woul
think that it would compile and run at least..
If I can't cast it to an ISimpleList, what are my other options
Thanks
Chri |
|
| Back to top |
|
 |
Ravi Shankar
Guest
|
Posted:
Thu Sep 15, 2005 4:52 pm Post subject:
re:Completed Custom Pipeline |
|
|
Hi cgruber,
1. the key is "ShipmentToProcess" and not "ShipmentToProcessKey".
2. This is an INTEGER :) (and part of the context - Correct)
3. This is an index into the shipments list which is a list of lists :)
4. shipments is available on OrderForm.
Actually if you go through the CS Help File you'd be able to identify all
these keys & their heirarchy.
--
Ravi Shankar
"cgruber" wrote:
| Quote: | Thanks for your help guys. Unfortunatly I can't even get that far.
I'm using the MinMaxCSharp component in the SDK and modifying it to
add up shipping weight instead of cost.
However this line is giving me trouble
// retrieve the shipments that must be processed
ShipmentsToProcess =
(ISimpleList)Context[ShipmentsToProcessKey];
I got it to throw this exception to the log:
PIPELINE:-- component [0x4] returned hr: 0x80131500, IErrorLevel=4
in 187 milliseconds
Error Description: Component Execution failed for component[0x4]
hr: 0x80131500
ProgID: Commerce.UPSShipping
Specified cast is not valid.
PIPELINE:-- 2005/09/14 11:12:43.0968 Pipeline Execution completed
returning hr: 0x80131500
i: 0x5
hrLoop: 0x80131500
*plErrorLevel: 1000
Sink stopped at 2005/09/14 11:12:43.0968
This is the source shipped with Commerce Server in the SDK, I would
think that it would compile and run at least...
If I can't cast it to an ISimpleList, what are my other options?
Thanks,
Chris
|
|
|
| Back to top |
|
 |
cgruber
Guest
|
Posted:
Fri Sep 16, 2005 12:51 am Post subject:
re:Completed Custom Pipeline |
|
|
Thanks Ravi
I'm getting sidetracked with another project right now, I should b
back to this in less than 2 weeks. I'll let you know how it goes
Thanks again
Chri |
|
| Back to top |
|
 |
cgruber
Guest
|
Posted:
Mon Sep 19, 2005 4:51 pm Post subject:
re:Completed Custom Pipeline |
|
|
Looking back at this real quick, I believe I have had the correct ke
in here
private const String ShipmentsToProcessKey
"shipments_to_process"
..
ShipmentsToProcess = (ISimpleList
Context[ShipmentsToProcessKey]
If this still doesn't look right, let me know
Chri |
|
| Back to top |
|
 |
Vinayak Tadas[MSFT]
Guest
|
Posted:
Fri Sep 23, 2005 8:51 am Post subject:
RE: Completed Custom Pipeline |
|
|
One thing you can do
1. Open the property definition "weight" and check the Assign to all
Product Types checkbox. This way the property will get added to all
existing product definitions and newly created definitions. If the property
does not exist then create a property named "weight" of type decimal and
check the Assign to all Product Types checkbox
Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt
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
Get Secure! For more info visit http://www.microsoft.com/security. Please
reply to the newsgroups only
--------------------
X-Tomcat-ID: 20928103
References: <JNOdneYo_u2AFILeRVn_vQ@giganews.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_B2CF8AF0"
Content-Transfer-Encoding: 7bit
From: vkumar@online.microsoft.com (Vinod Kumar[MSFT])
Organization: Microsoft
Date: Wed, 14 Sep 2005 01:13:22 GMT
Subject: RE: Completed Custom Pipeline
X-Tomcat-NG: microsoft.public.commerceserver.general
Message-ID: <BShLBmMuFHA.932@TK2MSFTNGXA01.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
Lines: 152
Path: TK2MSFTNGXA01.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:3441
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
You'll need to extend you catalog schema to include the weight field. This
filed will contain the weight for each product. QCI component populates all
the product properties from the catalog system into the items dictioanry.
This you can access easily in your pipeline component.
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.
--------------------
NNTP-Posting-Date: Wed, 07 Sep 2005 19:43:09 -0500
Subject: Completed Custom Pipeline
From: cgruber@bgnet.bgsu-dot-edu.no-spam.invalid (cgruber)
Newsgroups: microsoft.public.commerceserver.general
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: newsSync (Commerce Server) 6925
Message-ID: <JNOdneYo_u2AFILeRVn_vQ@giganews.com>
Date: Wed, 07 Sep 2005 19:43:09 -0500
Lines: 1
X-Trace:
sv3-hQD12CJgv30DfCaj4dzM7bYGltlBhja8+p8/AeGz8dSWY6UJ3C+jRNq+ApNPZADCmPjWyTuv
rkMV7H2!uyNdIwtH1YNUmIsMkJbcF/x5tu9e+kI5vIVggnyw3c5UfTKlfUVTNffcml+0
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
X-Postfilter: 1.3.32
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nntp.dca.g
iganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!news.giganews.co
m.POSTED!not-for-mail
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.general:16754
X-Tomcat-NG: microsoft.public.commerceserver.general
Does anyone have a "fleshed out" example of Pipeline Component in C#.
The example in MSDN doesn't really show much. I am interested in the
parameters coming in and the return values. They are mostly just
objects. What should they be really? What should they be cast to?
What type of object should I really return?
I am specifically designing a new pipeline to do custom shipping using
UPS's Rate Checking online service. A completed pipeline component
would help me out tremendoesly to use as a better template than what
Microsoft provides on their MSDN site.
As of now I am modifying the sample MinMaxShipCSharp.cs file found
at:
C:\program files\Microsoft Commerce Server 2002\SDK\Samples\Order
Processing\MinMaxShip\CSharp\MinMaxShipCSharp.cs
It appears that many of the fields I will need to send to UPS are in
the dictionary, but it looks like Weight may not be. Any ideas on
how to get this in there easily?
Thanks!
Chris |
|
| Back to top |
|
 |
cgruber
Guest
|
Posted:
Tue Sep 27, 2005 12:51 am Post subject:
re:Completed Custom Pipeline |
|
|
OK. I got this worked out without creating a custom pipelin
component
I followed MS's steps for implementing the MinMaxShip
After I got it working with the site, I went in and changed it to wor
with what we were trying to do: Calculate shipping based on wha
UPS's XML services calculates it to be (based upon weight, origin
destination, shipping service, etc
I changed the MinMax.asp file to take in UPS Shipping Service cod
instead of the 'Floor' field and also changed the 'Percentage' fiel
to be what percentage of the shipping to charge as the handling fee
Everything is working great with it. If you are trying to d
something similar, email me and I will send you the code I have an
save you some time. cgruber50@aol.co
Thanks everyone for all your help with this |
|
| Back to top |
|
 |
Colin Bowern
Guest
|
Posted:
Tue Sep 27, 2005 4:51 pm Post subject:
re:Completed Custom Pipeline |
|
|
There is a similar component posted on the GotDotNet workspace. Feel free
to contribute the code there in terms of making it available.
http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=77487df3-96dc-41de-9ca0-b7f284a8c113
Cheers,
Colin
| Quote: | OK. I got this worked out without creating a custom pipeline
component.
I followed MS's steps for implementing the MinMaxShip.
After I got it working with the site, I went in and changed it to work
with what we were trying to do: Calculate shipping based on what
UPS's XML services calculates it to be (based upon weight, origin,
destination, shipping service, etc)
I changed the MinMax.asp file to take in UPS Shipping Service code
instead of the 'Floor' field and also changed the 'Percentage' field
to be what percentage of the shipping to charge as the handling fee.
Everything is working great with it. If you are trying to do
something similar, email me and I will send you the code I have and
save you some time. cgruber50@aol.com
Thanks everyone for all your help with this!
|
|
|
| Back to top |
|
 |
cgruber
Guest
|
Posted:
Wed Oct 05, 2005 12:50 am Post subject:
re:Completed Custom Pipeline |
|
|
Thanks Colin
I uploaded what I had... careful, there isnt much error checking o
data integrity checks, but it will "Git R' Done |
|
| Back to top |
|
 |
|
|
|
|