on 08-02-2011 4:46 PM
Hi all,
Ive been playing around with router scripts and Ive successfully managed to get them to make decisions, send emails, log an error etc but I cannot find any way of making the script display a message to the user .
Is there anyway of doing this ? either as a popup window (like the text work instruction) or into the special instuction area of the POD.
We are running visiprise 4.2 and Ive tried several things that I have found in the javadocs but nothing has worked so far :o(
Thanks for any help you can give.
Kev
Kev
You can do this by throwing a standard error. In POD maintenance, you can make this appear as a popup (this affects all error messages though) by checking Error Popup on the main tab.
Throw an error by for example:
importClass(Packages.com.genrad.frame.BasicBOBeanException);
throw new BasicBOBeanException(101, new Data("ERROR", "Some error message"));"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes , I can do it that way as I can already write errors but I would rather not . It doesn't feel right using error messages to pass messages to the user and I also don't want real errors popping up like that either :o( unless thats my only option !
Is there any other way or is this my only choice ?
Ive tried displayError and displayMsg in Apputils but couldn't make them do anything !
Kev
Edited by: K_Hunter on Aug 2, 2011 6:05 PM
If your running 6.0 this should work and uses supported APIs...
importClass(java.lang.StringBuffer);
importPackage(Packages.com.sap.me.wpmf);
importClass(Packages.com.sap.me.wpmf.util.MessageHandler);
msgBuff=new StringBuffer();
msgBuff.append("Hello World");
MessageHandler.handle(msgBuff,null,MessageType.SUCCESS);
exit(true);
Cheers
After re-reading your post, I realized that your running 4.2, not 6.0.....
The rhinoscript engine can compile javascript, so maybe you can try using some javascript instead.
I believe I had success with using the javascript "alert" function in 5.2 which might also work for 4.2.
So maybe try a script containing something like...
alert("This is a popup message to the operator");
Note: as Alexander said, scripts are really for next step decision, so maybe be aware of any unintended consequences from using javascript within the router script.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.