|
Home > Archive > Commerce Server General > October 2006 > PipeLine and LineItem WeaklyTyped properties
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
PipeLine and LineItem WeaklyTyped properties
|
|
| Johan Sorlin 2006-10-17, 1:21 pm |
| We use WeaklyTypedProperties on the LineItem and would like to use them for
some calculations in the PipeLine.
But there seem not to be any way to edit OrderPipeLineMappings.Xml to add
WeaklyTypedProperty mappings (as in OrderObjectMappings), or is there.
Or is it us not understanding HowTo reference the weaklytyped on the
LineItem value in the PipeLine?
If possible, could you give us a short example.
If not possible, what is the best procedure to handle theese properties in
the pipeline.
We actually both need to read and write to the weaklytyped properties. Is
that possible in the PipeLine?
We have noticed the SetPropertyOnOrderForms(Key,Value) method but it exist
only on orderform top level, no such functionality on LineItem level.
Regards Johan Sörlin, Sigma nBit AB, Sweden
| |
| Jeff Lynch 2006-10-17, 1:21 pm |
| Johan,
I don't "believe" you can acess the weakly-typed (indexer) properties in a
pipeline. You could extend the LineItem class and add these as
strongly-typed properties and then use them in your pipeline calculations.
--
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch
"Johan Sorlin" <JohanSorlin@discussions.microsoft.com> wrote in message
news:258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com...
> We use WeaklyTypedProperties on the LineItem and would like to use them
> for
> some calculations in the PipeLine.
> But there seem not to be any way to edit OrderPipeLineMappings.Xml to add
> WeaklyTypedProperty mappings (as in OrderObjectMappings), or is there.
>
> Or is it us not understanding HowTo reference the weaklytyped on the
> LineItem value in the PipeLine?
>
> If possible, could you give us a short example.
>
> If not possible, what is the best procedure to handle theese properties in
> the pipeline.
>
> We actually both need to read and write to the weaklytyped properties. Is
> that possible in the PipeLine?
>
> We have noticed the SetPropertyOnOrderForms(Key,Value) method but it exist
> only on orderform top level, no such functionality on LineItem level.
>
> Regards Johan Sörlin, Sigma nBit AB, Sweden
| |
| Nihit Kaul [MSFT] 2006-10-18, 7:28 pm |
| Johan,
You should be able to access WTPs in the pipeline - you do not need to do anything special to access these in the pipelines. Just reference them on the LineItem dictionary in the pipeline and you should have the
property.
Are you not seeing this behavior?
Thanks,
Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
--------------------
From: "Jeff Lynch" <jeff.lynch@newsgroup.nospam>
References: <258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com>
Subject: Re: PipeLine and LineItem WeaklyTyped properties
Date: Tue, 17 Oct 2006 07:15:10 -0500
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
Message-ID: <#J4lkXe8GHA.4996@TK2MSFTNGP03.phx.gbl>
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: cpe-66-25-9-101.houston.res.rr.com 66.25.9.101
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18717
X-Tomcat-NG: microsoft.public.commerceserver.general
Johan,
I don't "believe" you can acess the weakly-typed (indexer) properties in a
pipeline. You could extend the LineItem class and add these as
strongly-typed properties and then use them in your pipeline calculations.
--
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch
"Johan Sorlin" <JohanSorlin@discussions.microsoft.com> wrote in message
news:258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com...
> We use WeaklyTypedProperties on the LineItem and would like to use them
> for
> some calculations in the PipeLine.
> But there seem not to be any way to edit OrderPipeLineMappings.Xml to add
> WeaklyTypedProperty mappings (as in OrderObjectMappings), or is there.
>
> Or is it us not understanding HowTo reference the weaklytyped on the
> LineItem value in the PipeLine?
>
> If possible, could you give us a short example.
>
> If not possible, what is the best procedure to handle theese properties in
> the pipeline.
>
> We actually both need to read and write to the weaklytyped properties. Is
> that possible in the PipeLine?
>
> We have noticed the SetPropertyOnOrderForms(Key,Value) method but it exist
> only on orderform top level, no such functionality on LineItem level.
>
> Regards Johan Sörlin, Sigma nBit AB, Sweden
| |
| Jeff Lynch 2006-10-18, 7:28 pm |
| Oops! So how to you access these weakly typed properties in the pipeline?
What do they look like (item["something"])?
--
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch
"Nihit Kaul [MSFT]" <nihitk@online.microsoft.com> wrote in message
news:e7U5kkt8GHA.4348@TK2MSFTNGXA01.phx.gbl...
> Johan,
>
> You should be able to access WTPs in the pipeline - you do not need to do
> anything special to access these in the pipelines. Just reference them on
> the LineItem dictionary in the pipeline and you should have the
> property.
>
> Are you not seeing this behavior?
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --------------------
> From: "Jeff Lynch" <jeff.lynch@newsgroup.nospam>
> References: <258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com>
> Subject: Re: PipeLine and LineItem WeaklyTyped properties
> Date: Tue, 17 Oct 2006 07:15:10 -0500
> Lines: 37
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
> X-RFC2646: Format=Flowed; Original
> Message-ID: <#J4lkXe8GHA.4996@TK2MSFTNGP03.phx.gbl>
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: cpe-66-25-9-101.houston.res.rr.com 66.25.9.101
> Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
> Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18717
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Johan,
>
> I don't "believe" you can acess the weakly-typed (indexer) properties in a
> pipeline. You could extend the LineItem class and add these as
> strongly-typed properties and then use them in your pipeline calculations.
>
> --
> Jeff Lynch
> MVP Windows Server System - Commerce Server
> http://codebetter.com/blogs/jeff.lynch
>
>
> "Johan Sorlin" <JohanSorlin@discussions.microsoft.com> wrote in message
> news:258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com...
>
>
>
>
| |
|
| Hello Nihit,
I also would like to know how to access weakly typed properties in a
pipeline is it as Jeff mentioned above: lineItem["someProperty"] = somevalue;
??
Furthermore I am developing a custom pipeline component, it is a very simple
component that won't require to provide any visual form to specify value like
in "MinMaxShipping" pipeline component included in SDK folder of the commerce
server...
But I would like to know how to read variables/values specified by previous
components for example how can my pipeline read the
'item._product_cy_list_price' value ??
is it within the "Execute" procedure of the 'IPipelineComponent' like the
following:
int IPipelineComponent.Execute(object pdispOrder, object pdispContext, int
lFlags)
{
IDictionary Context = (IDictionary)pdispContext;
OrderContext myOrderContext =
(OrderContext)Context["item._product_cy_list_price"];
}
"Nihit Kaul [MSFT]" wrote:
> Johan,
>
> You should be able to access WTPs in the pipeline - you do not need to do anything special to access these in the pipelines. Just reference them on the LineItem dictionary in the pipeline and you should have the
> property.
>
> Are you not seeing this behavior?
>
> Thanks,
>
> Nihit Kaul[MSFT]
> Commerce Server
> http://blogs.msdn.com/nihitk
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
> --------------------
> From: "Jeff Lynch" <jeff.lynch@newsgroup.nospam>
> References: <258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com>
> Subject: Re: PipeLine and LineItem WeaklyTyped properties
> Date: Tue, 17 Oct 2006 07:15:10 -0500
> Lines: 37
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
> X-RFC2646: Format=Flowed; Original
> Message-ID: <#J4lkXe8GHA.4996@TK2MSFTNGP03.phx.gbl>
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: cpe-66-25-9-101.houston.res.rr.com 66.25.9.101
> Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
> Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18717
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> Johan,
>
> I don't "believe" you can acess the weakly-typed (indexer) properties in a
> pipeline. You could extend the LineItem class and add these as
> strongly-typed properties and then use them in your pipeline calculations.
>
> --
> Jeff Lynch
> MVP Windows Server System - Commerce Server
> http://codebetter.com/blogs/jeff.lynch
>
>
> "Johan Sorlin" <JohanSorlin@discussions.microsoft.com> wrote in message
> news:258032A8-405A-4246-A462-E8E4ADC791DF@microsoft.com...
>
>
>
>
|
|
|
|
|