Data Directive not firing... and then

Ok, I get a call this morning, that an autoprint set up by a consultant years ago at go-live isn’t working.

This is on receipt entry, specifically on a standard directive, on RcvDtl.

They are triggering it as follows, with client code:

edvShipDtl.dataView[edvShipDtl.Row].BeginEdit();
edvShipDtl.dataView[edvShipDtl.Row]["TranReference"] = "GenRcpt @ " + DateTime.Now.ToString("MM/dd/yy HH:mm:ss"); 
edvShipDtl.dataView[edvShipDtl.Row].EndEdit();	
oTrans.Update();

And on RcvDtl, they have a condition check on TranReference changed from any to any other, then a auto-print linked to that.

All was working fine, until yesterday, Epicor could find nothing wrong, and then it magically worked again. Hmmmm


Today I got called to troubleshoot.

Well, after a bit of testing, the data directive is not firing… at least not consistently. I never got it to fire until I made a BAQ to check and see if that table was updating. And magically… Now it fires.

WTH? Why was it not firing before? When will it stop?

1 Like

So this is from customer shipment entry to receipt entry???

No just from receipt entry.

PO receipts.

I’m gonna restart my app server. Let’s see what happens.

Edit: DD now firing. Printing still inconsistent, but that’s a separate issue.

How do you know it is not firing?

:eyes:

Added code to verify. Nothing executed.

As soon as I made a BAQ to check if data was being read, all my code started firing.

Coincidence? Maybe?

Odd? Definitely.

It seems like the DD is consistently firing now, which was my main concern.

Thank you portal… :rofl:

Crap still isn’t working right though.

Get this when logged in to one workstation:


## System Information ##
==================

AppServer Connection: https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Form Name: Receipt Entry
Customization Name: ReceiptEntry_ESI
Menu ID: SRGO1001
Software Version: 11.2.400.0

============

Server Side Exception

BPM runtime caught an unexpected exception of 'NullReferenceException' type.
See more info in the Inner Exception section of Exception Details.

Exception caught in: Epicor.ServiceModel

## Error Detail ##
============

