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 Message Processing Job

(0) ShareShare
ReportReport
Posted on by 931

Hi All,

We are using AX 2012 R3 CU11. Recently we faced issues in workflows are not assigning. So, I had checked the workflow message processing batch job it got in a Executing State for a very long time.

I have also checked for the queued records in SYSWORKFLOWMESSAGETABLE and took the first record of it to find which workflow is causing the problem in WorkflowTrackingStatusTable and also even i found the issue.

The LedgerDaily Workflow is active with the error, The owner has been removed from AX and the workflow has not updated to the new owner. So i changed the owner name and made as an active with the new version.

 And then deleted the old queued records in SYSWORKFLOWMESSAGETABLE  and rescheduled the workflow message processing job again. and it actually worked for a 1 day.

Now iam facing the same issue, workflow message processing got stuck in executing state.

Likewise i tried, and not able to identify anything useful.

Could you guys give me an idea? or anyone faced like this.

Please Help.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Rusty,

    When the batch job remains in executing state, you have to go to the batch tasks form. Then you can see how many tasks are created. Every task will contain 100 workflow instances. If the count is very high, this will cause the job remaining in executing state. An instance with an error cannot cause the batch job to remain in executing state for as far as I have seen it.

    Note that I did a lot of troubleshooting related to stuck workflows and performance issues. It would be possible to schedule more than one batch job for the workflow. Then two batch jobs will run independent and will pick up new workflow instances more quickly. At one customer we did schedule three batch jobs for the workflow; starting every 20 seconds.

    If the workflow configuration itself is very complex with e.g. a lot of conditional decisions, it will also have a performance penalty.

  • ThivaKar Profile Picture
    931 on at

    Hi Andre,

    Points taken.

    How to schedule more than one batch job for the workflow?

    For the workflow message processing batch job the recurrence has been set for every 1 minute. What is the proper recurrence time for this batch job.

    PS : Now it is getting serious, batch server crashes when this batch job is in executing state.

    No errors in the event viewer.

    Sometimes deadlock occurs in BATCH table.

    When i delete the queued records from SYSWORKFLOWMESSAGETABLE, it runs fine for some time.

    A

  • ThivaKar Profile Picture
    931 on at

    Also thanks for the points given related to the sysworkflow tables and the workflowtrackingstatus table in the below links,

    https://community.dynamics.com/ax/f/33/t/197730

    https://community.dynamics.com/ax/f/33/t/116738

    This might help other members too. :)

  • ThivaKar Profile Picture
    931 on at

    Hi andre,

    Any inputs on  my request?

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Rusty,

    You can go to the Batch job form and add a job manually. In the tasks form, use 'SysWorkflowMessageQueueManager' as class to start a new instance. Note that the retry mechanism can cause duplicate assignments if the processing of tasks are longer than 10 minutes. Then batch tasks can fail again.

    Have you already searched for running instances? Enclosed also an SQL scripts which I did use for monitoring:

    --Script for select count of workflows per batch affinity
    --Empty GUID means it is waiting for a batch job to be picked up
    SELECT TOP 1000 [BATCHAFFINITY]
          ,COUNT([RECID]) AS COUNT
      FROM [GROUPTMFDAXPRD].[DBO].[SYSWORKFLOWMESSAGETABLE]
      WHERE [MESSAGELIFECYCLESTATE] = 1
      GROUP BY [BATCHAFFINITY]
      ORDER BY [BATCHAFFINITY]
    
    --Script for details on workflow messages
    SELECT TOP 10000 [BATCHAFFINITY]
          ,[WORKFLOWCONTEXTRECID]
          ,[WORKFLOWCONTEXTTABLEID]
          ,[WORKFLOWCONTEXTCOMPANYID]
          ,[AXAPTAUSER]
          ,[ACTIONNAME]
          ,[WORKITEMINSTANCEID]
          ,[ACTIVITYINSTANCEID]
          ,[MESSAGELIFECYCLESTATE]
          ,[MESSAGETYPE]
          ,[WORKFLOWCORRELATIONID]
          ,[CONFIGURATIONID]
          ,[MESSAGEID]
          ,[ROOTCORRELATIONID]
          ,[ASSIGNEDUSER]
          ,[PARENTCORRELATIONID] 
          ,[SUBWORKFLOWID]
          ,[ACTIVITYCONTEXTTYPE]
          ,[BOOKMARK]
          ,[MODIFIEDDATETIME]
          ,[DEL_MODIFIEDTIME]
          ,[RECVERSION]
          ,[PARTITION]
          ,[RECID]
      FROM [GROUPTMFDAXPRD].[DBO].[SYSWORKFLOWMESSAGETABLE]
      WHERE MESSAGELIFECYCLESTATE = 1
      --AND BATCHAFFINITY <> '00000000-0000-0000-0000-000000000000'
      --AND BATCHAFFINITY = '00000000-0000-0000-0000-000000000000'
      ORDER BY BATCHAFFINITY, RECID
  • Community Member Profile Picture
    on at

    Million Thanks

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