Discourse Workflow

:information_source: Summary A topic-based workflow system for Discourse with configurable steps, actions, workflow list filters, and Kanban view
:hammer_and_wrench: Repository Link https://github.com/merefield/discourse-workflow
:open_book: Install Guide How to install plugins in Discourse

Enjoying this plugin? Please :star: it on GitHub! :pray:

Summary

discourse-workflow provides a secure workflow framework for Topics. Each workflow is made of configurable steps and options, and topics move through those steps until completion.

It supports branching and looping, list and Kanban discovery views, auditability, and automation-friendly behavior while staying close to core Discourse permissions and UI patterns.

Features

  • Topic-based workflow instances
  • Workflow definitions with Steps and Step Options in admin
  • Uses existing Discourse Categories, Groups, and permissions
  • Workflow discovery list at /workflow
  • Quick filters in workflow discovery:
    • My Categories
    • Overdue
    • Step = X
  • List/Kanban toggle (shown when one Kanban-compatible workflow is in scope)
  • Kanban board with:
    • clickable cards
    • legal drag/drop transitions
    • keyboard transitions (ArrowLeft / ArrowRight) when legal
  • Topic banner with:
    • current workflow and step
    • available action buttons
    • visualization link
  • Overdue support with hierarchy:
    • global setting: workflow_overdue_days_default
    • workflow override
    • step override
    • 0 disables overdue at that scope
    • Overdue indicators in workflow list and Kanban cards
  • Transition audit trail via small action posts
  • Notifications when topics arrive in watched categories (Watch First Post)
  • Workflow visualization from topic and discovery
  • Data Explorer support for workflow audits and reporting
    • two default queries - burn-down/up and audit log
  • Optional AI-assisted step handling

Introductory Concepts

Swim Lanes

Each workflow lane is a Category (or Subcategory). As a topic progresses, it moves between categories according to configured transitions.

Workflow Instances

  • A single workflow item (for example, a ticket) is a Topic.
  • Tags can be added for metadata such as priority.
  • Category movement is controlled by workflow actions (unless staff override).

Actors

Users who can create topics in a step category can act on workflow items in that step. Users with reply access can still comment as normal.

Actions via Options

Step Options define the available actions at each step. Each option is shown as a topic action button and can move the topic to a target step.

Dashboard

Use /workflow nav filter to see workflow topics you can access, then filter or switch to Kanban for board-style flow management.

Audit Trail

Transitions are logged as small action posts on the topic. Bundled Data Explorer queries support auditing and operational reporting.

Visualisation

Workflow visualization is available from:

  • topic banner links
  • workflow fields in discovery list

Major Differences from Stock Discourse

  • You cannot create a new topic directly in categories beyond step 1 of a workflow.
  • You cannot manually change category for a workflow topic unless you are staff.
  • Only users with category create rights can execute workflow transitions.

Getting Started

  1. Enable the plugin with workflow_enabled.
  2. Go to Admin → Plugins → Discourse Workflow.
  3. Create a Workflow, save it, then add Steps and Step Options.
  4. Configure category permissions so workflow actors have Create in the relevant step categories.
  5. Create a topic in the first step category.
  6. Transition it using topic action buttons or Kanban interactions.
  7. Use /workflow for operational queue management.

AI Actions

AI can action a step when configured.

Requirements:

  • valid workflow_openai_api_key
  • AI enabled on the step
  • prompt includes both {{options}} and {{topic}}

Example prompt:

your options are {{options}}. if the following text states it is delicious, please accept, otherwise reject. {{topic}} answer with one word from those options

Known Issues

This plugin is still evolving. Please report issues and enhancement ideas on the repository or this Meta topic.

25 Likes

Gets some love.

4 Likes

Have deployed a couple of fixes:

https://github.com/merefield/discourse-workflow/commit/ac49503e8ddc579f9aa8411d8459475ce13c77d7

https://github.com/merefield/discourse-workflow/commit/9a5ebea6299df5a8a7c8582caca942fbaf4f3316

2 Likes

