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 )
Due to this the Progress is not updated at any time.
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.
You could modify the methods new and construct in RunbaseProgress / new and construct in the following way.
Classes \ RunBaseProgress
public static RunbaseProgress construct(
void new( int _numOfBars = 1,
Similar modifications as above could be applied to RunBase \ progressInit to call construct from there in the right way.