User Level
Business Administrator
User LevelBusiness Administrator SyntaxAdd TypeAn object type is created with the Add Type command. Syntax
All these clauses are optional. You can define a type by simply assigning a name to it. If you do, 3DSpace assumes that the type is non-abstract, does not contain any explicit attributes, and does not inherit from any other types. If you do not want these default values, add clauses as necessary. You might notice performance problems when adding a Type to a very large type hierarchy. If you experience this, from Oracle, turn off “cost-based optimization” and the situation should improve. See the Oracle documentation for more information. Attribute ClauseThis clause assigns explicit attributes to the type. These attributes must be previously defined with the Add Attribute command. For more information, see Add Attribute Command. If they are not defined, an error message is displayed. Adding an attribute to a business type should not be included in a transaction with other extensive operations. This is a “special” administrative edit, in that it needs to update all business objects of that type with a default attribute. If you add an attribute that is part of an index, the index is disabled. For more information, see MQL Concepts: Indexes. A type can have any combination of attributes associated with it. For example, the following Add Type command assigns three attributes to the Shipping Form type:
Three explicit attributes are associated with this type definition: Label Type, Date Shipped, and Destination Type. When the user creates a business object of a Shipping Form type, that person is required to provide values for these attributes. For example, the user might enter the following values at the attribute prompts:
These values are then associated with that instance along with any files the user might want to check in. Derived ClauseUse the Derived clause to identify an existing type as the parent of the type you are creating. The parent type can be abstract or non-abstract. A child type inherits the following items from the parent:
If a derived type has a defined trigger (from a relationship, for example), that trigger replaces any triggers inherited from the parent type. Only the triggers for the derived type will execute. If you want the inherited triggers to execute, call them from within the trigger for the derived type. Note:
When you
print type DERIVEDTYPENAME , the
inherited triggers output lists the triggers inherited from
the parent type, even if they will not run because the derived type has its own
trigger defined.Assigning a parent type is an efficient way to define several object types that are similar because you only have to define the common items for one type, the parent, instead of defining them for each type. The child type inherits all the items listed above from the parent but you can also add attributes, programs, and methods directly to the child type. Similarly, you can (and probably will) assign the child type to a policy or relationship that the parent is not assigned to. Any changes you make for the parent are also applied to the child type. For example, suppose you have a type named “Person Record”, which includes four attributes: a person’s name, telephone number, home address, and social security number. Now, you create two new types named “Health Record” and “Employee Record:”
Both new types require the attributes in the Person Record type. Rather than adding each of the four Person Record attributes to the new types, you can make Person Record the parent of the new types. The new types then inherit the four attributes, along with any methods, programs, policies, and relationships for parent. Abstract ClauseAn abstract type indicates that a user will not be able to create a business object of the type. An abstract type is helpful because you do not have to reenter groups of attributes that are often reused. If an additional field is required, it needs to be added only once. For example, the “Person Record” object type might include a person’s name, telephone number, home address, and social security number. While it is a commonly used set of attributes, it is unlikely that this information would appear on its own. Therefore, you might want to define this object type as an abstract type. Since this type is abstract, there will never be any actual instances made of the Person Record type. However, it can be inherited by other object types that might require the attribute information. Even though a user might never be required to enter values for the attributes of a Person Record object, they might have to enter values for these attributes for an object that inherited the Person Record attributes (such as an Employee Record or Health Record). Use one the following clauses:
If the user can create an object of the defined type, set the abstract argument
to For example, in the following definition of Federal Individual Income Tax Form, the user can create an object instance because an Abstract clause was not included in the definition:
This definition is equivalent to:
Method ClauseThe Method clause of the Add Type command assigns a method to the type. A method is a program that can be executed from 3DSpace when it is associated with the selected object. Programs selected as methods require a business object as a starting point for executing. For example, the following adds the existing program named “calculate tax” to the Federal Individual Income Tax Form.
A user can then select any Federal Individual Income Tax Form object and execute the program “calculate tax.” Form ClauseThe Form clause of the Add Type command assigns a form design to the type. This form must be previously defined with the Add Form command. For more information, see Add Form. If it is not defined, an error message is displayed. A type can have any number of forms associated with it. For example, the following Add Type command assigns three forms to the Employee types:
Trigger ClauseEvent Triggers provide a way to customize behavior through Program objects. Triggers can contain up to three Programs, (a check, an override, and an action program) which can all work together, or each work alone. The Trigger clause specifies the program name, which event causes the trigger to execute, and which type of trigger program it is. Types support triggers for many events.
The format of the Trigger clause is:
When included, the
By default (
The selectable for the History Clause The Copy TypeAfter a type is defined, you can clone the definition with the Copy Type command. This command lets you duplicate defining clauses with the option to change the value of clause arguments. Syntax
History Clause The Modify TypeYou can change the definition with the Modify Type command. This command lets you add or remove defining clauses and change the value of clause arguments.
Each modification clause is related to the arguments that define the type. For example, the following command changes the name and attribute list of the Shipping Form type:
|