Sorry if I start posting a bunch over the coming months. We are going to be upgrading to the latest Kinetic version!!! Trying to keep all customization the same, not jumping to the “Browser” version just yet.
Anyway. trying to debug a BPM issue. The BPM is using widgets and the few validation errors that they were causing are now cleaned up. think I have it narrowed down few widgets, just need to see the code.
Need some help finding the needle in haystack from the following error message. How do I see the BPM that the inner exception section is referencing. Is there a way to see the BPM code on the server? Think I missed on how to set up the server to maintain those files like 10.2.600 did.
<Exception><![CDATA[Ice.Common.EpicorServerException: BPM runtime caught an unexpected exception of 'NullReferenceException' type.
See more info in the Inner Exception section of Exception Details.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Erp.Services.BO.HelpDeskSvc.HDCaseBeforeUpdate() in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDesk.cs:line 5225
at Ice.Services.Trace.TablesetProfilingCollector.DoRowEventTrace(String tableName, String methodName, Int32 rowCount, Action action) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 116
at Ice.TablesetBound`3.UpdateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow updatedRow, IceRow originalRow, IColumnUncensor uncensor, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1269
at Ice.TablesetBound`3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 955
at Ice.TablesetBound`3.InnerUpdate[TUpdater](IceDataContext dataContext, TFullTableset tableset) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 875
at Erp.Services.BO.HelpDeskSvc.Update(HelpDeskTableset& ds) in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDesk.Designer.cs:line 2596
at Epicor.Customization.Bpm.BO.UpdateImpl.ExecuteBase(UpdateParameters parameters)
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.RunDirectives(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 177
at Epicor.Customization.Bpm.CustomizationBase2`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 98
at Epicor.Customization.Bpm.BO.HelpDeskSvcCustomization.Update(HelpDeskTableset& ds)
at Erp.Services.BO.HelpDeskSvcFacade.Update(HelpDeskTableset& ds) in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDeskSvcFacade.cs:line 4509
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_Hydra_Case_RMA_AB_C12B9F03A57F4F64856287872E9BDAEB.<A040_InvokeBOMethodAction2>b__74_0(HelpDeskSvcContract bo)
at Epicor.Customization.Bpm.DirectiveBase`2.CallService[TService](Action`1 action) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.Plugins.cs:line 362
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_Hydra_Case_RMA_AB_C12B9F03A57F4F64856287872E9BDAEB.A040_InvokeBOMethodAction2()
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_Hydra_Case_RMA_AB_C12B9F03A57F4F64856287872E9BDAEB.ExecuteCore(Int32 step)
at Epicor.Customization.Bpm.DirectiveBase`2.Execute() in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 330
at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 222
--- End of inner exception stack trace ---
at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 222
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.<>c__DisplayClass11_0.<RunDirectives>b__3(MethodDirectiveBase`2 dir) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 135
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.RunDirectives(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 0
at Epicor.Customization.Bpm.CustomizationBase2`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 98
at Epicor.Customization.Bpm.BO.UD08SvcCustomization.Update(UD08Tableset& ds)
at Ice.Services.BO.UD08SvcFacade.Update(UD08Tableset& ds) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\BO\UD08\UD08SvcFacade.cs:line 481
at Ice.Controllers.BO.UD08Controller.Update(Update_InputModel model) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\BO\UD08\Generated\UD08Controller.cs:line 187
at lambda_method1768235(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()]]></Exception>
I guess the widgets in UD08 directive call use the HelpDesk object. It looks like something is getting passed as null. There are a lot of times where ttTableName bit us in the past. May want to review any variables to make sure that’s not it.
@knash If you check debug mode it compiles differently and drops the source in your
Server\BPM\Sources(BO, Dt or UBAQ) directory. On every save you will get a new folder.
There are only a few widgets.
GetByID the HDCase
set field shortchar01 to a value.
set field rowmod = “U”
Update HDCase
Then the error occurs.
Description: BPM runtime caught an unexpected exception of 'NullReferenceException' type.
See more info in the Inner Exception section of Exception Details.
Program: Erp.Services.BO.HelpDesk.dll
Method: HDCaseBeforeUpdate
Line Number: 5225
Column Number: 21
Original Exception Type: NullReferenceException
How do I debug the HDCaseBeforeUpdate? That isn’t a method that is exposed in the BPM editor.
What could be null? I am tempted to install the latest service pack to see if .8 is the issue.
The exception will be in the event viewer on your dev app server. Sometimes, but not often there will be a nugget in there that will lead you to the issue.
Good Suggestion. The event viewer is telling me the same thing that the code in the BPM is causing an error. This is an Epicor Widget, I would think that this should just work.
Ice.Common.EpicorServerException: BPM runtime caught an unexpected exception of 'NullReferenceException' type.
See more info in the Inner Exception section of Exception Details.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Erp.Services.BO.HelpDeskSvc.HDCaseBeforeUpdate() in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDesk.cs:line 5225
at Ice.Services.Trace.TablesetProfilingCollector.DoRowEventTrace(String tableName, String methodName, Int32 rowCount, Action action) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 116
at Ice.TablesetBound`3.UpdateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow updatedRow, IceRow originalRow, IColumnUncensor uncensor, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1269
at Ice.TablesetBound`3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 955
at Ice.TablesetBound`3.InnerUpdate[TUpdater](IceDataContext dataContext, TFullTableset tableset) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 875
at Erp.Services.BO.HelpDeskSvc.Update(HelpDeskTableset& ds) in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDesk.Designer.cs:line 2596
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.RunDirectives(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 177
at Epicor.Customization.Bpm.CustomizationBase2`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 98
at Epicor.Customization.Bpm.BO.HelpDeskSvcCustomization.Update(HelpDeskTableset& ds)
at Erp.Services.BO.HelpDeskSvcFacade.Update(HelpDeskTableset& ds) in C:\_releases\ERP\ERP11.2.200.0\Source\Server\Services\BO\HelpDesk\HelpDeskSvcFacade.cs:line 4509
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_updateCaseData_1465953EA9774AFD90A3C82A95333C50.<A004_InvokeBOMethodAction2>b__15_0(HelpDeskSvcContract bo) in Update.Pre.updateCaseData.cs:line 142
at Epicor.Customization.Bpm.DirectiveBase`2.CallService[TService](Action`1 action) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.Plugins.cs:line 362
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_updateCaseData_1465953EA9774AFD90A3C82A95333C50.A004_InvokeBOMethodAction2() in Update.Pre.updateCaseData.cs:line 139
at Epicor.Customization.Bpm.BO.UpdatePreProcessingDirective_updateCaseData_1465953EA9774AFD90A3C82A95333C50.ExecuteCore(Int32 step) in Update.Pre.updateCaseData.cs:line 87
at Epicor.Customization.Bpm.DirectiveBase`2.Execute() in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 330
at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 222
--- End of inner exception stack trace ---
at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 222
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.<>c__DisplayClass11_0.<RunDirectives>b__3(MethodDirectiveBase`2 dir) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 135
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Epicor.Customization.Bpm.MethodCustomizationBase2`2.RunDirectives(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 0
at Epicor.Customization.Bpm.CustomizationBase2`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.200.8\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 98
at Epicor.Customization.Bpm.BO.UD08SvcCustomization.Update(UD08Tableset& ds) in CustomizationAdapter.cs:line 81
at Ice.Services.BO.UD08SvcFacade.Update(UD08Tableset& ds) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\BO\UD08\UD08SvcFacade.cs:line 481
at Ice.Controllers.BO.UD08Controller.Update(Update_InputModel model) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Services\BO\UD08\Generated\UD08Controller.cs:line 187
at lambda_method1770513(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
Have you tried BL Tester? Perform that GetByID ensuring that "persist data between method calls is selected (should be, it’s the default). Change the ShortChar01, then call Update.
Debugging BPMs still works as it is still C# and on the server. Debugging the Kinetic Client via the website requires using the developer tools within the browser.
Did you keep RowMod = “U” included or are you just using UpdateExt with widgets or custom code? Can’t get my HelpDeskTableset to update manually added data via Custom Code using UpdateExt. Would you mind sharing any of your customization? That would help me greatly. This used to be my working E10 code before we moved to Kinetic.
try
{
var ISSUETEXT = (string)queryResultDataset.Results[0]["Calculated_IssueText"];
var ISSUESUMMARY = (string)queryResultDataset.Results[0]["Calculated_IssueSummary"];
var CASENUM = (int)queryResultDataset.Results[0]["Calculated_Case"];
// Logging calculated field values
PublishInfoMessage($"ISSUETEXT: {ISSUETEXT}", Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage($"ISSUESUMMARY: {ISSUESUMMARY}", Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
PublishInfoMessage($"CASENUM: {CASENUM}", Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
using (Erp.Contracts.HelpDeskSvcContract helpDeskSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.HelpDeskSvcContract>(Db))
{
// Check if CASENUM is valid
if (CASENUM > 0)
{
// Retrieve HelpDeskTableset with HDCaseNum filter equals CASENUM
Erp.Tablesets.HelpDeskTableset helpDeskTableset = helpDeskSvc.GetByID(CASENUM);
// Check if HelpDeskTableset is not null and contains rows
if (helpDeskTableset != null && helpDeskTableset.HDCase.Count > 0)
{
// Update the existing HDCase with new values
helpDeskTableset.HDCase[0].IssueText = ISSUETEXT;
// Ensure ISSUETEXT is not null and truncate if necessary
helpDeskTableset.HDCase[0].IssueSummary =
ISSUETEXT.Length > 60 ? ISSUETEXT.Substring(0, 60) : ISSUETEXT;
helpDeskTableset.HDCase[0].ResolutionText = ISSUESUMMARY;
// Call the Update method to save changes
helpDeskTableset.HDCase[0].Priority = 1;
helpDeskTableset.HDCase[0].WebComment = "hello";
helpDeskTableset.HDCase[0].RowMod = "U";
helpDeskSvc.Update(ref helpDeskTableset);
// Debug or further processing
}
else
{
// Handle the case when HelpDeskTableset is null or empty
PublishInfoMessage("HelpDeskTableset is null or empty", Ice.Common.BusinessObjectMessageType.Error, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
}
}
else
{
// Handle the case when CASENUM is invalid
PublishInfoMessage("Invalid CASENUM", Ice.Common.BusinessObjectMessageType.Error, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
}
}
}
catch (Exception ex)
{
// Log the exception
PublishInfoMessage($"Error: {ex.Message}", Ice.Common.BusinessObjectMessageType.Error, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
// Rethrow the exception if needed
throw;
}