Plugin idea: Visualize the action widgets as workflow graph

Hi @linonetwo, did you figure it all out?
I do share your interest to use a TW to operate as a BPM and did some research about ways to achieve it, here are my 5 cents:

  1. Plugin approach as described in your first post

  2. tw5-NodeRed BPM:
    I guess we could build BPMN flows within NodeRed by creating a module for this purpose, something similar to what is done by node-red-contrib-camunda, then use Tw5-node-red to deliver a finished TW based BPM solution.

  3. Integrate a “bpmn.io” library into TW.
    This library is developed and maintained by the creators of the proprietary Camunda platform but I think is an open toolkit .

  4. Integrate bpmn-server (built upon bpmn.io) with TW in a microservices architecture approach (requires a MongoDB):
    The logic to do so is the same as described here:

In any case, we might need to pay some attention to potential architectural mismatch between the chosen TW based solution and BPMN’s state-driven paradigm, which uses possession tokens to decide next actions. Key gaps include:

  • State Management: Context store is not a transactional, instance-aware database required to track the state of thousands of concurrent process instances.
  • Control Flow: Might lack native, robust constructs for core BPMN elements like parallel gateways (especially the “join” operation).
  • Runtime Model: Single-threaded event loops are not designed for the long-term “wait states” (e.g., user tasks, timers) that are central to BPMN.