|
Home > Archive > Commerce Server General > August 2004 > Pipeline Execution Failure - Commerce.Scriptor.1
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 Execution Failure - Commerce.Scriptor.1
|
|
| Nick Simpson 2004-08-10, 7:53 am |
| I get the following error message in the Event Log when we run a particular Commerce Server 2002 pipeline on our site:
Pipeline Error: Component Execution failed for component[0x2] hr: 0x80020003
ProgID: Commerce.Scriptor.1
MscsExecute() failed.
Script invocation failed.
Member not found.
This error only occurs when the site has been running for about twelve hours or so usually when memory usage is at near or over 1GB. Not sure what to do except maybe to explicitly test whether the parameters passed to MSCSExecute are null, and if necessary try something like that fro each of the keys in the order form. "Member not found" is all well and good but which member??
There are two scriptors in the pipeline. The code from the first:
<CODE>
Function MSCSExecute(config, orderform, context, flags)
MSCSExecute = 1
'Compute item total by iterating thru items first..
Dim item
Dim cy_item_total
cy_item_total = 0
For Each item In orderform.value("items")
cy_item_total = cy_item_total + (item.value("quantity") * item.value("_cy_iadjust_currentprice"))
Next
orderform.value("saved_cy_subtotal") = cy_item_total
' get total discounts now..
orderform.value("saved_cy_discounts_total") = cy_item_total - orderform.value("_cy_oadjust_subtotal")
End Function
</CODE>
The code from the second:
<CODE>
' This script also copies some information from the user and org profile so that it can be searched.
' This is written in Scriptor so you can easily augment and see this functionality. You can take this out
' or rewrite into VB/C++ for additional performance
Function MSCSExecute(config, orderform, context, flags)
Dim objProfileService, address_id, logon_name, objUserProfile, org_id, objOrgProfile, objShippingProfile
MSCSExecute = 1
'Copy some lineitem-level fields
Dim item
For Each item In orderform.value("items")
item.value("cy_unit_price") = item.value("_cy_iadjust_regularprice")
item.value("cy_lineitem_total") = item.value("_cy_oadjust_adjustedprice")
item.value("description") = Mid(item.value("_product_description"), 1, 127)
item.value("saved_product_name") = item.value("_product_name")
item.value("mr_billing_total") = item.mr_billing_total
item.value("mr_billing_unit_total") = item.mr_billing_unit_total
Next
'Copy some orderform-level fields
'These two lines can be commented out If it is not desired to save discount information
'with the orders or If the discounting components are not used.
orderform.value("saved_cy_oadjust_subtotal") = orderform.value("_cy_oadjust_subtotal")
orderform.value("saved_cy_total_total") = orderform.value("_cy_total_total")
' Copy discount information
Call CopyDiscountFields(OrderForm)
'CopyShippingDiscountFields(orderForm)
'orderform.Value("mr_ics_rcode") = "1"
' ****************************************
**********
' Copy some fields from the user profile
' ****************************************
**********
' Get the ProfileService from the context
If Not IsObject(context.ProfileService) Then Exit Function
Set objProfileService = context.ProfileService
If objProfileService Is Nothing Then Exit Function
' Get the user's profile
logon_name = orderform.logon_name
If IsNull(logon_name) Then Exit Function
Set objUserProfile = objProfileService.GetProfileByKey("GeneralInfo.logon_name", logon_name, "UserObject", False)
If objUserProfile Is Nothing Then Exit Function
' Copy some user fields
orderform.Value("user_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("user_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("user_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("user_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
orderform.Value("receiver_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("receiver_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("receiver_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("receiver_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
End Function
' New for CS2002
' Detailed information is written into the OrderForm about all shipping discounts.
' This subroutine captures shipping discount information for persistent storage with orders.
'
Sub CopyShippingDiscountFields(orderForm)
Dim shipments ' SimpleList of shipments in the basket
Dim shipment ' An shipment dictionary from the list
' _shipping_discount_description :
' This value was written and saved by CS40 and so has been carried forward. But now that multiple shipping
' discounts can apply to the order, it can contain invalid data If more more than one shipping discount was
' applied. New code should rely on 'saved_shipping_discounts_applied' instead.
' This value is written by OrderDiscount as a backward compatability feature.
orderForm.value("saved_shipping_discount_description") = orderform.value("_shipping_discount_description")
' Save shipping discounts for each shipment (as written by ShippingDiscountAdjust)
If not isNull(orderForm.Value("shipments")) then
Set shipments = orderForm.Value("shipments")
For Each shipment in shipments
If not isNull(shipment.value("_shipping_discounts_applied")) then
set shipment.value("saved_shipping_discounts_applied") = shipment.value("_shipping_discounts_applied")
End If
shipment.value("saved_cy_shipping_discounts_subtotal") = shipment.value("_cy_shipping_discounts_subtotal")
Next
End If
' Save any shipping discount applied at the OrderForm level, e.g. If Splitter is not used
If not isNull(orderForm.value("_shipping_discounts_applied")) then
set orderForm.value("saved_shipping_discounts_applied") = orderForm.value("_shipping_discounts_applied")
End If
' Save the total amount of shipping discount
orderForm.Value("saved_cy_shipping_discounts_total") = orderForm.value("_cy_shipping_discounts_total")
End Sub
</CODE>
| |
| Nick Simpson 2004-08-10, 5:52 pm |
| More info on the error message.
Message: Unspecified error
(orderform=default)
Source: mscorlib
TargetSite: Void Raise(Int32, System.Object, System.Object, System.Object, System.Object)
StackTrace: at Microsoft.VisualBasic.ErrObject.Raise(Int32 Number, Object Source, Object Description, Object HelpFile, Object HelpContext)
at Microsoft.CommerceServer.Interop.Orders.MTSHelperImpl.RunPipesHelper(String strPCF, String strPipelineProgID, IDictionary OrderGroupData, IDictionary oContext, String LogFile)
at Microsoft.CommerceServer.Interop.Orders.PrivateOrderGroupMtsHelperFreeThreaded.RunPipes(String strPCF, String strPipelineProgID, Object OrderGroupData, IDictionary oContext, String LogFile)
"Nick Simpson" <nick.simpson@musicsales.co.uk> wrote in message news:1092133949.18154.0@spandrell.news.uk.clara.net...
I get the following error message in the Event Log when we run a particular Commerce Server 2002 pipeline on our site:
Pipeline Error: Component Execution failed for component[0x2] hr: 0x80020003
ProgID: Commerce.Scriptor.1
MscsExecute() failed.
Script invocation failed.
Member not found.
This error only occurs when the site has been running for about twelve hours or so usually when memory usage is at near or over 1GB. Not sure what to do except maybe to explicitly test whether the parameters passed to MSCSExecute are null, and if necessary try something like that fro each of the keys in the order form. "Member not found" is all well and good but which member??
There are two scriptors in the pipeline. The code from the first:
<CODE>
Function MSCSExecute(config, orderform, context, flags)
MSCSExecute = 1
'Compute item total by iterating thru items first..
Dim item
Dim cy_item_total
cy_item_total = 0
For Each item In orderform.value("items")
cy_item_total = cy_item_total + (item.value("quantity") * item.value("_cy_iadjust_currentprice"))
Next
orderform.value("saved_cy_subtotal") = cy_item_total
' get total discounts now..
orderform.value("saved_cy_discounts_total") = cy_item_total - orderform.value("_cy_oadjust_subtotal")
End Function
</CODE>
The code from the second:
<CODE>
' This script also copies some information from the user and org profile so that it can be searched.
' This is written in Scriptor so you can easily augment and see this functionality. You can take this out
' or rewrite into VB/C++ for additional performance
Function MSCSExecute(config, orderform, context, flags)
Dim objProfileService, address_id, logon_name, objUserProfile, org_id, objOrgProfile, objShippingProfile
MSCSExecute = 1
'Copy some lineitem-level fields
Dim item
For Each item In orderform.value("items")
item.value("cy_unit_price") = item.value("_cy_iadjust_regularprice")
item.value("cy_lineitem_total") = item.value("_cy_oadjust_adjustedprice")
item.value("description") = Mid(item.value("_product_description"), 1, 127)
item.value("saved_product_name") = item.value("_product_name")
item.value("mr_billing_total") = item.mr_billing_total
item.value("mr_billing_unit_total") = item.mr_billing_unit_total
Next
'Copy some orderform-level fields
'These two lines can be commented out If it is not desired to save discount information
'with the orders or If the discounting components are not used.
orderform.value("saved_cy_oadjust_subtotal") = orderform.value("_cy_oadjust_subtotal")
orderform.value("saved_cy_total_total") = orderform.value("_cy_total_total")
' Copy discount information
Call CopyDiscountFields(OrderForm)
'CopyShippingDiscountFields(orderForm)
'orderform.Value("mr_ics_rcode") = "1"
' ****************************************
**********
' Copy some fields from the user profile
' ****************************************
**********
' Get the ProfileService from the context
If Not IsObject(context.ProfileService) Then Exit Function
Set objProfileService = context.ProfileService
If objProfileService Is Nothing Then Exit Function
' Get the user's profile
logon_name = orderform.logon_name
If IsNull(logon_name) Then Exit Function
Set objUserProfile = objProfileService.GetProfileByKey("GeneralInfo.logon_name", logon_name, "UserObject", False)
If objUserProfile Is Nothing Then Exit Function
' Copy some user fields
orderform.Value("user_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("user_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("user_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("user_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
orderform.Value("receiver_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("receiver_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("receiver_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("receiver_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
End Function
' New for CS2002
' Detailed information is written into the OrderForm about all shipping discounts.
' This subroutine captures shipping discount information for persistent storage with orders.
'
Sub CopyShippingDiscountFields(orderForm)
Dim shipments ' SimpleList of shipments in the basket
Dim shipment ' An shipment dictionary from the list
' _shipping_discount_description :
' This value was written and saved by CS40 and so has been carried forward. But now that multiple shipping
' discounts can apply to the order, it can contain invalid data If more more than one shipping discount was
' applied. New code should rely on 'saved_shipping_discounts_applied' instead.
' This value is written by OrderDiscount as a backward compatability feature.
orderForm.value("saved_shipping_discount_description") = orderform.value("_shipping_discount_description")
' Save shipping discounts for each shipment (as written by ShippingDiscountAdjust)
If not isNull(orderForm.Value("shipments")) then
Set shipments = orderForm.Value("shipments")
For Each shipment in shipments
If not isNull(shipment.value("_shipping_discounts_applied")) then
set shipment.value("saved_shipping_discounts_applied") = shipment.value("_shipping_discounts_applied")
End If
shipment.value("saved_cy_shipping_discounts_subtotal") = shipment.value("_cy_shipping_discounts_subtotal")
Next
End If
' Save any shipping discount applied at the OrderForm level, e.g. If Splitter is not used
If not isNull(orderForm.value("_shipping_discounts_applied")) then
set orderForm.value("saved_shipping_discounts_applied") = orderForm.value("_shipping_discounts_applied")
End If
' Save the total amount of shipping discount
orderForm.Value("saved_cy_shipping_discounts_total") = orderForm.value("_cy_shipping_discounts_total")
End Sub
</CODE>
| |
| Israel Vega 2004-08-19, 2:48 am |
| Silly question, but have you turned on the pipeline logging to trace which step is failing? Sometimes you can the step in the log and it says something like "Failed" after the component that failed. Also, are you running pooled pipelines (the COM+ applications)?
"Nick Simpson" <nick.simpson@musicsales.co.uk> wrote in message news:1092153354.30440.0@dyke.uk.clara.net...
More info on the error message.
Message: Unspecified error
(orderform=default)
Source: mscorlib
TargetSite: Void Raise(Int32, System.Object, System.Object, System.Object, System.Object)
StackTrace: at Microsoft.VisualBasic.ErrObject.Raise(Int32 Number, Object Source, Object Description, Object HelpFile, Object HelpContext)
at Microsoft.CommerceServer.Interop.Orders.MTSHelperImpl.RunPipesHelper(String strPCF, String strPipelineProgID, IDictionary OrderGroupData, IDictionary oContext, String LogFile)
at Microsoft.CommerceServer.Interop.Orders.PrivateOrderGroupMtsHelperFreeThreaded.RunPipes(String strPCF, String strPipelineProgID, Object OrderGroupData, IDictionary oContext, String LogFile)
"Nick Simpson" <nick.simpson@musicsales.co.uk> wrote in message news:1092133949.18154.0@spandrell.news.uk.clara.net...
I get the following error message in the Event Log when we run a particular Commerce Server 2002 pipeline on our site:
Pipeline Error: Component Execution failed for component[0x2] hr: 0x80020003
ProgID: Commerce.Scriptor.1
MscsExecute() failed.
Script invocation failed.
Member not found.
This error only occurs when the site has been running for about twelve hours or so usually when memory usage is at near or over 1GB. Not sure what to do except maybe to explicitly test whether the parameters passed to MSCSExecute are null, and if necessary try something like that fro each of the keys in the order form. "Member not found" is all well and good but which member??
There are two scriptors in the pipeline. The code from the first:
<CODE>
Function MSCSExecute(config, orderform, context, flags)
MSCSExecute = 1
'Compute item total by iterating thru items first..
Dim item
Dim cy_item_total
cy_item_total = 0
For Each item In orderform.value("items")
cy_item_total = cy_item_total + (item.value("quantity") * item.value("_cy_iadjust_currentprice"))
Next
orderform.value("saved_cy_subtotal") = cy_item_total
' get total discounts now..
orderform.value("saved_cy_discounts_total") = cy_item_total - orderform.value("_cy_oadjust_subtotal")
End Function
</CODE>
The code from the second:
<CODE>
' This script also copies some information from the user and org profile so that it can be searched.
' This is written in Scriptor so you can easily augment and see this functionality. You can take this out
' or rewrite into VB/C++ for additional performance
Function MSCSExecute(config, orderform, context, flags)
Dim objProfileService, address_id, logon_name, objUserProfile, org_id, objOrgProfile, objShippingProfile
MSCSExecute = 1
'Copy some lineitem-level fields
Dim item
For Each item In orderform.value("items")
item.value("cy_unit_price") = item.value("_cy_iadjust_regularprice")
item.value("cy_lineitem_total") = item.value("_cy_oadjust_adjustedprice")
item.value("description") = Mid(item.value("_product_description"), 1, 127)
item.value("saved_product_name") = item.value("_product_name")
item.value("mr_billing_total") = item.mr_billing_total
item.value("mr_billing_unit_total") = item.mr_billing_unit_total
Next
'Copy some orderform-level fields
'These two lines can be commented out If it is not desired to save discount information
'with the orders or If the discounting components are not used.
orderform.value("saved_cy_oadjust_subtotal") = orderform.value("_cy_oadjust_subtotal")
orderform.value("saved_cy_total_total") = orderform.value("_cy_total_total")
' Copy discount information
Call CopyDiscountFields(OrderForm)
'CopyShippingDiscountFields(orderForm)
'orderform.Value("mr_ics_rcode") = "1"
' ****************************************
**********
' Copy some fields from the user profile
' ****************************************
**********
' Get the ProfileService from the context
If Not IsObject(context.ProfileService) Then Exit Function
Set objProfileService = context.ProfileService
If objProfileService Is Nothing Then Exit Function
' Get the user's profile
logon_name = orderform.logon_name
If IsNull(logon_name) Then Exit Function
Set objUserProfile = objProfileService.GetProfileByKey("GeneralInfo.logon_name", logon_name, "UserObject", False)
If objUserProfile Is Nothing Then Exit Function
' Copy some user fields
orderform.Value("user_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("user_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("user_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("user_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
orderform.Value("receiver_first_name") = objUserProfile.Fields.Item("GeneralInfo.first_name")
orderform.Value("receiver_last_name") = objUserProfile.Fields.Item("GeneralInfo.last_name")
orderform.Value("receiver_email_address") = objUserProfile.Fields.Item("GeneralInfo.email_address")
orderform.Value("receiver_tel_number") = objUserProfile.Fields.Item("GeneralInfo.tel_number")
End Function
' New for CS2002
' Detailed information is written into the OrderForm about all shipping discounts.
' This subroutine captures shipping discount information for persistent storage with orders.
'
Sub CopyShippingDiscountFields(orderForm)
Dim shipments ' SimpleList of shipments in the basket
Dim shipment ' An shipment dictionary from the list
' _shipping_discount_description :
' This value was written and saved by CS40 and so has been carried forward. But now that multiple shipping
' discounts can apply to the order, it can contain invalid data If more more than one shipping discount was
' applied. New code should rely on 'saved_shipping_discounts_applied' instead.
' This value is written by OrderDiscount as a backward compatability feature.
orderForm.value("saved_shipping_discount_description") = orderform.value("_shipping_discount_description")
' Save shipping discounts for each shipment (as written by ShippingDiscountAdjust)
If not isNull(orderForm.Value("shipments")) then
Set shipments = orderForm.Value("shipments")
For Each shipment in shipments
If not isNull(shipment.value("_shipping_discounts_applied")) then
set shipment.value("saved_shipping_discounts_applied") = shipment.value("_shipping_discounts_applied")
End If
shipment.value("saved_cy_shipping_discounts_subtotal") = shipment.value("_cy_shipping_discounts_subtotal")
Next
End If
' Save any shipping discount applied at the OrderForm level, e.g. If Splitter is not used
If not isNull(orderForm.value("_shipping_discounts_applied")) then
set orderForm.value("saved_shipping_discounts_applied") = orderForm.value("_shipping_discounts_applied")
End If
' Save the total amount of shipping discount
orderForm.Value("saved_cy_shipping_discounts_total") = orderForm.value("_cy_shipping_discounts_total")
End Sub
</CODE>
|
|
|
|
|