Setting Up A Local Environment
Run Lemline on one machine with SQLite. Lemline stores workflow definitions, queued messages, and workflow history in local files. Use a writable directory on a local filesystem.
1. Install Lemline
Create a project directory and open it in your terminal:
SQLite support was added after version 0.7.0. Use a build that lists sqlite for messaging, orchestration and the --analytics option in config create --help.
Install JDK 17 or later and download the nightly JAR:
2. Configure the SQLite files
From lemline-project, run the configuration wizard. In PowerShell, use .\bin\lemline.exe for the remaining commands. With the JAR, substitute java -jar lemline.jar for bin/lemline.
At Select messaging broker, enter
sqlite.At Select database, enter
sqlitefor orchestration.At Select analytics database, press Enter to accept
sqlitefor workflow history.
For a script, the equivalent command is:
Lemline automatically reads .lemline.yaml from the current directory. The generated configuration uses three separate files: orchestration.db for definitions and durable operations, messaging.db for queues, and analytics.db for workflow history.
To let the worker run workflows from the tutorials and DSL examples, add the namespaces line under the existing lemline: key at the same indentation as database.
Initialize the database tables:
3. Verify the setup
Start the worker from lemline-project:
The worker serves its metrics and health endpoints on port 8080. If it stops with Port 8080 seems to be in use by another process, start it with --metrics-port 8081 instead, here and in the later exercises.
Leave the worker running and list the registered definitions from a second terminal in the same directory:
On a fresh project, expect No workflows found. Leave the worker running.
For the order-processing tutorial, continue with Acknowledge the first order.
Use the tutorial shop
Examples that make HTTP calls use a local demonstration shop. Have Docker with Compose and a checkout of the Lemline source repository ready. Run the shop commands in each exercise from the root of that checkout. The shop listens on http://127.0.0.1:8787. Each exercise starts with fresh shop data. Stop the shop at the end of the exercise to discard its in-memory state.
Keep the worker and CLI in lemline-project. Unless an exercise says otherwise, use the worker's debug output to check the result. A successful instance logs Workflow completed with output followed by its output.