Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 27.01.2020, 18:11   #1  
Blog bot is offline
Blog bot
24,415 / 822 (76) +++++++
Регистрация: 28.10.2006
Art Of Creation: Workflow: invalid tracking submission expected context %1 and expected type %2 actual context %3 and actual type %4

You can get this error in the Workflow message processing batch job. You will find that the workflow batch throws this error every 10 minutes or so. The reason you get it every 10 minutes is because of the code in the SysWorkflowMessageQueueManager.expireLeasedMessages() method. In this method, the workflow updates the batch affinity value every 10 minutes.

To debug this issue, you might be tempted to process the workflow messages using the the Tutorial_BatchProcessing form. However, you will not be able to debug this using the Dynamics AX debugger because this form executes the function that fails in CIL. You will have to use Visual studio to debug it.
To debug using the Dynamics AX debugger, use the following job:

static void procesworkflowqueue(Args _args)

Set your breakpoints in the table method workflowtrackingtable.savetracking() on line 161 and/or 154. These are the lines that throw an error message with label @SYS112531.
Wait for about 9 minutes after the workflow batch has the status error, then run the job every 2 seconds manually. After about 1 minute of this you will enter the breakpoint. Then use the debugger to figure out what record in the table SYSWORKFLOWMESSAGETABLE is causing the error.
You could also find it using the following query:


This query returned more records than were causing the issue in my case, so it’s best to make sure using the debugger. I then “fixed” the issue by deleting the identified record from the SYSWORKFLOWMESSAGETABLE table.

If you run the Tutorial_WorkflowProcessinng class and you get the error every time, there might be something wrong with records in the table WORKFLOWWORKITEMTABLE instead. You can figure out what record this is using the debugger as well.

Most likely the work item is linked to a tracking status record that does no longer exist. Verify this using this query:

WHERE correlationid NOT IN (

You can try to get it working by recalling the worklow and resubmitting it. If that doesn’t work you can delete the record in the WorkflowWorkitemTable table.

Unfortunately, I do not know the root cause of this issue but the actions above fixed it for me. Hope this helps. Thanks to the community for inspiration on how to fix this issue.

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 00:14.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.