Template Automation "Error while committing context:Error: Object reference not set to an instance of an object."
Posted: Thu Dec 13, 2018 6:21 pm
I have 2 automation processes I just rolled out I am running in to an issue with. The processes are applying templates (process applies one template, both processes are applying different templates) that contains a few order contacts and charges on CDF Page 2. So far the automation process completes successfully on 1/2 the orders. The other 1/2 of the orders it is failing. Below are copies of the 2 different error messages from the event viewer. There are other buggy things with template automation, but I have found workarounds for all of them so far. We are on Select Version 4.3.60108.11
Any help you could offer with how to troubleshoot and fix would be a great help.
///////
Error 1:
Error while committing context:Error: Object reference not set to an instance of an object.
Stack Trace:
at SoftPro.Select.Client.Profiles.ClosestAncestorProfileSearch..ctor(IProfileInfo profile)
at SoftPro.Accounting.Client.Transactions.TransactionManagerUtils.GetTrustAccountingDateTime(IServiceProvider site, DateTime datetime)
at SoftPro.Accounting.Server.Transactions.TransactionsManager.Delete(String reason, ITransaction[] transactions)
at SoftPro.Register.Server.RegisterAgent.SaveTransactions(Boolean orderSaving, Boolean orderDirty, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& unapproveLedger)
at SoftPro.Register.Server.RegisterAgent.Save(Boolean orderSaving, Boolean unapproveLedger, Boolean& orderChanged, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& ledgerChanged)
at SoftPro.Register.Server.RegisterAgent.HandleOrderSave(IOrder order, Boolean ledgerSaving, List`1& errors)
at SoftPro.Register.Server.Package.OrderSaving(Object sender, OrderSavingEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at SoftPro.OrderTracking.Server.Orders.OrderStore.InvokeOrderSaving(IOrder order, Lazy`1 previousOrder, Dictionary`2 attributes)
at SoftPro.OrderTracking.Server.Orders.OrderStore.ApplyChangesInternal(OrderIdentifier id, Func`1 orderCallback, Func`1 previousOrderCallback, Boolean remoteCall, Dictionary`2 attributes, Dictionary`2& attachments, IOrder& order, Watermark& watermark)
at SoftPro.OrderTracking.Server.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.ApplyChanges(IOrder order)
at SoftPro.OrderTracking.Server.Orders.Automation.OrderItemProcessContextProvider`1.OnCommit(T context)
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceContextExtension.CommitAll()
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceWorker.CommitAllContexts()
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceWorker.WorkflowApplication_Completed(WorkflowApplicationCompletedEventArgs args)
////////
Error 2:
Error: Object reference not set to an instance of an object.
Stack Trace:
at SoftPro.Select.Client.Profiles.ClosestAncestorProfileSearch..ctor(IProfileInfo profile)
at SoftPro.Accounting.Client.Transactions.TransactionManagerUtils.GetTrustAccountingDateTime(IServiceProvider site, DateTime datetime)
at SoftPro.Accounting.Server.Transactions.TransactionsManager.Delete(String reason, ITransaction[] transactions)
at SoftPro.Register.Server.RegisterAgent.SaveTransactions(Boolean orderSaving, Boolean orderDirty, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& unapproveLedger)
at SoftPro.Register.Server.RegisterAgent.Save(Boolean orderSaving, Boolean unapproveLedger, Boolean& orderChanged, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& ledgerChanged)
at SoftPro.Register.Server.RegisterAgent.HandleOrderSave(IOrder order, Boolean ledgerSaving, List`1& errors)
Any help you could offer with how to troubleshoot and fix would be a great help.
///////
Error 1:
Error while committing context:Error: Object reference not set to an instance of an object.
Stack Trace:
at SoftPro.Select.Client.Profiles.ClosestAncestorProfileSearch..ctor(IProfileInfo profile)
at SoftPro.Accounting.Client.Transactions.TransactionManagerUtils.GetTrustAccountingDateTime(IServiceProvider site, DateTime datetime)
at SoftPro.Accounting.Server.Transactions.TransactionsManager.Delete(String reason, ITransaction[] transactions)
at SoftPro.Register.Server.RegisterAgent.SaveTransactions(Boolean orderSaving, Boolean orderDirty, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& unapproveLedger)
at SoftPro.Register.Server.RegisterAgent.Save(Boolean orderSaving, Boolean unapproveLedger, Boolean& orderChanged, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& ledgerChanged)
at SoftPro.Register.Server.RegisterAgent.HandleOrderSave(IOrder order, Boolean ledgerSaving, List`1& errors)
at SoftPro.Register.Server.Package.OrderSaving(Object sender, OrderSavingEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at SoftPro.OrderTracking.Server.Orders.OrderStore.InvokeOrderSaving(IOrder order, Lazy`1 previousOrder, Dictionary`2 attributes)
at SoftPro.OrderTracking.Server.Orders.OrderStore.ApplyChangesInternal(OrderIdentifier id, Func`1 orderCallback, Func`1 previousOrderCallback, Boolean remoteCall, Dictionary`2 attributes, Dictionary`2& attachments, IOrder& order, Watermark& watermark)
at SoftPro.OrderTracking.Server.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.ApplyChanges(IOrder order)
at SoftPro.OrderTracking.Server.Orders.Automation.OrderItemProcessContextProvider`1.OnCommit(T context)
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceContextExtension.CommitAll()
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceWorker.CommitAllContexts()
at SoftPro.Select.Server.Automation.Runtime.XamlWorkflowInstanceWorker.WorkflowApplication_Completed(WorkflowApplicationCompletedEventArgs args)
////////
Error 2:
Error: Object reference not set to an instance of an object.
Stack Trace:
at SoftPro.Select.Client.Profiles.ClosestAncestorProfileSearch..ctor(IProfileInfo profile)
at SoftPro.Accounting.Client.Transactions.TransactionManagerUtils.GetTrustAccountingDateTime(IServiceProvider site, DateTime datetime)
at SoftPro.Accounting.Server.Transactions.TransactionsManager.Delete(String reason, ITransaction[] transactions)
at SoftPro.Register.Server.RegisterAgent.SaveTransactions(Boolean orderSaving, Boolean orderDirty, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& unapproveLedger)
at SoftPro.Register.Server.RegisterAgent.Save(Boolean orderSaving, Boolean unapproveLedger, Boolean& orderChanged, Boolean& transactionsListChanged, Boolean& transactionChanged, Boolean& ledgerChanged)
at SoftPro.Register.Server.RegisterAgent.HandleOrderSave(IOrder order, Boolean ledgerSaving, List`1& errors)