Arbortext Command Language > Callbacks > session_add_callback
  
session_add_callback
session_add_callback (cbtype, callback[, "PREPEND"])
Appends callback to the list of callback functions to be called when desired session-level event occurs. If "PREPEND" is specified, the callback is prepended to the list of callback functions. Functions are called in the order that they appear in the list.
The cbtype parameter needs to be a valid callback type. If cbtype is invalid, the function returns 0. If it's successful, the function returns 1.
The callback parameter specifies the actual callback to add. The "PREPEND" flag specifies that the callback should be prepended, not appended.
* 
If callback is already on the callback list for the session, the list is shuffled to place the callback into the desired position; the callback is not added to the list a second time.
Refer to Callback Functions introduction for helpful overview information.
Refer to the following valid session callback types.