D365 Finance & Operations and Dynamics AX Forum

 View Only
  • 1.  change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 10, 2022 01:50 PM
    We are running the ancient ax 2012 r3 and I am trying to keep it going to with little to no resources. I am needing to get a changed based alert working for the vendor form specific to any changes in the on-hold function. Basically, QA needs to know anytime a vendor's hold status has been changed.
    I had it work one time and then started getting the batch job erroring out for change based alerts. All of the errors do refence users who are no longer in the system (many moons ago).
    I do not know that clearing this error would resolve my issue, but thinking it would be a good place to start.
    The following is repeated multiple times with mutliple user names and processing task.
    Infolog for task Change based alerts processing task (5638101201)
    Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.
    An error occurred while processing event rules for user 'rbaginsk'.
    An error occurred while processing event rules.
    Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
    at Dynamics.Ax.Application.EventJobCUDTask.Run() in EventJobCUDTask.run.xpp:line 42
    at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
    at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
    at BatchRun::runJobStatic(Object[] )
    at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
    at BatchIL.taskThreadEntry(Object threadArg)
    Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.
    An error occurred while processing event rules for user 'rbaginsk'.
    An error occurred while processing event rules.
    Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
    at Dynamics.Ax.Application.EventJobCUDTask.Run() in EventJobCUDTask.run.xpp:line 42
    at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
    at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
    at BatchRun::runJobStatic(Object[] )
    at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
    at BatchIL.taskThreadEntry(Object threadArg)



    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------


  • 2.  RE: change based alerts job erroring

    Posted May 11, 2022 04:49 AM
    My guess would be that you've disabled a load of users but their rules have been left behind enabled.

    We had a similar issue with the Alert BatchJob a few years ago. Two things below which together cleaned it up. You might get away with just the first one, depending on how long it has been broken.

    1. Front end cleanup of Alert Rules. File>Tools>Manage Alert Rules (as an admin user). Review and delete all the garbage rules. Unfortunately some of the rules on disabled users could still be relevant, reassign or recreate them on an enabled user. Re-enabling the user might also work.

    2. Cleanup of two tables:
    a. EventCUD (this log of all database changes which may be relevant to Alert Rules - i.e. the unprocessed backlog). Running the ChangeBasedAlerts batchjob will clean it up, but in our case it would have taken 4 days to fully process the backlog. Our issue was on a non-prod environment so we did a TRUNCATE on this table (possible if none of your alerts are business critical). If you need alerts working and there is a big backlog of records in this table, you may need to be selective and bin some of the records, perhaps on a table-by-table basis. Start by fixing part 1 and running the job, then monitoring the number of records in EventCUD to see if it is falling and how quickly.

    select ecud.cudtableid, sqld.name, count(*)
    from eventcud ecud
    left join sqldictionary sqld on sqld.tableid = ecud.cudtableid and sqld.fieldid = 0
    group by ecud.cudtableid, sqld.name
    order by 3 desc
    ....will tell you the relative backlog size by table.

    b. EventInbox (this is list of alerts which have been generated). This is less important, and it is possible to cleanup from the frontend.

    From this, we determined that Alert Rules are really expensive from performance and should only be used on Master data (e.g. to monitor creditlimit / bank account changes).

    Good luck!

    Andrew

    ------------------------------
    Andrew Russell
    Direct Wines
    Reading, UK
    ------------------------------



  • 3.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 11, 2022 09:00 AM
    Edited by Larry Hunter May 11, 2022 09:16 AM
    When reviewing "manage alert rules" I am only seeing about 10 rules and all from users I recognize.
    Looking at eventcud table I am seeing about 35K entries and all are from users no longer in the system.
    A review of eventinbox shows up over 65K entries.

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



  • 4.  RE: change based alerts job erroring

    Posted May 11, 2022 07:57 AM

    Hi Larry, sorry for your issues.  Possibly you can try deleting the users that have left from the EventCUD table (e.g., delete from EventCUD where USERID = 'rbaginsk')

     

     

    Joe Calabrese | Kodak Alaris IT

    Kodak Alaris Inc., 336 Initiative Drive, Rochester, NY 14624

    joseph.a.calabrese@kodakalaris.com | Mobile: 585.414.3810 

    www.kodakalaris.com

    Information contained in this e-mail transmission may be privileged, confidential and covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521.

     

    If you have received this e-mail transmission in error, please treat it as you would like your own email sent in error to be treated and

    • notify us immediately by return email of the error and
    • delete the message from your system without reading, forwarding or copying it.

     

    Thank you in advance for your courtesy!

     


    Controlled






  • 5.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 11, 2022 08:52 AM
    Thanks for the responses. With the exception of one use, all of the users mentioned in these logs have long since been gone (for instance rbagansk was on the implementation team back in 2014).
    I did an excel download of the eventcud table and it came back with 35,000 entries, all status waiting, for users who have not been here in a long time. For instance one user (who I don't recognize - I have been here 23 years) and who I assume must have been part of the company that implemented AX, has over 10K entries. Same for another user (more than 10K).

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



  • 6.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 11, 2022 09:29 AM
    would it be OK to delete directly from the table either using the excel add-on or from the sql interface?

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



  • 7.  RE: change based alerts job erroring

    Posted May 11, 2022 11:34 AM

    Yes, Larry I believe so.  We use SQL.

     

     

    Joe Calabrese | Kodak Alaris IT

    Kodak Alaris Inc., 336 Initiative Drive, Rochester, NY 14624

    joseph.a.calabrese@kodakalaris.com | Mobile: 585.414.3810 

    www.kodakalaris.com

    Information contained in this e-mail transmission may be privileged, confidential and covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521.

     

    If you have received this e-mail transmission in error, please treat it as you would like your own email sent in error to be treated and

    • notify us immediately by return email of the error and
    • delete the message from your system without reading, forwarding or copying it.

     

    Thank you in advance for your courtesy!

     






  • 8.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 11, 2022 12:38 PM
    not knowing enough about this particular table - I see there is a userid (all from former developers and one existing finance person) and a created by field which is current and relatively new former employees (if that makes sense).

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



  • 9.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 12, 2022 01:36 PM
    Thought I had some resolution after purging the eventcud table the event inbox tables. A couple of vendor hold messages popped up in the ax alerts inbox. Went out and changed another vendor status about a half hour ago or more and still no alert referencing that change. Also, did not  receive email version of alert as well and we do receive email from the system for a bunch of different ssrs reports.
    the email version is not needed for our quality group, I am told. Would be nice.
    QA manager was very happy with the alerts interface and the notification feature on the ax client.

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



  • 10.  RE: change based alerts job erroring

    SILVER CONTRIBUTOR
    Posted May 17, 2022 02:23 PM
    Was able to get some time from users and bring the system down and clear the auc/kti files from the object server and restart. Executed the change based alerts job and alerts showed up immediately. Set it up for batch schedule and added some more changes and it picked them up 10  minutes later at the next run of the job. Seems to be working.
    If this had not worked, was contemplating a CLI rebuild.

    ------------------------------
    Larry Hunter
    Director
    Mooney International Corp.
    Kerrville TX
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role