advpl-to-tlpp-migration

Migrate legacy AdvPL .prw/.prx sources to modern TLPP .tlpp code.

115|54|Updated May 25, 2026
One-click install
npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration-totvs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: advpl-to-tlpp-migration
Source: https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration
Command: npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration-totvs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Legacy AdvPL codebases become hard to maintain and extend, especially when teams need TLPP capabilities like typing, namespaces, Try-Catch, REST annotations, and modern logging patterns without breaking runtime behavior.

Core Features & Use Cases

  • End-to-end migration plan: Converts .prw/.prx to .tlpp while enforcing the mandatory extension rule when tlpp-core.th is used, preventing silent TLPP directive failures.
  • Language modernization transformations: Guides replacing prohibited constructs (e.g., StaticCall), adding namespaces, typing, named parameters, JSON inline, class access modifiers, and migration away from ErrorBlock toward Try-Catch.
  • Framework and compliance updates: Handles migrations from WsRESTful to TLPP REST annotations, replaces console APIs with FWLogMsg, removes IIF, updates REST/commit interception patterns (FWModelEvent / FWFormCommit(oModel)), and replaces ISAM usage with FWTemporaryTable.

Quick Start

Migrate your legacy AdvPL file to TLPP by asking the agent to convert the code while applying the extension-first rule, namespace and typing additions, prohibited construct removals, and the required framework migrations.

Frequently Asked Questions about advpl-to-tlpp-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate legacy AdvPL code to TLPP?

To migrate legacy AdvPL to TLPP, you convert .prw or .prx files to the .tlpp extension and include tlpp-core.th. This process adds namespaces, typing, and named parameters while replacing prohibited constructs like StaticCall and IIF.

What is the best way to upgrade WsRESTful services to modern TLPP REST annotations?

Upgrading WsRESTful services to TLPP REST involves migrating legacy service definitions to TLPP REST annotations. This modernizes REST service architecture while preserving runtime behavior and enabling safer error handling through Try-Catch adoption.

Does migrating to TLPP require changing file extensions and headers?

Yes, TLPP migration requires the mandatory .tlpp file extension when using tlpp-core.th. Enforcing this extension-first rule prevents silent TLPP directive failures during the modernization of legacy AdvPL sources.

How to replace ErrorBlock with Try-Catch in AdvPL refactoring?

Replacing ErrorBlock with Try-Catch in AdvPL refactoring involves adopting systematic Try-Catch transformations. This migration away from ErrorBlock enables safer error handling and modern logging patterns using FWLogMsg instead of console APIs.

Why does StaticCall need to be removed during TLPP modernization?

StaticCall must be removed during TLPP modernization to comply with SonarQube-style code-quality rules. The transformation replaces these prohibited constructs with structured class access modifiers and modern parameter clarity.

Can I migrate ISAM database usage to FWTemporaryTable in TLPP?

Yes, you can migrate ISAM usage to FWTemporaryTable during TLPP refactoring. This framework compliance update replaces legacy ISAM patterns and updates REST or commit interception using FWModelEvent and FWFormCommit.