Skip to content

Class constructors

Ryan Newington edited this page Sep 4, 2025 · 7 revisions

Class Constructors

Each object class in ACMA can have a class constructor which defines:

Undelete parameters

When a class is marked as undeletable, the undelete parameters are used to search for an existing, deleted object in the database whenever a new object is exported from MIM. If the search parameters return a result, the existing object is undeleted, otherwise a new object is created.

Important Considerations

  • Attribute conflicts: If the newly exported object from MIM contains attributes that conflict with those that are stored on the deleted object, the new attributes will overwrite any existing attributes.
  • Query structure: The undelete parameters use the standard Database query structure.
  • Uniqueness requirement: It is important to ensure that the attributes used in undelete searches are unique. If an undelete query returns more than one result, then an exception is thrown, and the export operation fails.

Best Practices

  • Use unique identifiers like employee numbers or account names
  • Test undelete queries thoroughly to ensure they return single results
  • Consider the impact of attribute overwrites on existing data

Attribute Constructors

A class constructor has a series of Attribute constructors that are used to build new values for attributes of that object class. These constructors execute in sequential order and can depend on values created by previous constructors.

Execution Order

  • Constructors execute from top to bottom as displayed in the ACMA editor
  • Later constructors can use values created by earlier constructors
  • Each constructor executes only once per export operation

Exit events

Exit events are a powerful feature that allows you to trigger actions external to the object being exported. ACMA provides three types of exit events:

Event Types

When Exit Events Execute

Exit events are evaluated and executed after all attribute constructors have completed for an object, allowing them to work with the final state of the exported object.

Clone this wiki locally