2/08/2008

Sending a message to all users.

Sometimes one user could need to send a message to all the connected users. Perhaps you have to give some announcement to the users, for example for an unplanned reboot of the system, thing that you must avoid as much as you can (see post about best practices). The biWall function covers this functionality.

From the expression test window you can try this code

{
var lMessage$:=’Hi all users’;

return biWall&(lMessage$);
}
I hope this will be useful for all of you.

Labels:

2/24/2007

The print and debug function.

These days I was coding and reviewing some functions developed in EPM in our project. Generally I used to use the print function to print comments in the middle of my function to see what the function was doing. These comments was written in the stdout file ($ATA_DATA_SERVER_LOG\stdout). To use the print function to debug is very poor because you have to write the messages, see it in the file and once you have finished your job, delete or comment all the prints. But Singl.eView offers a better solution to do this. The “debug” function. This function takes the message you put in the argument of the function and write it directly in the stdout or in the expression test window. But the debug function only works if you are working in debug mode otherwise the parser don’t parse the function. This is very good. You can forget your debug messages and you can send it to production environments, knowing that only in debug mode they are going to do something. Have you ever find out a message in the stout file due to a forgotten print in some function?

If you are testing the function in the expression test you can click the debug check and debug your function.

Also exist the debug_on and the debug_off functions. With this you can activate / deactivate the debug mode in the middle of the code of some function.

And if you have a very big stdout file…you can use the switch file to create a new one.

Labels: