Loading Workflows from JSON
Last updated
Last updated
Loading workflows from JSON is a great way to store workflows in a database or file system. This guide will show you how to load workflows from JSON files.
The most straightforward way to load workflows from JSON files is to simply load the contents of a JSON file, deserialise it and then execute the deserialised workflow.
The console should output the following:
When you're hosting an , providing workflows from JSON files is even easier.
All you need to do is create a folder called Workflows and add any number of workflow JSON files to it.
Let's try it out:
In this guide, we've demonstrated configuring an Elsa Server to host workflows from JSON files. We covered loading a JSON file, deserialising it into the Workflow
class, and executing the workflow.