Documentation

Defining Object Actions

Available Liferay 7.4 U33+/GA33+

Actions define custom operations triggered by object entry events. Liferay listens for the event—add, delete, or update—and executes the operation.

To add an action,

  1. Open the Global Menu ( Global Menu ), go to the Control Panel tab, and click Objects.

  2. Begin editing an object definition.

    Note

    For Liferay 7.4 U22+ and GA22+, you can add actions to system objects.

  3. Go to the Actions tab and click Add ( Add Button ).

  4. In the Basic Info tab, enter a Name and Description for the action.

    Enter an action name and description in the Basic Info tab.

  5. Go to the Action Builder tab to define the custom trigger, conditions, and action.

    Go to the Action Builder tab to define a custom trigger, conditions, and action.

  6. Specify a Trigger event to determine when the action is performed.

    Trigger

    Description

    On After Add

    When an entry is added

    On After Delete

    When an entry is deleted

    On After Update

    When an entry is updated

    Determine when the action is performed.

  7. (Optional) Enable a Condition upon which the action is triggered. Click the Code button ( Code ) to view available expressions.

    On Liferay 7.4 U33+ and GA33+, Liferay validates your expression syntax when you click Done. If the expression is invalid, Liferay displays an error message.

    Use expressions to set additional conditions for the trigger.

  8. For Action, select the type of action performed and fill out all additional fields. See Understanding Action Types for more information.

  9. Click Save.

Once created, the action is active and triggered according to your configuration.

You can deactivate an action from its Basic Info tab. Toggle the Active switch and click Save.

Toggle the Active switch to deactivate the action.

Additional Information