The Problem
Currently, the "Create Entity Actions Wrappers" (CRUD actions) feature in Service Studio follows a static, hard-coded template. While this is helpful for rapid prototyping, most professional enterprise projects require specific architectural patterns that the default scaffolding doesn’t support.
As a result, developers must manually wrap every generated action to include:
Audit Trails: Automatically filling CreatedBy or ChangedAt attributes.
Standardized Exception Handling: Ensuring specific UI or Log messages are triggered.
Validation Logic: Checking for business rules before execution.
Naming Conventions: Adhering to specific project-wide naming standards for wrappers.
This leads to a significant amount of repetitive, manual work every time a new entity is created, increasing the risk of human error and architectural inconsistency across the team.
The Proposal
The introduction of a Custom CRUD Pattern configuration within Service Studio (at the Application or Environment level).
This feature would allow architects to define a "Blueprint" or "Template" for CRUD generation. When a developer right-clicks an entity and selects the option to generate actions, Service Studio would check for a defined custom pattern. If found, it would generate the actions based on that template instead of the default OutSystems standard.
Key Capabilities:
Template Definition: Define a standard flow for Create, Update, and Delete actions. For Validation actions as well, for example would automatically check if the mandatory attributes are not empty.
Placeholder Support: Use variables for Entity names or attributes within the template.
Boilerplate Logic: Automatically include logic like "GetUserId()" or "LogRecord" in every generated action.
Architecture Alignment: Ensure all entities immediately follow the project's "Good Practices" without manual intervention.
The Goal
The goal is to move from "Standard Scaffolding" to "Architectural Scaffolding." This would significantly speed up the development of new entities, ensure the entire team follows the same patterns from day one, and reduce the technical debt caused by inconsistently wrapped CRUD Actions. Ultimately, both options would exist simultaneously. The idea is not to replace, but simply to add a new option.