This would be implemented using StateSpace.getTraceToState or FindStateCommand.
StateSpace.getTraceToState
FindStateCommand