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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.03.2012, 22:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Dynamics AX 2012 Workflow: Unable to save workflow configuration
Источник: http://blogs.msdn.com/b/axsupport/ar...iguration.aspx
==============

Lately we run into the problem when after creating workflow configuration for any process we are unable to save it. After we click button "Save and close" Dynamics AX asks if we want to activate workflow immediately. Regardless from the choice we make, the saving process does not finish, the form does not close, but the configuration is also not saved.

Digng further into it, I found out that code is interrupted ret = modelEditorControl.SaveAndClose(); in line of anClose of form WorkflowEditorHost

public boolean canClose()
{
boolean ret;

ret = super();

if (saveOnClose)
{
ret = modelEditorControl.SaveAndClose();
}

return ret;
}


Because during execution of modelEditorControl.SaveAndClose(); exception is raised and not caught in X++ the code is interrupted and nothing happens. This is why the form is neither close nor workflow configuration is saved.

We can simply change the code to catch the error following way:



public boolean canClose()
{
boolean ret;

ret = super();

if (saveOnClose)
{
try
{
ret = modelEditorControl.SaveAndClose();
}
catch (Exception::Error)
{
info("Caught 'Exception::Error'.");
}
catch (Exception::CLRError)
{
info("Caught 'Exception::CLRError'.");
netExcepn = CLRInterop::getLastException();
info(netExcepn.ToString());
}

}

return ret;
}




Disclaimer:
This programming example is for illustration purposes only. Microsoft disclaims all warranties and conditions with regard to use of the programming example for other purposes. Microsoft shall not, at any time, be liable for any special, direct, indirect or consequential damages, whether in an action of contract, negligence or other action arising out of or in connection with the use or performance of the programming example. Nothing herein should be construed as constituting any kind of warranty.



After change in the code we were able to see that there is indeed exception raised. Unfortunately the exception message was not so useful but it made us to look into Workflow event log on AOS machine (Under Application and Services Logs > Microsoft Dynamics AX Workflow) and there we found following error:

Exception thrown in : Workflow configuration Method not found: 'Dynamics.Ax.Application.NumberSeq Dynamics.Ax.Application.NumberSeq.newGetNum(Dynamics.Ax.Application.NumberSequenceReference, Boolean, Boolean, Boolean, Boolean)'.

Looking into NumberSeq class we could see that one of the method was changed (the method signature). Although after all the incremental CIL was generated it seems the signature was not updated in CIL. After following steps issue was solved:

1. Compiling forward class NumberSeq

2. Generating again incremental CIL








Источник: http://blogs.msdn.com/b/axsupport/ar...iguration.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
dynamics-ax: Interview with Microsoft's Lachlan Cash on his new role, AX 2012 and more Blog bot DAX Blogs 6 22.04.2011 14:55
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
Ошибка бизнес-процесса Tarasov E Dynamics CRM: Разработка 9 18.02.2010 14:02
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 05:26.