Difference between revisions of "Send WaitCall attrNew attached event"
From SDU
(New page: __NOTOC__ Category:Customizations Category:r11 Category:Spell Code {{Global Header}} {{Global Announcement}} == Overview == This method for attaching events to CR or CHG object...) |
(→Usage) |
||
| Line 14: | Line 14: | ||
void send_wait (int timeout, object top_object, "call_attr", string factory_name, "new_attached_event", | void send_wait (int timeout, object top_object, "call_attr", string factory_name, "new_attached_event", | ||
object group_leader, string obj_persid, string evt_name, duration NULL|override_duration, | object group_leader, string obj_persid, string evt_name, duration NULL|override_duration, | ||
| − | date NULL|override_starttime, string goup_name, int | + | date NULL|override_starttime, string goup_name, int unknown1, int unknown2, string timezone) |
</source> | </source> | ||
| Line 27: | Line 27: | ||
* override_starttime - if you want to pass NULL it must be casted: (date)NULL | * override_starttime - if you want to pass NULL it must be casted: (date)NULL | ||
* group_name - simple string which will be stored in atev.group_name field; this is usefull for later filtering | * group_name - simple string which will be stored in atev.group_name field; this is usefull for later filtering | ||
| − | * | + | * unknown1 - simply put 0 there |
| + | * unknown2 - ['''R11+'''] simply put 0 there | ||
| + | * timezone - ['''R12+'''] persistent_id form tz object. Run ''bop_odump domsrvr tz "" sym code gmt_delta'' in command line and find your timezone and put Persid value here | ||
== Results == | == Results == | ||
Latest revision as of 10:18, 7 December 2009
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.
To discuss or ask questions about this article, select the discussion tab above.
Overview
This method for attaching events to CR or CHG objects.
This action can be called in spell code in method send_wait for call_attr.
Usage
<source lang="javascript"> void send_wait (int timeout, object top_object, "call_attr", string factory_name, "new_attached_event",
object group_leader, string obj_persid, string evt_name, duration NULL|override_duration,
date NULL|override_starttime, string goup_name, int unknown1, int unknown2, string timezone)
</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)
- attr_name - name of attribute on which the action is called
- factory_name - name of factory on which the action is called (could be "cr" for requsts and incidents, "chg" for changes, "iss" for issues)
- group_leader - Group leader object obtained from get_co_group method
- obj_persid - persistence_id of CR or CHG object which the event will be connected to
- evt_name - name provided in evt.sym field
- override_duration - if you want to pass NULL it must be casted: (duration)NULL
- override_starttime - if you want to pass NULL it must be casted: (date)NULL
- group_name - simple string which will be stored in atev.group_name field; this is usefull for later filtering
- unknown1 - simply put 0 there
- unknown2 - [R11+] simply put 0 there
- timezone - [R12+] persistent_id form tz object. Run bop_odump domsrvr tz "" sym code gmt_delta in command line and find your timezone and put Persid value here
Results
On success nothing. If error occured msg[0] contains error message.
Examples
<source lang="javascript"> object group_leader; send_wait(0, top_object(), "get_co_group"); group_leader = msg[0]; send_wait(0, top_object(), "call_attr", "evt", "new_attached_event",
group_leader, argv[3], "Close Incident", (duration) NULL,
(date) NULL, "CLS", 0, 0);
if (msg_error()) {
logf(ERROR, "new_attached_event failed: (%s)", msg[0]); return;
} </source>