Upgrade to 2022 BPM Issues

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>
2 Likes

Looks like it’s in here.

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.

1 Like

I have narrowed down the widget to the Update table by Query widget.

Apparently, it doesn’t like updating the RowMod to “U”… odd…

@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.

image

2 Likes

Thanks Greg!!!

2 Likes

version: 2022.2.8

I broke out the portion of the that was causing the issue to make it easier to test.

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.

There is documentation in the help about debugging BPMs with Visual Studio, it is worth a read. You will find that null reference quick smart.

This is in the classic help in the Business Process Management section.

1 Like

I used BL Tester and the call worked!!

This has to do something with setting RowMod to “U”.

Just redid the BPM to use UpdateExt and it works.

2 Likes

does this work in Kinetic? Thought the files aren’t stored on the server anymore when the BPM runs.

1 Like

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.