web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Workflow stuck in pending status

(0) ShareShare
ReportReport
Posted on by 515

Hi Team,

Suddenly in live enviornment we are facing issue with workflows.Some workflows are stuck in Pending status without any workflow item creation(no user assignment) few are completed by user but status on transaction table is not update like from Released PR-Completed , or some workflows which are cancelled now unable to resubmit.

I ran Tutorial_WorkflowProcessor form many times but it was taking too long to complete so i have to force stop the process. I checked SysworkflowMessagetable as well but it is empty in my case. 

I ran Workflow configuration wizard and check batch job history for Workflow messaging batch job which are showing Waiting status. For Workflow messging batch job i got error log in batch history before 2-3 hrs from now which shows following error,there is no current error log niether any workflow is getting executed.

"Cannot edit a record in Workflow Messages Table (SysWorkflowMessageTable). Workflow message id: {00000000-0000-0000-0000-000000000000}, {00000000-0000-0000-0000-000000000000}.
Deadlock, where one or more users have simultaneously locked the whole table or part of it."

Microsoft.Dynamics.Ax.Xpp.DeadlockException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.DeadlockException' was thrown.
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.UpdateAll(IntPtr table)
at Dynamics.Ax.Application.SysWorkflowQueueTask.assignBatchAffinity(Guid _affinity, Int64 _minRecId, Int64 _maxRecId, Boolean , Boolean ) in SysWorkflowQueueTask.assignBatchAffinity.xpp:line 47
at Dynamics.Ax.Application.SysWorkflowQueueTask.@assignBatchAffinity(Guid _affinity, Int64 _minRecId, Boolean )
at Dynamics.Ax.Application.SysWorkflowQueueTask.assignBatchAffinity(Guid _affinity)
at Dynamics.Ax.Application.SysWorkflowQueueTask.Run() in SysWorkflowQueueTask.run.xpp:line 21
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 50
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)

Kindly help.

Thanks,

Shri

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Shri,

    Have you tried to recall the WF?

    Is that actually possible?

    Best regards,

    Ludwig

  • Dhanshri Profile Picture
    515 on at

    Yes Ludwig, for one Payment voucher workflow as Approver was unable to get the request,user tried to recall the workflow but after recall its status changed to cancelled and now user is unable to submit it again. Generally after recall user can resubmit the request for payment voucher.

    Now I again kept Tutorial_workflowprocessor form to run.It is running since last 3 hours,yet to complete.but I can see below error on screen-

    "Can't edit record in system cache flush."

    Thanks,

    Shri

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Shri,

    I would recommend that you have a look at the following fixes on LCS, ideally in combination with a colleague from the development department

    KB 3185821Deadlocks on UPDATE ACCOUNTINGEVENT coming from Classes\SubledgerJournalTransferCommand\executeTransfer

    KB 2886683Deadlock exception during a batch Job (Process Ledger Transactions)

    If those fixes do not seem to be applicable and help, try to debug the issue to find the root cause triggering this deadlock.

    Best regards,

    Ludwig

  • Dhanshri Profile Picture
    515 on at

    Thanks Ludwig!

    I will check these this. Also, to add few points on this issue,I observed Batch history for Workflow messaging workflow and noticed there was error after 10 min since 3rd April till 5th April 2019 2.28pm After that there is no any log for error. The workflows which has been raised during this time have some issues as mentioned above.

    BatchJob-error.png

    I noticed below error was common since 3rd April till before last error message.The last error log was as mentioned in the initial thread.

    BatchJob-error.png

    I found resolution from one of the blog for this error where it was mentioned to update few entries from SysworklfowMessageTable but in my instance I don't have any entry in this table.

    Now, there is no any error log in the system.Does it mean issue is resolved as in production i can't check by approving or recalling any request now.

    Thanks,

    Shri

  • Suggested answer
    Prashant Singh Profile Picture
    8,802 on at

    Dear Shri,

    Could you please check the bacth job assiciated with the workflow.

    If this is OK. Please try to delete the batch job related to workflow and create it again through wizard.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans