Contact us

← Blog

Every Migration Is Two Factories Now: How AI Changed the Way We Move Legacy Systems

Every Migration Is Two Factories Now: How AI Changed the Way We Move Legacy Systems

Roi Mor

AI made legacy conversion cheap; proving equivalence is the new bottleneck. Learn the migration factory and test factory methodology behind four OpenLegacy migrations.

Every Migration Is Two Factories Now: How AI Changed the Way We Move Legacy Systems

Four migrations that looked nothing alike

Over the last few months we've been running four migration projects with four different customers. On paper they share almost nothing:

  1. Java to no-code. A customer has a few hundred Java APIs written about eight years ago, hand-built over legacy back ends. They want them as governed no-code APIs and MCP tools, without rewriting each one by hand.
  2. Mainframe to mainframe. A customer is moving from an old mainframe environment to a new one. Same applications in principle, but new hardware, new system software, new configuration, and decades of drift between the two.
  3. Middleware sunset. A customer's integration middleware is reaching end of life, and hundreds of web services that run on it have to move to the OpenLegacy platform before the date.
  4. Legacy BPM. A customer wants to understand, and eventually replace, a legacy BPM estate: processes, rules, and human tasks built up over years, with very little documentation that anyone trusts.

Different source, different target, different technology, different team. A few years ago each would have been a separate kind of project with its own specialist vendor, its own tooling, and its own multi-year plan.

When we put the four project plans side by side, they turned out to be the same project.

The pattern: a migration factory and a test factory

Each project splits cleanly into two production lines.

The migration factory turns the source into the target. It inventories what exists, extracts meaning from it, and generates the new artifact: an API, a flow, a spec, a configuration.

The test factory proves the target behaves like the source. It captures real behavior from the old system, builds test data, replays the same inputs against old and new, and compares the results.

Every migration has always needed both. What has changed is the ratio of effort between them, and that change is what's reshaping the industry.

What AI actually changed

Let's be honest about where AI helps and where it doesn't.

AI made the migration factory dramatically cheaper. An agent can read an eight-year-old Java service, understand which back-end program it calls and how it maps fields, and produce a target definition in minutes. It can read BPM metadata and draft a readable specification. It can classify a few hundred middleware services into families and handle each family the same way. Work that used to consume most of a migration budget is turning into a pipeline that runs.

AI did not make correctness free. A generated API that is 98% right is a production incident waiting to happen. When conversion gets cheap, the bottleneck moves to the question every migration owner actually cares about: how do I know the new thing does what the old thing did?

That's the mindset shift. The industry used to treat migration as a conversion problem with a testing phase at the end. It is becoming an evidence problem with conversion as a step in the middle. Testing isn't a phase anymore; it's half of the factory, and it runs from day one.

The good news is that AI accelerates the test factory too. It doesn't replace the deterministic replay, it makes everything around it cheap: generating test data, triaging differences, and explaining why two results differ.

The methodology

Across all four projects, we now run the same five-stage loop. The tools differ per project; the stages don't.

1. Capture: record what the system really does

Start from behavior, not from documentation. Documentation describes what someone intended years ago; traffic describes what the business does today.

2. Understand: turn artifacts into a model

An AI agent parses the source (Java code, COBOL, BPM metadata, middleware service definitions) and produces a model a human can review: which operations exist, what they call, which data they touch, which rules they apply.

For process-heavy estates, that model is a specification. OL Spec generates business process specifications from legacy sources, with shared business models across operations. This is where the BPM project starts: the metadata becomes a spec before anything is generated.

3. Generate: let agents build through the product, not around it

This is the step that matters most for quality. The agent does not write free-form code for the target. It drives the target platform through its design-time MCP.

In the Java-to-no-code project, the agent reads each legacy Java API, works out the back-end call and the field mappings, and then uses the OL CoreIQ design-time MCP to survey the host, design the API over the real CICS, IMS, DB2, or IBM i asset, and test it against the host before it is stored. The output is a governed API in OL CoreIQ that is also exposed as an MCP tool, not a new pile of generated code to maintain.

