Lost BPM, possible removed method directive?

I may need the epicor titans on this one.

I wrote a method directive BPM a few years ago, to handle word wrapped text box’s not showing up as new lines on SSRS reports. Basic issue was, the text boxes stored only char(13) [or maybe it was char(10)] and it needed both the carriage return and new line characters to print properly. So instead of fixing every single report where it gets effected, I wrote a BPM on some business object that was in the trace log to handle it before it got sent to the report to build.

Fast forward to 2023, we updated to Kinetic 2022.2 in June from 10.2.700. This BPM was possibly missed in our validation, because a few days ago someone said they noticed our reports were printing a wall of text. Why it took half a year to get reported to us is beside me, but after 6 months of a successful launch we finally had shut all our old servers down and literally earlier the same day it was reported wiped our “pilot” server which was still data from the day of launch (so I can’t even verify if it did or didn’t still exist after launch and if it was accidentally deleted).

Only two of us have access to BPMs and the object was definitely obscure enough I don’t believe it was deleted by us. My gut is telling me that the directive I used or perhaps the entire BO was gutted or hidden away between 10.2.700 and 2022.2.

So that leaves me with the option to rewrite the BPM, problem is I can’t figure out what method directive I latched onto. The only relevant object [and only object] in the trace log pipeline is the SubmitToAgent method directive for BAQReport object. I am pretty sure this is not the method directive I used in the past, but there aren’t any others that show up in the log.

Does anyone know a BPM I can latch onto to change the data before it constructs the SSRS report?

Additionally, does anyone know which BPM I was possibly using and if it happened to be deleted or hidden away in Kinetic?

You can use this in SSMS if you have access:

SELECT	*
FROM	Ice.BpDirective
WHERE	CAST(Body AS nvarchar(MAX)) LIKE '%%'

If you can remember any terminology in the directive, put it between the % % and it should give you a list. e.g.:

SELECT	*
FROM	Ice.BpDirective
WHERE	CAST(Body AS nvarchar(MAX)) LIKE '%EmailTO%'

The other option would be to run a query like this to see if it’s just marked as outdated:

SELECT	*
FROM	Ice.BpDirective
WHERE	IsUpToDate=0

If you want to try the last one in your system you can do this when searching for the directive:


If you are multi company, I would suggest the SQL.

I forgot to mention we have a query + dashboard for viewing all of our BPMs and all their attributes, but I went ahead and tried looking through sql anyway - sadly no results other than one unrelated outdated bpm. But you’ve given me the idea to check if any of their c# has char(10) or char(13)…which brought back no results.

I’m ~85% sure it is not in the system anymore :frowning:

I did find the original bpm that only affected a single table BOLHead on a data directive. When we started needing it elsewhere, I found a way to generalize it.
image

I think they might have fixed it, but there was a bug at one time that when importing using solution workbench, it would delete BPMs if they had the same name as another one, even if they weren’t on the same method. We make an effort to make sure that common BPM’s ( like ChangeLog) aren’t all named the same thing because of this.

I don’t know if that’s your problem, but it sounds like it might be.

It’s possible, we did use Solution Workbench for a few new items during the upgrade transition period. If that was the cause, the old bpm was accidentally added into the solution.

What I can’t figure out is which directive I ever latched onto, or how I originally discovered which one to add a BPM onto. It doesn’t appear the SubmitToAgent object is correct, it doesn’t have the data for adjustment as far as I can tell.

I found one more method of interest after checking all the server side boxes on the trace (woops, forgot that earlier). Going to look into this GetReportBytes method and see if I can use this, but its also possible all its doing is getting the actual report seeing as it fires on the ReportMonitor object.

I see the trace go:
-general “you just enabled trace log” directives
-Ice.Proxy.Rpt.BAQReport.SubmitToAgent
-Ice.Proxy.BO.ReportMonitor.GetRowsKeepIdleTimeWithBallonInfo
-Ice.Proxy.BO.ReportMonitor.Update
-Ice.Proxy.BO.ReportMonitor.GetReportBytes
-Ice.Proxy.BO.ReportMonitor.Update
-Ice.Proxy.BO.SysMonitor.GetReports --Definitely too far to do anything at this point.
-Ice.Proxy.BO.SysMonitorTasks.GetRows
-Ice.Proxy.BO.ReportMonitor.GetRowsKeepIdleTimeWithBallonInfo

Do you have an old snapshot of the database before upgrading that you can restore and query against? I’ve pulled code out of the BPDirective table before when someone deleted a directive they thought was no longer used.

You know, I don’t know why I was thinking we didn’t… We shut down our servers but we have SQL backups going back a while haha… Thanks, I’ll get searching in there and post back with my results.

Been all over the place today, haven’t exhausted GetReportBytes either as a possible replacement directive if it turns out what was being used is genuinely removed. Need to figure out how the byte array is encoded first.

Might be this

Interesting… I will give the generalized bpm a shot tomorrow.

Well, I found an old Teams chat with my boss on the subject and it pointed me to a rival article.

According to this and according to my chat I’m just going crazy today, and it was always a per table implementation. Which is completely possible that the BPM in question got deleted since it is surfacing on the UDCodes table for the present issue.

Adam (the aforementioned Ginger) is a very smart man.

1 Like