Create new event action
This action requires the "create event action" permission.
To add a new event action, navigate to the "Add new action" form, by pressing the "+" button in the top right corner above the table.
Event actions should (at current time) only be added by administrators with access to the code base, asdue ato class names withand their full pathpaths arebeing mandatory when creating a new event actionactions. and thatThat information is only available to developers.
OnThe creation form consists of several fields, required for creation of a new event action:
- Name:
- The name of an event actions should be simple and descriptive, making it easy to figure out an event action's function from name alone (eg. Send email to user when new order is created).
With the form,name onceset, allthe aevent name,that triggers the event action and the action that is performed by the event action need to be defined.
- Event full class
namesname:- A full path (namespace and
requiredclassargumentsname)haveofbeentheentered,Event class that needs to be triggered to perform the event action (eg. App\Containers\Product\Events\ProductsStockUpdatedEvent).
- A full path (namespace and
- Action full class name:
- A full path (namespace and class name) of the Action class that will run once the Event is triggered. (eg. App\Containers\Mail\EventActions\SendEmailAction).
With the name, event and action defined, the three top switches shouldcan be toggled on/off.
- Enabled:
- An event action can be either
activatedactive or not.DeactivatedInactive event actions will never run.
- An event action can be either
- Fail in error:
- When this
option is toggled on, any error that appears when running the event action, will cause the action to stop and report an error. If notify optionswitch is toggled on, theerroraction will beemailedperformedtoasthenormal,developmentbutteam.will stop immediately on encountering an error.
- When this
- Notify on error:
- When this
optionswitch is toggled on, whenever the event actionruns andencounters an error, an email is sent to the development team to inform them of a failure when performing the event action.
- When this