The same principle applies to the middleware project with OL Integration: AI plus CLI automation does the bulk work across hundreds of services, but every artifact lands in the platform's model, with its validation rules.

The design choice here is deliberate: AI decides, the platform executes deterministically. It's what keeps a few hundred generated services reviewable.

4. Prove: replay old and new, and compare

This is the test factory's main job. Replay the same inputs against the source and the target, and compare.

  • Mainframe to mainframe: we record screen sessions on the old environment and replay them against the new one. Screen Compare in OL Terminal replays a saved trail against a target connection and compares expected and actual screens step by step, with pass rates, first differences, and ignore regions for timestamps and session values.
  • Middleware sunset: test data is built from service analysis and code, and from real data using OL DataIQ to copy test data. Old and new endpoints get the same requests, and an AI comparison layer sorts the differences.
  • BPM: process versions are compared as structure and behavior. OL Spec process versioning and compare puts versions side by side, and runnable artifacts let a spec be played rather than only read.

A word on AI in comparison, because it's where teams worry the most. The replay is deterministic. AI's role is triage: separating noise (formatting, ordering, timestamps, a renamed field) from real behavioral differences, grouping thousands of diffs into a few root causes, and explaining each one in plain language. A person still approves what counts as equivalent. Before AI, a team could produce diffs much faster than it could read them, so test coverage stayed low. Triage at machine speed is what makes full regression practical.

5. Cut over: incrementally, with evidence

Once a service, screen flow, or process has passed, it moves. One at a time or one family at a time, not big-bang. The evidence from step 4 becomes the sign-off record and remains the regression suite for whatever changes next.

For processes that will run as agentic workflows afterwards, OL Gene is the optional target: governed workflows that serve applications as APIs and agents as MCP tools. Everything is operated under OL Hub.

Why this is a shift in mindset, not just faster tooling

Three things are changing in how enterprises approach migration.

From projects to factories. A project is a one-off with a start and an end date. A factory is a repeatable line with throughput, a defect rate, and a cost per unit. When conversion is automated, the meaningful metrics become services proven per week and differences explained per release, not lines of code converted.

From documentation-first to evidence-first. Teams used to spend months reconstructing what a system was supposed to do. Now the starting point is what it actually does, captured from real traffic and real sessions, and the specification is derived from that and kept up to date.

From "migrate, then test" to "you can't migrate what you can't test." The test factory is built first, or at least in parallel. If you can't replay and compare a component, it isn't ready to migrate, however easy the conversion looks. It's an uncomfortable rule, because it puts the hardest work up front, but it's the one that keeps migrations from being stuck at 90% for a year.

There's a quieter consequence too. Migrations used to be rare, painful events that organizations avoided for a decade at a time. When the factory exists and the regression suite stays alive afterwards, the next move (a new platform, a new middleware, a new agent framework) is no longer a crisis. Migration turns into a capability rather than an event.

What we'd tell a team starting today

  • Ask how you'll prove it before asking how you'll convert it. Pick your capture and comparison approach first.
  • Have agents work through design-time tools, not raw code generation. The target platform's model and validation are your guardrails.
  • Keep replay deterministic and use AI for triage. Don't let a model decide on its own that two results are "close enough".
  • Group the estate into families. A few hundred services are usually a handful of patterns. Prove the pattern, then scale it.
  • Keep the test factory running after cutover. It's the asset that makes the next migration cheaper.

Four customers, four technologies, one methodology. AI didn't make migration effortless. It moved the effort to the place it always belonged: proving the new system does what the business relies on.


Draft — customer examples are anonymized. Product references link to the OpenLegacy catalog.

Tell us about yourself

You've been browsing the catalog. Leave your details to keep exploring.

Privacy policy