Send WaitCall attrNotify list
From SDU
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 sends notifications to a list of concrete recipients.
This action can be called in spell code in method send_wait (or send) using call_attr action.
Usage
void send_wait (int timeout, object top_object, "call_attr", string factory_name, "notify_list", string contact_persid, int evt_level, string evt_mtitle, string evt_mbody, string unknown1, int trans_pt, string parent_object, int uknown2, int unknown3)
- 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)
- contact_persid - list of space (' ') separated persistent IDs of notified contacts
- evt_level - notification level (low, normal, high, emergency)
- evt_mtitle - message subject
- evtmbody - message body (plain text format)
- unknown1 - usually empty string: ""
- trans_pt - unknown, but has these values: 28 - for request; 29 - for change and issue
- parent_object - peristent ID of a base object (request, change...)
- unknown2 - usually 0
- unknown3 - usually 0
Results
No results.
Examples
string evt_mtitle, evt_mbody; evt_mtitle = format("Change Order %s - '%s' Event Notify Group", chg_ref_num, event_tmpl.condition.sym); evt_mbody = format("change %s event notification\n", chg_ref_num); evt_mbody += format("priority: %d\n", priority.sym); evt_mbody += format("assigned to: %s\n", assignee.combo_name); evt_mbody += format("requester: %s\n", requestor.combo_name); evt_mbody += format("description: %s\n", description); int evt_level; evt_level = 2; int trans_pt; trans_pt = 29; string contact_persid; if (!is_null(group)) { contact_persid = misc::find_mang(group); if(!is_empty(contact_persid)) { send(top_object(), "call_attr", "cnt", "notify_list", contact_persid, evt_level, evt_mtitle, evt_mbody, "", trans_pt, persistent_id, 0, 0); if (msg_error()) { logf(ERROR, format("macro event error on notify_list '%s'", msg[0])); } } }






