Class MigratorService

java.lang.Object
org.finos.fluxnova.service.MigratorService

public class MigratorService extends Object
Service class responsible for migrating Camunda projects to Fluxnova. This class handles the entire migration process including: - Adding and removing OpenRewrite plugins and dependencies - Converting BPMN files to XML and back - Executing the OpenRewrite migration recipe
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MigratorService(String projectLocation, String targetVersion, String modelerVersion)
    Constructs a new MigratorService with the specified project location.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initiates the migration process.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • MigratorService

      public MigratorService(String projectLocation, String targetVersion, String modelerVersion)
      Constructs a new MigratorService with the specified project location.
      Parameters:
      projectLocation - The file system path to the project being migrated
      targetVersion - The target Fluxnova version to migrate to
  • Method Details

    • start

      public void start() throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException, org.apache.maven.shared.invoker.MavenInvocationException
      Initiates the migration process. This method orchestrates the entire migration workflow: 1. Checks if pom.xml exists in the project location 2. Creates a minimal pom.xml if none exists (for standalone file migration) 3. Reads the project's POM file (existing or newly created) 4. Prepares the project for migration by adding OpenRewrite configuration 5. Executes the OpenRewrite migration recipe 6. Reads the modified POM file again to preserve changes made by OpenRewrite 7. Cleans up temporary migration artifacts (removes temp pom if created, or cleans existing pom)
      Throws:
      IOException - If there is an error reading, writing, or creating files
      org.codehaus.plexus.util.xml.pull.XmlPullParserException - If there is an error parsing the POM XML
      org.apache.maven.shared.invoker.MavenInvocationException - If there is an error invoking Maven