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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.09.2010, 23:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Batch tasks show no operation progress
Источник: http://blogs.msdn.com/b/emeadaxsuppo...-progress.aspx
==============

Recently I coded an AX 2009 server bound batch job using AOT\Classes\tutorial_runbasebatch and wanted to show the progress of the job within the Batch tasks form.

I was using the common interfaces in RunBase and also RunBaseProgress and found that this is not increasing the Progress in the Batch tasks form. After a little troubleshooting I found that there have been some fixes implemented till Dynamics AX 2009 RU 5 and I noticed that all methods end up calling SysOperationProgressServer at some time and that there a boolean value is set to true by default.

public void new(int _numberOfBars = 1, boolean _bypass=true)
{


Bypass = _bypass;

if ( Bypass )
return;


Due to this the Progress is not updated at any time.

Solution 1:
So one way to get a progress successfully is to directly call SysOperationProgressServer and on calling the new method set Bypass to false. If you go for this way you might need to utilize Global::isRunningOnServer to understand if your code is running on the server or not.

Solution 2:
You could modify the methods new and construct in RunbaseProgress / new and construct in the following way.

Classes \ RunBaseProgress

public static RunbaseProgress construct(
int _numOfBars = 1,
FormBuildControl _embedded = null,
Boolean ifOnSrvBypass = true
)
{
return new RunbaseProgress(_numOfBars,_embedded,ifOnSrvBypass);
}


void new( int _numOfBars = 1,
FormBuildControl _embedded = null,
Boolean ifOnSrvBypass = true
)
{
if ( hasGUI() )
{
if (_embedded)
oprProgressEmbedded = SysOperationProgressEmbedded::newGeneral(_embedded,_numOfBars);
else
oprProgress = new SysOperationProgress(_numOfBars);
}
else
{
// if no client is present, we can only use the SysProgress table to save progress info
oprProgressServer = new SysOperationProgressServer(_numOfBars,ifOnSrvBypass);
}
}


Similar modifications as above could be applied to RunBase \ progressInit to call construct from there in the right way.

--author:Christian Wolf--editor:Christian Wolf--date:22-09-2010


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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Office Applications don’t show up embedded in the Dynamics AX Document Handling form Blog bot DAX Blogs 0 05.08.2010 15:05
emeadaxsupport: Role Center is no longer showing up after installing an Application Roll-Up package Blog bot DAX Blogs 0 08.06.2010 19:05
palleagermark: Dialog error when adding batch tasks to a batch job Blog bot DAX Blogs 0 10.06.2009 20:05
axaptapedia: Batch processing Blog bot DAX Blogs 0 29.01.2009 17:05

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

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

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