New issue with opening an Order

Discussions related to custom development with Select.
Post Reply
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

New issue with opening an Order

Post by roteague »

I've got an issue trying to open an order programmatically. The error seems to be coming from the Business Rules engine. The .rules file is in the directory, as is the default SoftPro.BusinessRules.Core.dll. The directory contains all the .dll files from the Select install (including subdirectories).

The details are as follows:

SoftPro.BusinessRules.Core.dll ver 2.4.30715.99
Windows Server 2003 x64

Code: Select all

Error: 
System.Exception: Error executing business rule 'SoftPro.BusinessRules.Core.PayeeAggregator'
Inputs:
	1. 
	2. True
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Error executing business rule 'SoftPro.BusinessRules.Core.DefaultHudLine'
Inputs:
	1. 
	2. 
	3. 
	4. 
	5. 
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Error executing business rule 'SoftPro.BusinessRules.Core.OrderFirstHud'
Inputs:
	1. 
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ObjectDisposedException: Trying to get data from a disposed business object!
Object name: 'Order.HUDs'.
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataValue(String dataItemName)
   at SoftPro.BusinessObjects.Base.Engine.GetDependencyValues(DataItemReference dataItem, IBusinessObject start, List`1& dependencies, Int32& maxChildrenFound)
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.LookupValue()
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.get_Value()
   at SoftPro.BusinessRules.Core.OrderFirstHud.ExecuteImpl(InputParameterHandle`1 huds)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   --- End of inner exception stack trace ---
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   at SoftPro.BusinessObjects.Base.Engine.GetRuleDataValue(IBusinessObject businessObject, String ruleInstanceName, Object potentialNewValue)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.FulfillDataItemNormally(Dependency depItem, DataValue sourceItem)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataValue(String dataItemName)
   at SoftPro.BusinessObjects.Base.Engine.WalkPathToLeafObjects(PathStep[] path, IBusinessObject startContext, IBusinessObject[]& foundObjects, List`1& valsEncountered, Int32& maxChildrenFound)
   at SoftPro.BusinessObjects.Base.Engine.GetDependencyValues(DataItemReference dataItem, IBusinessObject start, List`1& dependencies, Int32& maxChildrenFound)
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.LookupValue()
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.get_Value()
   at SoftPro.BusinessRules.Core.DefaultHudLine.ExecuteImpl(InputParameterHandle`1 hudToMatch, InputParameterHandle`1 lineNumberToMatch, InputParameterHandle`1 huds, InputParameterHandle`1 lineNumbers, InputParameterHandle`1 lines)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   --- End of inner exception stack trace ---
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   at SoftPro.BusinessObjects.Base.Engine.GetRuleDataValue(IBusinessObject businessObject, String ruleInstanceName, Object potentialNewValue)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.FulfillDataItemNormally(Dependency depItem, DataValue sourceItem)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataValue(String dataItemName)
   at SoftPro.BusinessObjects.Base.HUDLineEngine.GetHudItemsFor(IHudLine line, List`1& dependencies)
   at SoftPro.BusinessObjects.Base.Engine.GetRuleDataValue(IBusinessObject businessObject, String ruleInstanceName, Object potentialNewValue)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.FulfillDataItemNormally(Dependency depItem, DataValue sourceItem)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataValue(String dataItemName)
   at SoftPro.BusinessObjects.Base.Engine.WalkPathToLeafObjects(PathStep[] path, IBusinessObject startContext, IBusinessObject[]& foundObjects, List`1& valsEncountered, Int32& maxChildrenFound)
   at SoftPro.BusinessObjects.Base.Engine.GetDependencyValues(DataItemReference dataItem, IBusinessObject start, List`1& dependencies, Int32& maxChildrenFound)
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.LookupValue()
   at SoftPro.BusinessObjects.Base.InputParameterHandle`1.get_Value()
   at SoftPro.BusinessRules.Core.PayeeAggregator.ExecuteImpl(InputParameterHandle`1 payeeColls, InputParameterHandle`1 isCreditDebit)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   --- End of inner exception stack trace ---
   at SoftPro.BusinessRules.Base.BusinessRuleBase.Execute(Object[] inputs, ExecutionInfo ruleInfo)
   at SoftPro.BusinessObjects.Base.Engine.GetRuleDataValue(IBusinessObject businessObject, String ruleInstanceName, Object potentialNewValue)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.FulfillDataItemNormally(Dependency depItem, DataValue sourceItem)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataValue(String dataItemName)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.GetDataItem(String dataItemName)
   at SoftPro.BusinessObjects.Base.Engine.ReleaseCalculatedChildRequests()
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.RequestCalculatedChildren()
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.Load(Guid primaryID, ContextRoot rootContext)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.GetBusinessObject(String contextName, Guid primaryKey, ContextRoot rootContext, Boolean allowDisambiguation, SqlDataReader openReader, Boolean allowLoad, Boolean loadingAsCopy, Boolean acquiringRoot, Guid idForNewObject)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.GetBusinessObject(String contextName, Guid primaryKey, ContextRoot rootContext)
   at SoftPro.BusinessObjects.Base.BusinessObjectBase.InternalLoad(Guid primaryID, ContextRoot rootContext, Dictionary`2 values, Byte[]& mergedIDs, Byte[]& userEnteredFlags, Boolean& foundIDs, StringBuilder& errors, Hashtable& nonBaseFieldsFound, Byte[]& sources, String& formulaData, String& customFields)
. 
And the Stack Trace:

Code: Select all

Stack Trace:    at SoftPro.BusinessObjects.Base.BusinessObjectBase.Load(Guid primaryID, ContextRoot rootContext)
   at SoftPro.BusinessObjects.Core.Order.Load(Guid primaryID, ContextRoot rootContext)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.GetBusinessObject(String contextName, Guid primaryKey, ContextRoot rootContext, Boolean allowDisambiguation, SqlDataReader openReader, Boolean allowLoad, Boolean loadingAsCopy, Boolean acquiringRoot, Guid idForNewObject)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.GetRootObject(String contextName, Guid primaryKey, ContextRoot rootContext, Boolean loadingAsCopy)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.AcquireRootReference(String contextName, Guid primaryKey, Boolean loadAsCopy)
   at SoftPro.BusinessObjects.Base.BusinessObjectCache.AcquireRootReference(String contextName, Guid primaryKey)
   at SoftPro.OrderTracking.Client.OrderTracking.OpenOrderObject(Guid id)
   at SoftPro.OrderTracking.Client.OrderTracking.OpenOrder(Guid id, Boolean readOnly, Boolean isTemplate)
   at SoftPro.OrderTracking.Client.OrderTracking.GetOrderOrTemplate(OrderQuerySpec spec, Boolean readOnly, Boolean isTemplate)
   at SoftPro.OrderTracking.Client.OrderTracking.GetOrder(OrderQuerySpec spec, Boolean readOnly)
   at TG.SoftPro.LoadOrderActivity
Any help on this would be appreciated.

Thanks,
Robert
Mark McKenna

Re: New issue with opening an Order

Post by Mark McKenna »

Does this only occur on one particular order, or is it something you're seeing across orders? Also, can the order(s) in question be opened from within Select successfully?
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: New issue with opening an Order

Post by roteague »

Mark,

Sorry about taking so long to get back to you. I rewrote the entire module, and the error is no longer happening.
Robert
Post Reply