Chain of CompletableFutures in Java
You have a lot of repetition in your code.
The only thing different with the 2 lines of code repeated over and over is the argument.

You could put all of these arguments into a list and iterate over them, running those 2 lines of code for each:

List&lt;String&gt; states = Arrays.asList(isRQMRunning_3, startRQM_4, 
  pendingChangesStatus, acceptPendingChanges_8, 
 loadWorkspace_5, acceptPendingChanges_8, fixConflicts_9);

for (String state : states)
{
    // Loop until array is complete
    CompletableFuture&lt;String&gt; cf = CompletableFuture.completedFuture(state);

    if (!cf.isDone())
    {
        break;
    }

    System.out.println("Value- " + cf.get());
}