SDU
Personal tools

Send WaitLog event

From SDU

Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

This method create activity Event Occured to object's activity log. This method is valid for CR as well for CHG objects.

This action can be called in spell code in method send_wait.

Usage

void send_wait (int timeout, object top_object, "log_event", object group_leader, uuid userid, string message)
  • timeout - how long (?in seconds?) should the method wait for finishing the method (0 means infinite)
  • top_object - root object for the method (on which the method is called)
  • group_leader - Group leader object obtained from get_co_group method
  • userid - user designated as action creator
  • message - user description in object's activity

Results

On success nothing. If error occured msg[0] contains error message.

Examples

/ add an activity log. requires the macro be locked.
uuid log_userid;
// log_userid = Administrator
log_userid = (uuid)"4FE1477A236A2A44A3B05A628DCBE661";
 
// get info from event to store in log description
string log;
log = format("event '%s' triggered by condition '%s'.", event_tmpl.sym, event_tmpl.condition.sym);
 
send_wait(0, this, "log_event", group_leader, log_userid, log);
if (msg_error()) {
logf(ERROR, format("macro event error '%s'", msg[0]));
}
This page was last modified 13:23, 7 December 2009.  This page has been accessed 561 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers