Back to Blog
February 17, 2026 min readmicroservices mapping visual truth

RPG to Microservices: Mapping Visual Truth in Heavy Equipment Sales

R
Replay Team
Developer Advocates

RPG to Microservices: Mapping Visual Truth in Heavy Equipment Sales

Your most profitable sales representatives are currently navigating 40-year-old green screens to move $500,000 excavators. While your competitors are deploying AI-driven inventory management, your "Visual Truth"—the actual workflow your employees use to close deals—is trapped inside an AS/400 monolith that hasn't seen a documentation update since the 1990s.

The heavy equipment industry faces a unique technical debt crisis. With a global technical debt mountain reaching $3.6 trillion, the gap between the rugged hardware being sold and the fragile software selling it is widening. For many Enterprise Architects, the path forward feels like a choice between two failures: continue maintaining the unmaintainable RPG code or embark on a multi-year rewrite that has a 70% chance of failing.

There is a third way. By leveraging microservices mapping visual truth, organizations can bypass the "black box" of legacy code and build modern architectures based on the actual, recorded behaviors of their users.

TL;DR: Heavy equipment sales organizations are moving away from risky "rip-and-replace" RPG migrations. By using Replay to record legacy workflows, teams can achieve microservices mapping visual truth, converting video recordings into documented React components and microservice schemas. This approach reduces modernization timelines from 18 months to a matter of weeks, saving up to 70% in development costs.

The RPG Debt Trap in Heavy Equipment Sales#

In the heavy equipment sector—encompassing construction, agriculture, and mining—the "source of truth" is rarely the documentation. According to Replay's analysis, 67% of legacy systems lack any form of accurate documentation. What exists instead is "Tribal Knowledge": the specific sequence of F-keys and subfile navigation that a parts manager performs to check regional inventory.

When you attempt to move from RPG to a modern stack, the logic is often buried in thousands of lines of fixed-format RPG or ILE. If you try to rewrite this manually, your developers will spend an average of 40 hours per screen just to understand and replicate the UI and its underlying state transitions.

Video-to-code is the process of capturing these manual workflows via screen recording and using AI to extract the underlying DOM structure, state logic, and design tokens into clean, production-ready code.

By utilizing Replay, you can turn these recordings into a "Visual Truth" that serves as the blueprint for your new microservices.

Microservices Mapping Visual Truth: The New Architectural Standard#

The core challenge of legacy modernization isn't the code—it's the requirements. Traditional discovery phases take months. By the time the requirements are mapped, the business has moved on. Microservices mapping visual truth flips this script. Instead of asking what the code should do, you record what the user actually does.

Industry experts recommend this visual-first approach because it ensures that the resulting microservices are "right-sized." You aren't just migrating a monolith; you are decomposing it based on functional usage patterns.

The Replay Workflow for Heavy Equipment#

  1. Record (Flows): A sales rep records a standard "Equipment Quote-to-Cash" workflow in the legacy green screen emulator.
  2. Analyze (Blueprints): Replay's AI Automation Suite identifies the components (subfiles, input fields, command keys) and maps the data flow.
  3. Generate (Library): The platform generates a documented React Component Library and a Design System that mirrors the legacy functionality but with modern UX.
  4. Architect (Microservices): Each recorded "Flow" becomes the boundary for a new microservice.

Learn more about building Design Systems from legacy UIs

Technical Implementation: From RPG Subfiles to React Components#

To understand how microservices mapping visual truth works in practice, let's look at a common heavy equipment scenario: the Inventory Search subfile. In RPG, this might be a complex

text
EXFMT
(Execute Format) call within a
text
DOW
(Do While) loop.

Manual migration would require a developer to read the RPG source, identify the indicators (*IN), and guess the field validation. With Replay, the visual recording provides the "truth" of how the data is displayed and manipulated.

Legacy Data Structure vs. Modern TypeScript Interface#

According to Replay's analysis, mapping these data structures manually is where most errors occur. Here is how a legacy equipment record is mapped to a modern TypeScript interface using the Replay Blueprints engine.

typescript
// Generated via Replay Blueprints from Visual Recording interface EquipmentInventory { id: string; // Mapped from RPG Field: EQID01 modelName: string; // Mapped from RPG Field: MDLNAM serialNumber: string; // Mapped from RPG Field: SERNUM status: 'AVAILABLE' | 'RENTED' | 'MAINTENANCE'; // Derived from visual indicators hourlyRate: number; lastServiceDate: Date; location: { branchId: string; coordinates?: { lat: number; lng: number }; }; } // Example of a Microservice Action mapped from a legacy "F6" function key export const updateEquipmentStatus = async (id: string, status: string): Promise<void> => { // This microservice endpoint replaces the legacy RPG update logic const response = await fetch(`/api/v1/inventory/${id}/status`, { method: 'PATCH', body: JSON.stringify({ status }), }); if (!response.ok) throw new Error('Failed to update equipment status'); };

Building the Modern UI Component#

Once the data mapping is complete, Replay generates the React components. Instead of a 40-hour manual build, the platform produces a component that is already wired to your new microservices architecture.

tsx
import React, { useState } from 'react'; import { EquipmentInventory } from './types'; import { Button, Card, Badge } from '@/components/ui'; // From Replay Library interface InventoryCardProps { equipment: EquipmentInventory; onStatusChange: (id: string, newStatus: string) => void; } export const InventoryCard: React.FC<InventoryCardProps> = ({ equipment, onStatusChange }) => { return ( <Card className="p-4 border-l-4 border-blue-600"> <div className="flex justify-between items-start"> <div> <h3 className="text-lg font-bold">{equipment.modelName}</h3> <p className="text-sm text-gray-500">SN: {equipment.serialNumber}</p> </div> <Badge variant={equipment.status === 'AVAILABLE' ? 'success' : 'warning'}> {equipment.status} </Badge> </div> <div className="mt-4 flex gap-2"> <Button variant="outline" onClick={() => onStatusChange(equipment.id, 'RENTED')} > Dispatch Unit </Button> <Button variant="ghost">View Maintenance Log</Button> </div> </Card> ); };

Comparison: Manual Rewrite vs. Replay Visual Reverse Engineering#

The following table demonstrates the efficiency gains when using microservices mapping visual truth compared to traditional manual modernization efforts for a mid-sized heavy equipment dealership system (approx. 200 screens).

FeatureManual Legacy RewriteReplay Visual Reverse Engineering
Discovery Phase4-6 Months1-2 Weeks
Documentation Accuracy40% (Subjective)99% (Visual Truth)
Time Per Screen40 Hours4 Hours
Total Timeline18-24 Months3-4 Months
Risk of Failure70%< 5%
Tech StackOften limited by legacy knowledgeModern (React, Node, Go, etc.)
Cost$$$$$$$

Read more about legacy modernization strategies

Why Heavy Equipment Manufacturers are Choosing Visual Truth#

The heavy equipment industry operates in a regulated, high-stakes environment. Whether it's complying with safety standards or managing complex financing through a captive finance arm, the software must be perfect.

SOC2 and HIPAA-Ready Environments#

Modernizing systems that handle sensitive customer financial data or maintenance records requires more than just "cool code." It requires a platform built for the enterprise. Replay is designed for these environments, offering SOC2 compliance and on-premise deployment options for organizations with strict data residency requirements.

De-risking the "Big Bang" Migration#

By using microservices mapping visual truth, you don't have to switch everything over on a Monday morning. You can use Replay to modernize a single high-value flow—such as "Emergency Parts Ordering"—and run it as a microservice alongside your legacy RPG monolith. This "Strangler Fig" pattern is significantly safer when the new service is a 1:1 visual match for the legacy system users already know.

Capturing the "Hidden" Logic#

In RPG systems, business logic is often hidden in "exit programs" or complex triggers. Manual discovery often misses these. However, because Replay records the result of these processes on the screen, the "Visual Truth" of the output is captured. This allows architects to work backward from a known good state, ensuring the new microservices produce the exact same business outcomes as the legacy code.

Scaling the Architecture: From One Flow to a Global Design System#

Once the first few flows are mapped, Replay's Library feature allows you to scale. You aren't just building one screen; you are building a reusable Design System for the entire enterprise.

For a global heavy equipment manufacturer, this means that the "Inventory Grid" used by a dealer in Peoria is the same component used by a dealer in Perth, even if their back-end RPG systems differ slightly. Microservices mapping visual truth provides a unified front-end layer that abstracts the complexity of disparate legacy back-ends.

According to Replay's analysis, organizations that establish a centralized component library during modernization see a 40% increase in developer velocity for all subsequent digital transformation projects.

Conclusion#

The era of the 24-month "black box" migration is over. For the heavy equipment industry, the risk of staying on RPG is high, but the risk of a failed manual rewrite is higher. By focusing on microservices mapping visual truth, you can honor the complex business logic of the past while building the agile, scalable infrastructure of the future.

Replay provides the bridge. By converting visual recordings into documented React code, you can reclaim your "Visual Truth" and eliminate technical debt without the traditional pain of a rewrite.

Frequently Asked Questions#

How does Replay handle complex RPG subfiles with multiple hidden fields?#

Replay’s AI Automation Suite doesn't just look at the pixels; it analyzes the data transitions within the recording. Even if a field is "hidden" in the legacy UI but affects the visual output (like a status change or a calculation), the platform captures the state change. This ensures that the microservices mapping visual truth includes all necessary business logic, even if it wasn't explicitly visible on the screen.

Do we need the original RPG source code for Replay to work?#

No. One of the primary advantages of Visual Reverse Engineering is that it treats the legacy system as a "black box." As long as you can record a user performing the workflow, Replay can generate the modern components and data schemas. This is critical for the 67% of enterprises that have lost or incomplete documentation for their legacy systems.

Can Replay generate code for languages other than React and TypeScript?#

While Replay is optimized for the React ecosystem and modern Design Systems, the "Blueprints" generated by the platform are technology-agnostic. The underlying architectural maps can be used to inform the development of microservices in Go, Java, Python, or any other modern stack, while the UI components provide a production-ready React front-end.

How does this approach save 70% of the time compared to manual rewrites?#

Manual rewrites spend the majority of their time in "Discovery" and "UAT" (User Acceptance Testing). Developers spend weeks trying to understand what a screen does, and users spend weeks telling them why the new version is wrong. Replay eliminates this by starting with a 1:1 visual match of the working system. By automating the UI and state-logic generation, you move directly to the "Integration" phase, skipping months of manual coding and requirement gathering.

Ready to modernize without rewriting? Book a pilot with Replay

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free