Send WaitLog event
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
<source lang="javascript"> void send_wait (int timeout, object top_object, "log_event", object group_leader, uuid userid, string message) </source>
- 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
<source lang="javascript"> / 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])); } </source>