Documentation: Flowy Triggers


Please support us to improve our service. We would like to use statistics anonymously.

We do not pass on your data! You can find more information in our privacy policy.

Decline

< Back to documentation

Triggers

Flowy currently supports the following kinds of triggers:

  • Cron: allows the time based schedule of processes
  • Events Handler: enables triggering of processes to react on failures
  • Messaging: starts processes based on incoming messages
  • Rest: provides REST capabilities. For this kind of triggers the methods, URL as well as maximum request size needs to be defined

Please note that a process has to be created before a trigger can be associated to it. Multiple triggers can point to the same process.

The execution of an trigger always leads to the creation of an event of the according type.

Cron trigger

Cron triggers can be configured to fire on time based conditions. They can be i.e. set to run either once a day or periodically. Seconds, minutes and hours can be defined using intervals. Please note the difference between 0 (only when 0 is matching) and * (any).

Depending on the desired configuration, one or multiple cron triggers might be needed for the same process.

A simple cron trigger
A simple cron trigger

Events Handler

Event Handlers are designed to respond to errors that occur during the execution of a process. They can be specifically tailored for individual processes or configured universally across all processes. Universal implementation should be approached with thorough consideration due to its extensive impact.

Event Handlers are essential for maintaining process integrity, allowing for real-time error monitoring and responsive action. Configurations can range from simple notifications to complex automated recovery processes, ensuring that each error is appropriately addressed according to its severity and type.

As with any powerful tool, careful planning and understanding of the Event Handler's mechanisms are crucial to prevent unintended consequences and to make the most effective use of its capabilities.

Messaging trigger

Messaging Triggers enable the initiation of processes in response to incoming messages, utilizing platforms such as Kafka or JMS. They are highly efficient in environments where real-time data exchange or event-driven architectures are employed.

Incorporating Messaging Triggers into your workflow allows for a seamless, automated response system, enhancing the responsiveness and agility of your processes. Their implementation can significantly streamline operations, leading to more efficient and reliable process execution.

Rest trigger

Rest triggers are very powerful as they support unauthenticated as well as authenticated access to them. Both basic and session based authentications are supported.

Before execution, validation checks can be performed. This can be defined for the path variables as well query parameters. Furthermore for headers and the body itself.

In case of path variables, the following syntax shall be used:

/group/{groupId}/edit/{userId}

The above example is using two variables: groupId respective userId. The must be defined as path variables in the referenced validation.

A simple REST trigger
A simple REST trigger

Rest requests

Within the process, you can use the following variables to access the data of the request:

$.restRequest.url
$.restRequest.method
$.restRequest.queryParameters
$.restRequest.requestBody
$.restRequest.headers
$.restRequest.pathParameters

Rest responses

If you want to return data, please set the $.restResponse.body.text variable accordingly. Enclosed examples, once with a string and once with a variable:

$.restResponse.body.text: 'Some text'
$.restResponse.body.text: $jsonVariable

Alternatively, it is possible to set the entire response body:

$.restResponse.fullBody: 'my 100% custom response body'
$.restResponse.statusCode: 'OK'

If order to set a specific http code enums, i.e.:

$.restResponse.body.text: 'Some text'
$.restResponse.statusCode: 'CONFLICT'

This list of HTTP codesopen in new window provides all the available values.