The Flujo module brings structured project and task management to Corpen. Workflows (proyectos) act as containers for ordered task lists, each with priority levels, deadlines, progress tracking, and team membership. State transitions on tasks are automatically recorded inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/corpentunida-org/corpen/llms.txt
Use this file to discover all available pages before exploring further.
TaskHistory, and every participant can add comments. The Tablero provides a unified Kanban-style board across all active workflows. All routes are grouped under /flujo with auth middleware.
Sub-resources
| Controller | Route | Purpose |
|---|---|---|
WorkflowController | /flujo/workflows | Workflow CRUD, team management, PDF export |
TaskController | /flujo/tasks | Task CRUD within workflows; state-change history recording |
TaskHistoryController | /flujo/histories | Task state transition history (index, show, store, destroy) |
TaskCommentController | /flujo/comments | Comments on individual tasks |
TableroController | /flujo/tablero | Unified Kanban board: workflows, recent tasks, histories, comments |
AuditoriaProyectosController | /flujo/auditoria | Project audit trail with PDF export |
Route Reference
Database Tables
| Table | Model | Purpose |
|---|---|---|
wor_workflows | Workflow | Workflow/project definitions |
wor_tasks (migration: tasks) | Task | Individual task records |
wor_task_histories (migration: task_histories) | TaskHistory | State change log per task |
wor_task_comments (migration: task_comments) | TaskComment | Comments per task |
wor_usuarios | WorUsuario | Pivot: users assigned to workflows |
Models and Relationships
Workflow fields: nombre, descripcion, estado, prioridad, fecha_inicio, fecha_fin, creado_por, asignado_a, activo, es_plantilla, configuracion (JSON), modificado_por.
Valid estado values: Activo, Archivado, Pausado, Completo.
Valid prioridad values: baja, media, alta.
Task fields: titulo, descripcion, estado, prioridad, fecha_limite, user_id, workflow_id, configuracion (JSON).
Valid task estado values: pendiente, en_proceso, revisado, completado.
Valid task prioridad values: baja, media, alta, crítica.
User–Workflow relationship: $user->workflows() is a belongsToMany through the wor_usuarios pivot table. Team members are synced via $workflow->participantes()->sync($ids) from PUT /flujo/workflows/{workflow}/update-team.
Setting Up a Workflow with Tasks
Create the workflow
Navigate to
GET /flujo/workflows/create. Fill in nombre, choose estado (start with Activo), set prioridad, and optionally add fecha_inicio and fecha_fin for deadline tracking. Assign a primary responsible user via asignado_a.Assign team members
From the workflow detail view at
GET /flujo/workflows/{workflow}, use the team panel to select participants. Submit the AJAX call:$workflow->participantes()->sync($ids) adds new members and removes those not in the array atomically.Create tasks
Open After creation, the controller redirects back to
GET /flujo/tasks/create?workflow_id={id} (the workflow_id query parameter pre-selects the project in the form). Submit POST /flujo/tasks:flujo.workflows.show for the parent workflow rather than the generic task index.Move tasks through states
Edit a task at Redirection is dynamic: if a
GET /flujo/tasks/{task}/edit and change estado. On save, the controller detects the state change and automatically writes a TaskHistory record:redirect_to hidden input is present in the form, the controller uses that path; otherwise it falls back to flujo.tasks.index.Add comments to tasks
Comments are submitted to
POST /flujo/comments with a task_id reference. They are displayed in the workflow detail view alongside the TaskHistory entries in a unified auditEvents collection, sorted by created_at descending.The Tablero at
GET /flujo/tablero is a Kanban-style project board. It paginates across all workflows (15 per page), loads the three most recent tasks, four most recent history entries, and four most recent comments in a single view. It also pre-loads estados and prioridades options for any inline quick-create interactions. It does not filter by user—all active workflows are visible to authenticated users who can reach this route.Workflow Dashboard and Progress
The workflow index atGET /flujo/workflows computes a progress percentage for each workflow in the paginated collection:
task_check_count is the eager-loaded count of tasks where estado = 'completado'. The dashboard also provides:
- Global state counts (
globalCounts): total workflows grouped by state, always unfiltered. - Filtered state distribution (
filteredCounts): same grouping applied to the current search/filter. - Compliance metrics (
cumplimiento): counts of on-time (active,fecha_fin >= now()), overdue (active,fecha_fin < now()), and completed workflows. - Leader load (
leadersData): workflow count perasignado_auser for capacity visibility.
Bulk Filtering
The task index atGET /flujo/tasks supports four independent query filters that can be combined:
| Parameter | Effect |
|---|---|
search | Matches titulo or descripcion (LIKE) |
estado | Exact match on task state |
prioridad | Exact match on task priority |
user_id | Tasks assigned to a specific user |
workflow_id | Tasks belonging to a specific workflow |
$request->ajax()), the controller returns only the tasks-list Blade fragment rather than the full page layout.