##!Correlation ID:##!  ad554e3e-6336-4628-8591-36852ec9b4e8
##!Description:##!  BPM runtime caught an unexpected exception of 'NullReferenceException' type.
See more info in the Inner Exception section of Exception Details.
##!Program:##!  Erp.Extensibility.AutoPrintDefaultsProvider.dll
##!Method:##!  getDefaultPrinter
##!Line Number:##!  46
##!Column Number:##!  17
##!Original Exception Type:##!  NullReferenceException
##!Server Trace Stack:##!     at Erp.Extensibility.AutoPrintDefaultsProvider.AutoPrintDefaultsBuilder.getDefaultPrinter(String companyID, String workstationID, String printerUsage) in C:\_releases\ERP\ERP11.2.400.0\Source\Server\Internal\Extensibility\AutoPrintDefaultsProvider\AutoPrintDefaultsBuilder.cs:line 46
   at Erp.Extensibility.AutoPrintDefaultsProvider.AutoPrintDefaultsBuilder.GetDefaultLabelsPrinter() in C:\_releases\ERP\ERP11.2.400.0\Source\Server\Internal\Extensibility\AutoPrintDefaultsProvider\AutoPrintDefaultsBuilder.cs:line 35
   at Ice.Lib.AutoPrintHandler.GetDefaultAutoPrintPrinter(String reportDataDefID) in C:\_releases\ICE\ICE4.2.400.11\Source\Server\Internal\Lib\BAM\AutoPrint\AutoPrintHandler.cs:line 95
   at Epicor.Customization.Bpm.DB.PostTranDirective_PrintReceiptLabel_06E607E984CA42C4AC8587E6D0F4C985.A001_AutoPrintAction()
   at Epicor.Customization.Bpm.DB.PostTranDirective_PrintReceiptLabel_06E607E984CA42C4AC8587E6D0F4C985.ExecuteCore(Int32 step)
   at Epicor.Customization.Bpm.DirectiveBase`2.Execute() in C:\_releases\ICE\ICE4.2.400.11\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 333
   at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.2.400.11\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 183



## Client Stack Trace ##
==================
   at Ice.Cloud.ProxyBase`1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
   at Ice.Cloud.ProxyBase`1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
   at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
   at Erp.Proxy.BO.ReceiptImpl.UpdateMaster(Boolean RunChkLCAmtBeforeUpdate, Boolean RunChkHdrBeforeUpdate, Int32 ipVendorNum, String ipPurPoint, String ipPackSlip, Int32 ipPackLine, String& cLCAmtMessage, String& opUpliftWarnMsg, String& opReceiptWarnMsg, String& opArriveWarnMsg, Boolean lRunChkDtl, String& qMessageStr, String& sMessageStr, String& lcMessageStr, String& pcMessageStr, Boolean lRunChkDtlCompliance, String& qDtlComplianceMsgStr, Boolean lRunCheckCompliance, Boolean& lCompliant, Boolean lRunPreUpdate, Boolean& lRequiresUserInput, Boolean lRunCreatePartLot, String partNum, String lotNum, Boolean lOkToUpdate, Boolean& lUpdateWasRun, String& wrnLines, ReceiptDataSet ds)
   at Erp.Adapters.ReceiptAdapter.UpdateMaster(Boolean runChkLCAmtBeforeUpdate, Boolean runChkHdrBeforeUpdate, Int32 ipVendorNum, String ipPurPoint, String ipPackSlip, Int32 ipPackLine, String& cLCAmtMessage, String& opUpliftWarnMsg, String& opReceiptWarnMsg, String& opArriveWarnMsg, Boolean lRunChkDtl, String& qMessageStr, String& sMessageStr, String& lcMessageStr, String& pcMessageStr, Boolean lRunChkDtlCompliance, String& qDtlComplianceMsgStr, Boolean lRunCheckCompliance, Boolean& lCompliant, Boolean lRunPreUpdate, Boolean& lRequiresUserInput, Boolean lRunCreatePartLot, String partNum, String lotNum, Boolean lOkToUpdate, String& wrnLines)
   at Erp.UI.App.ReceiptEntry.Transaction.Update()

## Inner Exception ##
===============
Object reference not set to an instance of an object.

##  ##

While another one works. Except… not all the time. Sometimes it just does nothing. Nice…

ray donovan omg GIF by Sky

I believe the “changed from any to another” requires RowMod=U. Is is possible that the record coming through has RowMod = “A”? In which case, you might need a “changed from any to another OR the xxxx field of the ADDED row = yyyy”?

1 Like

Or even RowMod is blank. The “rule” that new records are RowMod=A, updated records are RowMod=U is more of a guideline than a rule.

1 Like

No, at least on the ones I am testing, are all “U”.

It doesn’t really matter anymore, the data directive is consistently firing after the restart, and this is a holdover from days past. I’m going to add it to our current way of doing things to be consistent.

Although, I would like to know what’s crapping out. :cry:

Back in 10. I had issues with auto prints nort working if you went I to the autoprint and look at the report, no changing anything then going out. Apparently it was silently dropping the report style.

That does not sound like your problem.

Is it queued or immediate?

immediate

I think our friendly rubber duck loving support person suggests Queued…

2 Likes

It’s been a while since I perused that thread. I think I’ll have a look see, maybe there are some gems that can help the rest of my problem.

As for the first part of my problem, the data directives not firing, that seems to be resolved after a restart of the app server(s).

One of the usual (Epicor) suspects has followed up with me privately to monitor if there is anything on their end they may need to address.

May also be that over time that concurrent requests against the system agent have grown since the solution was installed and it can’t cope…instead of just converting an immediate to a queued until there is another slot for the agent to executed it it is just not processing it.

There is a setting for concurrent tasks which I think default is set to 20.

This is beginning to make me think, maybe this is why I am seeing Pending tasks in the systasks and they do nothing.

We have three task agents running…

1 Like

Don’t worry, TranReference is just a field in there. :rofl:

We had a similar issue a few months ago.
Cloud support fixed it but I don’t recall what it was.

If I can find the ticket, I’ll post.

1 Like

Just saw this in the 2024 release notes

2024.1 Tools and Technologies ICE-TaskAgentService | PROCESS Story ERP-157146 Fixed: WinForms deadlocks when compression is enabled on RPC.

And here’s a win

2024.1 Tools and Technologies ICE-ReportStyle | RPTF Bug ERPS-185278 Dynamic Report (not BAQ Report) using Bartender Report Style not showing BAQ data in report PRB0248277

If anyone is playing along at home, I just fixed the printing.

It’s more in line with my standard json printing solution now.

A standard Jason printing solution?

3 Likes