Object

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

An Object in Service Desk is an object-oriented representation of a single database record.

An Object belongs to a Factory, which is a mapping to one (or two) database table(s).

Normally, each field in a table is mapped to an attribute in its object representation.


Changes to attributes of an object are always done in a three step process: First, you have to check out the object. That means, you tell the system that you want to change this specific object. If nobody else is changing this object, you get a writable version of this object. Then you are able to change the values of the attributes of the object. Finally, you have to do a check-in to this object. The check-in will write the changed attributes to the database and make the changes persistent.


In addition to the data representation, objects can also implement application behavior in the form of triggers and methods. There are two different kind of triggers:

1) Attribute trigger: These triggers are fired when an attribute is written or initiated (while the object is checked out).

2) Object trigger: These triggers are fired when the whole object is checked in (saved).

Both kinds of triggers are executing Spell code. Spell code is a proprietary script language, which can interact with each process of ServiceDesk and is able to do additional changes to other objects or call other object methods


An object may have additional runtime attributes, like QREL, BREL, LREL and LOCAL attributes.

QREL, BREL and LREL Attributes can hold a list of other objects, while a LOCAL attribute is like a normal value (table field) attribute, but is not persistent, which means, it will not be stored in the db.