Skip to content

Add LS support for importing mule projects and expose available migration tools#265

Merged
LakshanWeerasinghe merged 11 commits intoballerina-platform:mainfrom
RadCod3:migrate-tool-mule
Sep 1, 2025
Merged

Add LS support for importing mule projects and expose available migration tools#265
LakshanWeerasinghe merged 11 commits intoballerina-platform:mainfrom
RadCod3:migrate-tool-mule

Conversation

@RadCod3
Copy link
Contributor

@RadCod3 RadCod3 commented Aug 29, 2025

Purpose

$subject

  • This PR exposes the an API for BI to invoke mule migrations.
  • It also exposes an API for BI to know which migration tools are available.

Fixes wso2/product-ballerina-integrator#974
Related: wso2/product-ballerina-integrator#380

@RadCod3 RadCod3 changed the title Add LS support for importing tibco projects Add LS support for importing mule projects Aug 29, 2025
@RadCod3 RadCod3 changed the title Add LS support for importing mule projects Add LS support for importing mule projects and expose available migration tools Aug 29, 2025
@RadCod3 RadCod3 force-pushed the migrate-tool-mule branch from ee5f9b6 to 8be2cd7 Compare August 29, 2025 12:27
@RadCod3 RadCod3 force-pushed the migrate-tool-mule branch from 8be2cd7 to e40f1d9 Compare August 29, 2025 12:57
@RadCod3
Copy link
Contributor Author

RadCod3 commented Aug 29, 2025

The project migration test failed due to the generated functions.bal file from the project having different orderings of function definitions.

functions.bal generated in the GitHub action

import ballerina/log;

public function commonConfig1Flow(Context ctx) {
    log:printInfo(\"xxx: common config1 logger invoked\");
}

public function commonConfig2Sub_Flow(Context ctx) {
    log:printInfo(\"xxx: common config2 logger invoked\");
}

public function mainconfigSub_Flow(Context ctx) {
    log:printInfo(\"xxx: main config logger invoked\");
}

function _dwMethod0_(json payload) returns json|error {
    float conversionRate = 13.15;
    return {\"s\": \"Hello World\", \"n\": 1.23, \"b\": true, \"a\": check [1, 2, 3].ensureType(json), \"o\": check {\"name\": \"Anne\"}.ensureType(json)};
}

functions.bal generated locally

import ballerina/log;

function _dwMethod0_(json payload) returns json|error {
    float conversionRate = 13.15;
    return {\"s\": \"Hello World\", \"n\": 1.23, \"b\": true, \"a\": check [1, 2, 3].ensureType(json), \"o\": check {\"name\": \"Anne\"}.ensureType(json)};
}

public function commonConfig2Sub_Flow(Context ctx) {
    log:printInfo(\"xxx: common config2 logger invoked\");
}

public function commonConfig1Flow(Context ctx) {
    log:printInfo(\"xxx: common config1 logger invoked\");
}

public function mainconfigSub_Flow(Context ctx) {
    log:printInfo(\"xxx: main config logger invoked\");
}

Both use the same migrate-mule version and consistently exhibit this ordering difference. Why exactly this happens needs to be investigated further.

Since the single mule file test case is passing, it should be acceptable to remove this test case, as from BI's perspective it doesn't matter whether we are migrating a single
mule file or a mule project.

@RadCod3 RadCod3 force-pushed the migrate-tool-mule branch 2 times, most recently from e6476ea to b599b12 Compare September 1, 2025 07:33
@LakshanWeerasinghe LakshanWeerasinghe merged commit 9e5d56b into ballerina-platform:main Sep 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement LS support for importing Mule projects

4 participants