Hi all,
I wondered whether anybody knows of a possibility to show a progress bar while macro scripts are executed. When I run more complex macros, the execution may take quite some time - e.g. for the recursive iteration through complete process hierarchies. As the whole application just freezes during the execution, it's very hard to tell whether it's still working or if it's crashed. Therefore, a simple counter on a userDialog would be sufficient to show that it's still alive.
An adverse factor (at least in my case) is that the script engine tends to crash quite unpredictably... For example, the very basic function Designer.openModel() sometimes grinds the whole Aris application to a halt, while after a restart, it doesn't cause any problems. On other occasions, it works, but takes up to about 10 seconds (in step-wise execution)
With regard to this issue, too, a progress bar would be very helpful!
So I guess I have questions:
- Does anybody face the same problems?
- Has anybody found a way to use progress bars?
Thanks a lot and best regards,
Philipp
Hello Philipp,
did you ask IDS support about the freezing/crashing by macros? Looks like memory is not released after macro execution. Their administration guide is very vague on memory resources consumed by javascript reports and macros (how large is a big DB? what is a complex model? what are demanding script methods?)
Did you find anything in the internalerror*.log files of Bus Server? Or - in case of macros - a log in your %userprofile%\ARIS71\log\ ?
Perhaps you can use this approach by Mr. Milan Slivka to catch an exception and create your own log file.
I can't help with the progress bar idea, but I remembered the Aris Slot Machine macro by Mr. Jens Lauer, using audio output in a loop:
//turn up your speakers:) java.awt.Toolkit.getDefaultToolkit().beep();
Best regards, Martin
Hi Martin
Thank you for your response. Unfortunately, I have no access to the Bus Server directly... and the local log file actually doesn't show anything. But thank you for the hint anyway! I'll try to get the information from the server admin.
I haven't approached IDS Scheer so far because I wanted to be sure that the error is not on my side... But as it seems, I'm not alone with this riddle :-)
@Anjali: I tried to overcome the issue by avoiding to open models. Therefore, I used the "persistent"-methods whereever possible. By doing so, I was able to reduce the number of opened models siginificantly and the problem seem to be under control.
About the progress bar:
To me it seems that the slot machine was implemented as a java class based on some kind of Java window (maybe JFrame or JWindow, which is the base class for the UserDialogs if I remembr correctly)... That way, you're absolutely right, it's possible to have a UI which is visible during the execution. So far, though, I've struggled with implementing a proper java-class structure within java script. I know it's possible (I tried it once to overcome a lack in functionality of the userDialog object), but it's rather arduous...
I guess, the value such a progress bar would bring is not worth the effort to put into it...
Best regards,
Philipp
just out of curiosity I searched ARIS 7.1 SR2010_06 Script Help for "progress" and found corresponding macro objects:
Macro class Merge - Method startMerge() refers to a Macro class Progress "The current state of the merge process is stored into the given progess object."
Macro class ScriptExecMacroInterface - Method execute (...p_bShowProgress)
true: displays a progress dialog when executing a report
Macro class DataDescriptionImportMacroOptions - Method setShowProgressDialog()
Usage seems to be restricted, but maybe this helps
You should crank up your JVM parms in the file arisLauncher.cfg or launcher.cfg
<launcherConfig>
<jvmParams
jvmPath="./jre"
jars="./lib"
userConfigPath=""
jvmOptions="-Xmx1024m;-Xms512m;-XX:NewSize=128m;-XX:MaxNewSize=256m;-XX:MaxPermSize=156m;-Dsun.java2d.d3d=false" />
</launcherConfig>