Blog

Introducing the new trigger system

posted by chriskapp on

With the latest 6.1 version we have introduced a new trigger system. The trigger system basically provides a way to execute a specific action in case an event was dispatched. We have now three ways to execute an action, first through an operation (HTTP request), then through a cronjob (periodically) and now through a custom event. If we take a look at the Fusio architecture the system is now build on the following entities.

Fusio Architecture

The trigger allows us to build actions which only execute a simple task and then dispatch an event. Through the cronjob we can build actions which are periodically invoked which can be used i.e. to observe a specific endpoint and only fire an event if specific conditions are met. Through this we can build Zapier like workflows where we have a trigger and an action.

To create a trigger at the backend you only need to select the event and action which should be executed.

Trigger create

To dispatch an event you can use the dispatcher which is available at every action. For example, you could use the WorkerPHP action to run the following action which dispatches an event.

Action trigger event

The trigger system is a powerful tool to build more decoupled actions which only solve a specific task and which together compose more complex systems. We are also planing to improve our marketplace so that it is easier to share these kinds of triggers and actions. So feel free to test this new feature and if you want to provide some feedback take a look at our GitHub discussions or issues page.

Best regards
Christoph

part of the Apioo-Project