Makes for a more practical view on mobile:

  • IMPROVE: The Workflow Topic List works great on Desktop, but on Mobile it’s too wide, so instead of adding all those columns on mobile, add a Workflow badge to the Title and restrict the full set of columns to Desktop.
2 Likes

some minor but important tweaks.

1 Like

Hi Robert,
I am playing with the workflow plugin, without AI. This is a simple workflow intended to be used as a support chain for a linux cafe which helps people to migrate from Windows. New topics are created through RFC 6233 mails with subaddressing and come in into the first sub category (level1).

Two issues:

  1. IDs of the workflow steps are not unique. I have three steps with the same ID. ??
  2. a “start” Action on the incoming topic creates “422 unprocessable content” Maybe thats a result of 1)
3 Likes

Thanks for your patience and your feedback. I appreciate your interest in the plugin.

It is a little experimental and as you can see has not received a lot of feedback yet so there are bound to be teething issues.

I will try to recreate your workflow and attempt to recreate the issue.

In the meantime can you screenshot the workflow in the admin screen and share that?

@Thomas_Rother do you have a backtrace on this?

3 Likes

Hi Robert,
no worries, I am aware that this is experimental. Therefore its only installed on a self hosted test instance. You can register there and I could give you admin permissions:

https://forum2.netzwissen.de/login

2 Likes

OK by way of a walkthrough, here’s how I got on:

  • Set up Internet Cafe Tickets Category
  • Set up all the steps as Sub-Categories, resulting in this:

So far so good.

Now let’s create the steps:

OK I can see at least two issues! (But one of them probably caused by the other)

That is strange as I was sure that this was working before. I’m having a look now and if I have time I’ll release a fix shortly.

3 Likes

@Thomas_Rother give that a go:

(You may have to delete and recreate the affected steps)

2 Likes

Which are the most common use cases for this plugin and is this working with Gemini flash 2.0?

Any business process (within reason) with multiple steps and actors. May require extension for specific integrations.

It’s currently OpenAI only, but PR welcome (it uses Chat Completions so not a massive amount of work).

1 Like

Big News: you can now get the stats to create burn-up/down charts:

  • Adds a daily job to create state count stats that you can use in burndown/burnup charts.
  • Adds a job that check presence of or adds two useful Data Explorer queries
    • Audit log for all transitions
    • Daily counts for workflow instances at each step of their workflow, facilitating burndown/up charts (just export the results).
    • You can give specific groups access to these reports.

NB Discourse Workflow is now only compatible with tests-passed for time being due to changes in the way gem dependencies are handled as part of the major plugin bundling. This should change once the next stable release is made.

4 Likes

I’m trying to figure out why my site became sluggish…

Deprecation warning

[PLUGIN discourse-workflow] Deprecation notice: Accessing site.mobileView or site.desktopView during the site initialization phase is deprecated. In future updates, the mobile mode will be determined by the viewport size and as consequence using these values during initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: Designing for Different Devices (Viewport Size, Touch/Hover, etc.)] deprecated.js:62:13

I doubt very much this is causing your site to become sluggish!! :laughing: - it’s a deprecation warning.

looking forward to your PR :slight_smile:

1 Like

Well it shouldn’t be due to Discourse Workflow any longer as I’ve closed several N+1 issues inc. on Topic List and the Visualisation:

etc.

3 Likes

Big update with several new features, including

  • New workflow-specific topic list filters
  • “Overdue” flagging
  • Richer Topic workflow meta information
1 Like

Absolutely huge update:

Support for Kanban view:

  • Added a full Kanban mode to /workflow with a List/Kanban toggle, shown only when a single Kanban-compatible workflow is in scope.
    • Introduced explicit Kanban compatibility validation (including deterministic one-edge mapping) and surfaced compatibility status in workflow admin.
  • Made workflow items actionable from Kanban: drag/drop between legal steps, keyboard step moves with arrow keys, and click-through to open topics.
  • Improved reliability for concurrent updates: stale transitions now return 409, shows a clear stale-state message, and triggers refresh to re-sync UI state.
  • Board usability and clarity: optional workflow-level Kanban tags, overdue indicator support on cards, and lane styling including category-colored column borders.
2 Likes