With Liteflow, you can create tasks connecting to different events. This is a nice feature, and is super flexible, but sometimes you just just need something simpler. Triggering a task when an HTTP endpoint's hit is one of these simple, yet really useful, systems that's the foundation for any Cloud Functions.
# What's new
We added a new feature called "HTTP Endpoints".
HTTP Endpoints lets you trigger your workflow from a dedicated HTTP endpoint that can be called from anywhere (curl, webhook from an external service, even your existing backend).
A project can have multiple endpoints, and endpoints can be shared between multiple workflows.
A dedicated endpoint has the following format:
All of these endpoints can be visualized on the console.
# Why it matters
If you are familiar with Cloud Functions products like Serverless, AWS, Google Cloud, etc... you'll quickly feel comfortable creating applications with Liteflow.
Thanks to HTTP Endpoint, it is now easier to connect external web services, or your own existing backend, to a Liteflow application. If you want to trigger something special when your receive a payment on a payment gateway, receive instructions on a chat bot, or even just execute a background task from your backend... all of this and even more are now possible with HTTP Endpoints.
What's more, with the whole orchestration system, your tasks can be triggered automatically based on the dependencies they have with each other. One call of this HTTP Endpoint can now trigger a cascade of tasks without the need for your tasks to know each other, giving you the possibility to add new features without having to update any of the other tasks in your application.
# How to use it
To use the HTTP Endpoint feature, you need to create a workflow with a specific trigger that contains the key
endpointKey (that will be used to generate your endpoint).
# liteflow.yml workflows: hello-world: steps: - type: trigger service: http eventKey: request endpointKey: my-endpoint - ...
This will automatically create an HTTP Endpoint for you and, every time this endpoint is hit, your workflow will be triggered.
This feature is available when you deploy on Liteflow and of course during your local development as well.
Make sure to check out the HTTP Endpoint documentation.