Class FiniteStateExecutionFramework

java.lang.Object
io.jenkins.plugins.finitestate.FiniteStateExecutionFramework

public class FiniteStateExecutionFramework extends Object
Execution framework for Finite State analysis operations.

Dispatches to one of two transports based on BaseFiniteStateRecorder.isRestApi():

  • 2026 platform release — the public v0 REST API flow (executeViaApi(io.jenkins.plugins.finitestate.BaseFiniteStateRecorder, hudson.model.Run<?, ?>, hudson.FilePath, hudson.model.TaskListener, java.lang.String, java.lang.String)): resolve token, compute the target version, locate the workspace file, run the scan on the agent (FiniteStateScanCallable) and translate the ScanResult into a build outcome.
  • Legacy platform (default) — the Java CLT flow (executeViaClt(io.jenkins.plugins.finitestate.BaseFiniteStateRecorder, hudson.model.Run<?, ?>, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener, java.lang.String)): download the CLT jar and exec it on the agent, mapping the process exit code onto the build outcome.

Keeping both paths lets a single published plugin serve existing legacy-platform jobs unchanged and 2026-platform jobs by flipping the platform selector. See HELIX-422.

  • Method Details

    • executeAnalysis

      public static boolean executeAnalysis(BaseFiniteStateRecorder recorder, Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
      Execute a Finite State analysis with common error handling and logging, routing to the 2026 platform (v0 API) or legacy platform (CLT) transport based on the recorder's selected platform.
      Parameters:
      recorder - Recorder that encapsulates analysis configuration and helpers
      run - Jenkins run/build context used for environment and logging
      workspace - Workspace directory where files (and, for the legacy platform, the CLT) are accessed
      launcher - Jenkins launcher (used by the legacy CLT transport to exec the CLT)
      listener - Build/task listener for console logging
      Returns:
      true when the analysis succeeded (or was accepted, when not waiting); false on failure
      Throws:
      InterruptedException - if execution is interrupted
      IOException - if file I/O (or CLT download) fails
    • executeAnalysis

      public static boolean executeAnalysis(BaseFiniteStateRecorder recorder, AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
      Backward-compatible shim for freestyle builds using AbstractBuild API.
      Throws:
      InterruptedException
      IOException