# What Changes When You Move a WSO2 MI Flow to Ballerina? *The details I’d pull out of the old flow before writing the new service.* By Thomas Hein Thura If you give me a WSO2 Micro Integrator project and ask how long it takes to move to Ballerina, I would pick one integration and read it from the request to the response. Then I would go back and read the fault sequence. That second pass can change the estimate. Say the flow accepts an attendance event. The main sequence parses the body, looks up an employee and sends the result to an HR system. However, the old flow also has to decide what to return when the employee is unknown. If you only read the successful sequence, it is easy to miss that decision. ![Three zones left to right: an old WSO2 MI flow with a branch table, a Ballerina service, and a comparison of what the caller and the downstream system see.](assets/wso2-behaviour-parity.png) *Pull the branches out of the old flow into a table, replay them against the Ballerina service, then compare the caller response and the downstream record.* ## What should you take from the XML? Start by writing down where the input comes from, which fields get renamed and which ones are filled in when they are missing. Then check the endpoint settings, including timeouts, and where the fault response gets its status code and body. If the caller retries on that status, you want to know that before you change it. For a lookup, trace what happens when the employee key is absent, when it is present but unknown, and when the lookup service times out. Those can all end up in different branches. So, put one request for each branch next to the expected response and the downstream effect. ## What goes into the Ballerina service? Begin with the normal request and the input type. After that, make each failing path explicit and send back the response the caller expects. WSO2 publishes a migration assistant with a Synapse converter, see the [WSO2 integration migration assistant](https://github.com/wso2/integration-bi-migration-assistant). If you use it to get a starting point, there is a note to take: still compare the output with the sequences and test cases you extracted from the original. Open the deployment settings too. Does the new service get its URL and credentials the same way in the test environment? If the old runtime retried a call, who is responsible for that retry in the new setup? Before you touch the caller, run the cases through the same gateway path it will actually use. ## Which case should you always replay? Ask the downstream test service to accept the attendance event, then delay its response long enough for the integration to time out. After that, replay the event with the same ID. Depending on the contract, you should see one downstream record or an explicit duplicate result. Check the record directly, so you can tell a safe retry from a second write. That is the case I would carry into *What I'd Test Before Moving an Integration to Kubernetes*. Testing the Ballerina service gets me to the point where I can try the new deployment route. I still want to see what the caller and the downstream system do through that route. Something you can try this week: pick one flow, list its branches in a small table, and write the expected response beside each one. Run the table against the old and the new service. Next in this series: *A Retry Limit Per Step Is Not a Retry Budget*.