Script with an object launch point
An object launch point associates a script with a business object and executes in response to a business object event. Events are associated with a specific context so that the script executes before or after the object is saved or after it is committed to the database. You can, optionally, associate an event with a condition and limit execution to circumstances where the condition is satisfied.
An object launch point can be based on any object. You must associate an object launch point with at least one of the following events:
- Initialize value
- Indicates whether the script is executed by the initialize event.
- Validate application
- Indicates whether the script is executed by the validate event.
- Allow object creation
- Indicates whether new Maximo® business objects (MBOs) can be created. For example, your business logic can state that when a purchase order is approved, new POLINE objects cannot be created. Only one launch point can be defined for the selected MBO and the Allow object creation event.
- Allow object deletion
- Indicates whether MBOs can be deleted. For example, your business logic can state that when a work order is approved, WOLINE objects cannot be deleted. Only one launch point can be defined for the selected MBO and the allow object deletion event.
- Save
- Indicates whether the script is executed by the save event. If you select the Save radio button, you must specify the context for the save in the Save section.
- Before save
- The script is executed and sets values on the business object before the underlying transaction is saved. For example, you can apply a business rule that checks if a specific naming convention has been followed when a new record is being saved. If the naming convention rule has not been followed, the save activity is not allowed and the user receives an error message.
- After save
- The script is executed after the business object is saved but before the changes are committed. This event context enables you to incorporate a business rule and roll back processing on a transaction if necessary.
- After commit
- The script is executed after a transaction has been committed and cannot be rolled back. This event context is typically used to initiate additional actions immediately after the commit of a particular business object. For example, a script initiates sending email notifications when a work order is completed.
In the Object Event Condition field, you can restrict activation of the
script by specifying a condition that is related to the event. For example, to redirect a user to a
new form when a user attempts to add a person whose language is not English. In this scenario, if
the langcode
attribute for the person is set to English, the script is not
activated.