Get dob Spell method

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 loads from database an object connected over SREL relation to an another object and return it as full DOB object.

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 attr_name, "get_dob") </source>

  • timeout - how long (?in seconds?) should the method wait for finishing the method (0 means infinite)
  • top_object - object where the attribute is placed
  • attr_name - name of SREL attribute

Results

On success attribute DOB object is in the first position of global array msg. <source lang="javascript"> object retval; retval = msg[0]; </source>

Examples

<source lang="javascript"> // Part of code to read request Affected End User send_wait(0, this, "call_attr", "customer", "get_dob"); if (msg_error()) {

   logf(ERROR, "%s: error in get_dob(customer): %s", method, msg[0]);
   return;

} object aff_eu; aff_eu = msg[0]; .... </source>