Using Manual Actions

Using Manual Actions

When you use a standalone trigger in an object action, the action becomes manual, meaning it must be explicitly run in one of two ways:

  • by a user via the object definition’s UI
  • with a call to the headless API

This example creates a standalone action for sending notifications.

You can use the standalone trigger to run any type of object action manually.

See Defining Object Actions for how to add standalone actions to object definitions.

Trigger Actions via UI

Active standalone actions appear in the Actions menu for object entries. To trigger these actions via the UI,

  1. Navigate to the object definition’s application page.

  2. Click the Actions button (Action Button) for the desired entry and select the standalone action.

    In this example, the action is Send Reminder.

    Click the Actions button for the desired entry and select the standalone action.

Trigger Actions via APIs

Liferay automatically generates REST APIs for published object definitions. These include APIs for active standalone actions.

To view these APIs,

  1. Open Liferay’s API Explorer at [server]:[port]/o/api (e.g., localhost:8080/o/api).

  2. Click REST Applications and select the desired object definition. Custom objects use the c/[pluralobjectlabel] naming pattern (e.g., c/tickets).

For each standalone action, Liferay generates two PUT APIs, one that uses the entry’s ID and another that uses the entry’s External Reference Code (ERC).

Liferay generates two PUT APIs, one that uses the entry's ID and another that uses the entry's ERC.

Calling either API triggers the action for the specified entry.

Calling the API triggers the action for the specified entry.

Additional Information