{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifanlwuuvseuqejvp4po4trzun446ajqywwynm7ls4ubquk3sienq",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mq4hdf7pqxo2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreihskrse3kokt5hcqzkvzwaefyymwsnixjhnbjpfcwoydcfqi7crxm"
},
"mimeType": "image/webp",
"size": 63220
},
"path": "/hamid_rm/introducing-go-workflow-engine-a-plug-and-play-workflow-solution-5dih",
"publishedAt": "2026-07-08T05:50:54.000Z",
"site": "https://dev.to",
"tags": [
"workflow",
"opensource",
"showdev",
"go",
"go-workflow-engine",
"repository"
],
"textContent": "A while ago, I needed a clean workflow orchestration solution for a Go project. Nothing massive—just a simple, reliable way to define steps, track execution, handle failures, and keep business processes organized.\n\nI checked out several existing tools, but many felt too heavy or required infrastructure I didn’t want to introduce. So I built my own.\n\nToday I’m open-sourcing **go-workflow-engine**!\n\n### Why Another Workflow Engine?\n\n * Keep it lightweight and easy to integrate into existing Go apps\n * Make persistence modular — no forced database\n * Use an event-driven design so your application can react naturally\n * Stay flexible instead of locking you into a big platform\n\n\n\nThe engine is meant to become part of your application, not a separate service.\n\n### What a Workflow Looks Like\n\nWorkflows are defined in simple JSON. Here’s a minimal example:\n\n\n\n {\n \"workflow_type\": \"approval\",\n \"initial_step\": \"submit\",\n \"initial_state\": \"Pending\",\n \"steps\": [\n {\n \"name\": \"submit\",\n \"title\": \"Submit Request\",\n \"actions\": [\n {\n \"name\": \"SUBMIT\",\n \"next_step\": \"review\",\n \"new_state\": \"Submitted\"\n }\n ]\n },\n {\n \"name\": \"review\",\n \"title\": \"Review Request\",\n \"actions\": [\n {\n \"name\": \"APPROVE\",\n \"next_step\": \"done\",\n \"new_state\": \"Approved\"\n },\n {\n \"name\": \"REJECT\",\n \"next_step\": \"submit\",\n \"new_state\": \"Rejected\"\n }\n ]\n },\n {\n \"name\": \"done\",\n \"title\": \"Completed\",\n \"actions\": []\n }\n ]\n }\n\n\nThe engine takes care of running the workflow while you focus on your business logic.\n\n### Key Design Decisions\n\nEvery project is different — some teams use PostgreSQL, others MySQL or even custom storage. That’s why I made the persistence layer fully pluggable.\n\nI also built in a clean event system. Workflows emit events at key moments so your application can listen and respond without tight coupling.\n\n### Built with AI-Assisted Development\n\nGemini, Cursor, and MiMo helped speed up research, experimentation, and coding, so I could focus more on architecture and design.\n\n### Current Features\n\n * Simple JSON workflow definitions\n * State tracking and orchestration\n * Event-driven lifecycle handling\n * Modular persistence (in-memory + GORM support)\n * Extensible and lightweight\n * Easy to embed in existing Go applications\n\n\n\n### Looking for Feedback\n\nThis started as a personal tool to solve a recurring need, but I believe other Go developers might find it useful too.\n\nIf you want a lightweight workflow engine that embeds nicely into your app without bringing a full platform along, I’d love to hear your thoughts.\n\nFeedback, suggestions, issues, and contributions are all welcome! Feel free to open an issue or PR in the repository.",
"title": "Introducing go-workflow-engine: A Plug-and-Play Workflow Solution"
}