Identify BPM from stack trace?

Is there a way to identify which BPM generated an error from the stack trace? The stack trace clearly identifies the function (JobEntrySvc.Update in this example) but the specific BPM seems to be identified by a 16-byte hex code:

at Epicor.Customization.Bpm.BOF47650B0B5C540729743EF8B78E93477.JobEntrySvcCustomization.Update(JobEntryTableset& ds)

I can’t find anything in the database that ties to that ID.

The name of your directive will be in the error as well.

1 Like

@jgiese.wci I’ve seen that before, but not in this case. The difference might have something to do with the BPM being triggered through the REST API instead of the Epicor UI.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Transactions.TransactionAbortedException: The transaction has aborted. ---> System.Data.SqlClient.SqlException: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlDelegatedTransaction.SinglePhaseCommit(SinglePhaseEnlistment enlistment)
   --- End of inner exception stack trace ---
   at System.Transactions.TransactionStateAborted.EndCommit(InternalTransaction tx)
   at System.Transactions.CommittableTransaction.Commit()
   at System.Transactions.TransactionScope.InternalDispose()
   at System.Transactions.TransactionScope.Dispose()
   at Ice.TablesetBound`3.InnerUpdate(IceDataContext dataContext, TFullTableset tableset) in C:\_Releases\ICE\ICE3.2.100.8\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 880
   at Erp.Services.BO.JobEntrySvc.Update(JobEntryTableset& ds) in C:\_Releases\ERP\UD10.2.100.8\Source\Server\Services\BO\JobEntry\JobEntry.Designer.cs:line 7505
   at Epicor.Customization.Bpm.MethodCustomizationBase2`3.RunDirectives(TParam parameters) in C:\_Releases\ICE\ICE3.2.100.8\Source\Server\Internal\Lib\Epicor.Customization.BPM\MethodCustomizationBase2.cs:line 197
   at Epicor.Customization.Bpm.CustomizationBase2`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE3.2.100.8\Source\Server\Internal\Lib\Epicor.Customization.BPM\CustomizationBase2.cs:line 71
   at Epicor.Customization.Bpm.BOF47650B0B5C540729743EF8B78E93477.JobEntrySvcCustomization.Update(JobEntryTableset& ds)
   at Erp.Services.BO.JobEntrySvcFacade.Update(JobEntryTableset& ds) in C:\_Releases\ERP\UD10.2.100.8\Source\Server\Services\BO\JobEntry\JobEntrySvcFacade.cs:line 9188
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Ice.Hosting.RestApi.OperationInvokeHelper.<>c__DisplayClass25_0.<CallInvoker>b__0(Object obj) in C:\_Releases\ICE\ICE3.2.100.8\Source\Framework\Epicor.Ice\Hosting\ServiceCaller\OperationInvokeHelper.cs:line 283
   at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.100.8\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.100.8\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28

Are you getting that error text from the Event Viewer?

Worst case how many BPMs do you have on JobEntry.Update? Look for the one with what sounds like an improper transaction scope. Something updating the DB directly.

@jgiese.wci Yes. I only have a few BPMs on Update and I have a hunch which one is causing this. I was just hoping there was a way to find out for sure before I start messing with BPMs on our production server. Unfortunately this error is very intermittent and I don’t have any steps to deliberately reproduce. In fact, it was a completely different error before I added a 100ms delay after every REST call to Update. This is voodoo troubleshooting. The only thing I can think of is that the delay changed the classic problem of reading your own writes into some other problem.

If you want to match that ID to a BPM you can review the BPM source code on your server.


2 Likes

@jgiese.wci Found it. Thanks!