Start and follow an order through the gRPC gateway
Send an order ID to Lemline over gRPC and read the workflow's acknowledgement from its event history.
Complete the SQLite setup and keep the worker running. Install grpcurl and jq, and have a Lemline source checkout matching the version you run. The checkout provides the gateway service definition. Use a Bash-compatible shell for the commands below.
Run the Examples
In the setup directory, save this version of the order acknowledgement workflow as acknowledge-order.yaml. If you already registered version 0.1.2, skip the publish command. With the JAR, substitute java -jar lemline.jar for bin/lemline in the commands below.
Add this block under the existing lemline: key in .lemline.yaml. This example uses a plaintext endpoint without authentication on the local loopback interface. For a shared installation, follow Deploy the gRPC gateway.
Start the gateway from the setup directory in another terminal. Use a metrics port distinct from the worker's.
You should see Started gRPC server on 127.0.0.1:9000.
Submit the order
In the terminal you used to publish the workflow, set LEMLINE_SOURCE to the absolute path to your source checkout and define a helper that uses its service definition:
Read the acknowledgement
Use the returned instance ID to read its history. The worker executes the workflow and writes lifecycle events to analytics asynchronously. If you get NotFound or the history has no workflow.completed event yet, wait a moment and rerun this command:
Call | Expected result |
|---|---|
|
|
| The completed event contains |
Press Ctrl+C in the gateway terminal when you finish. Continue with safe start retries or following a live timeline.