Workflows / Demo

Workflows that wait for people

An expense claim approval run by a durable workflow.

Watch on YouTube Get the code Read the article

The use case

Ann, a sales executive, files expense claims; Jane, her manager, approves them. Every claim follows the same steps, and days can pass between any two of them: the workflow starts, waits for Ann's bill, then asks a manager to decide. Nothing polls, nothing is lost on a restart, and the apps around it hold no process logic.

Ann files claims, Jane approves them: submit, attach the bill, a manager decides, recorded
The app, the integration built in WSO2 Integrator, and the platform

What it shows

Durable workflowWait for an eventHuman task by roleWorkflow Management APIICP monitoring

Run it

You need Docker with Compose and about 6 GB of memory for Docker.

git clone https://github.com/hasithaa/workflow-demo-simple-claim-app
cd workflow-demo-simple-claim-app
docker compose up -d --build

Open http://localhost:8080 and sign in as ann@example.com / demo12345 to file a claim, and as jane@example.com / demo12345 (in a private window) to approve it. The README walks through each step and the ICP console.

Built with ballerina/workflow 1.0.2 · Ballerina 2201.14.1 · ICP 2.1.0

Learn more

The workflow docs explain each building block. See all demos.