workspace "Flowable + ODE + Flowise + LocalAI Architecture" "C4 model - coexistence and Task Server bridge" { model { ################################# # Personas ################################# user = person "End User" "Persona que interactúa con Flowise/Flowable for human tasks" operator = person "Operator" "Operador / administrador" ################################# # Sistemas Principales (Software Systems) ################################# flowable = softwareSystem "Flowable" "Motor BPMN 2.0 para workflows, human tasks y DMN" { api = container "Flowable Engine" "Ejecuta procesos BPMN, expone REST API y task service" "Java" db = container "Flowable Database" "Almacena instancias de procesos, tareas y metadata" "Postgres / MySQL" } ode = softwareSystem "Apache ODE" "Motor BPEL 2.0 para orquestación legacy (WSDL/SOAP)" { odeEngine = container "ODE BPEL Engine" "Ejecuta procesos BPEL, soporta partnerLinks y persistencia" "Java" odeStore = container "ODE Persistence" "Almacena instancias de proceso BPEL y correlation sets" "RDBMS" } taskserver = softwareSystem "Task Server for ODE" "Bridge/adapter que convierte requests BPEL->human tasks y reinyecta respuestas" { tsAdapter = container "Task Server Adapter" "Endpoint HTTP/SOAP que ODE invoca; normaliza mensajes y gestiona colas" "Node/Java" tsQueue = container "Task Queue / State Store" "Persistencia y reintentos de tareas (correlationId, estado, payload)" "Redis / DB" } flowise = softwareSystem "Flowise" "Interfaz conversacional / UI para interacción humana; integra LLM suggestions" { flowiseApp = container "Flowise App" "UI + API para mostrar tareas, aceptar respuestas, conectar a LLM" "Node/JS" } localai = softwareSystem "LocalAI" "Motor LLM local para sugerencias, resúmenes y generación de contenido" { llm = container "LocalAI Runtime" "Endpoint de inference LLM, modelo local" "C++/Go/Python" modelStore = container "Model Store" "Almacena los modelos e índices" "Filesystem / Object Storage" } ################################# # Relaciones - Context / Integración ################################# user -> flowiseApp "Interacts with (views tasks, responds)" operator -> flowiseApp "Admin / monitors tasks" flowiseApp -> flowable "Optionally creates/updates Flowable user tasks (REST API)" flowiseApp -> llm "Calls for suggestions / summarization" odeEngine -> taskserver "Invokes partnerLink to create human task (SOAP/HTTP)" taskserver -> flowiseApp "Creates task, notifies UI / webhook" taskserver -> flowable "Creates Flowable user task (optional integration)" flowiseApp -> taskserver "Posts user result (approve/reject + payload)" taskserver -> odeEngine "Calls reply/callback to correlate and resume BPEL process" flowable -> odeEngine "Calls ODE for legacy orchestrations (REST/SOAP) (optional)" flowable -> taskserver "Uses bridge to coordinate BPEL-origin tasks (optional)" ################################# # Infra / Security (simple tagging) ################################# cloud = softwareSystem "InfrastructureCloud" "Kubernetes, networking, storage" { tags "Infra" } cloud -> flowable "Hosts / deploys" cloud -> ode "Hosts / deploys" cloud -> taskserver "Hosts / deploys" cloud -> flowise "Hosts / deploys" cloud -> localai "Hosts / deploys" } # model ################################################################# ## Views ################################################################# views { ################################# # System Context View (Level 1) ################################# systemContext flowable "SystemContext_Flowable" { include * autolayout lr title "System context: Flowable, ODE, Task Server, Flowise, LocalAI" description "Visión general de los sistemas y personas que interactúan." } ################################# # Containers View - Flowable ################################# container flowable "Containers_Flowable" { include * autolayout lr title "Container view - Flowable + adjacent systems" description "Muestra los contenedores principales de Flowable y cómo se conectan a ODE, Task Server y Flowise/LocalAI." } ################################# # Containers View - Apache ODE ################################# container ode "Containers_ODE" { include * autolayout lr title "Container view - Apache ODE and Task Server bridge" description "Detalle de la orquestación BPEL y el Task Server que expone endpoints para human tasks." } ################################# # Dynamic View - Human Task Flow (must reference an existing element as scope) ################################# dynamic ode "HumanTaskFlow" { title "Dynamic: Human task flow bridging ODE -> Task Server -> Flowise/LocalAI -> ODE" description "Flujo de ejecución cuando un proceso BPEL en ODE requiere intervención humana." autolayout lr odeEngine -> taskserver "1) invoke partnerLink /task/create (correlationId + context)" taskserver -> flowiseApp "3) POST /tasks -> create task + notify user (webhook)" flowiseApp -> llm "4) optionally: call LocalAI for suggestions / summary" user -> flowiseApp "5) user reviews and submits result (approve/reject + data)" flowiseApp -> taskserver "6) POST /tasks/{id}/complete -> result" taskserver -> odeEngine "7) callback /reply or SOAP response -> correlate and resume BPEL instance" } ################################# # Styles ################################# styles { element "Person" { shape person background #f9f5e7 color #222222 } element "Software System" { shape roundedBox background #ffffff color #000000 } element "Container" { shape component background #e8f4ff color #0b3c5d } element "Infra" { background #eef7f1 color #1b5e20 border dashed } element "Security" { background #fff0f6 color #6b0f4b border solid } relationship "*" { color #555555 } } } # views } # workspace