4. In $\triangle A B C$, it is known that the lengths of the three sides are $A B=\sqrt{7}$,
$$
\begin{aligned}
B C= & \sqrt{3}, C A=\sqrt{2} \text {. Then } \\
& \overrightarrow{A B} \cdot \overrightarrow{B C}+\sqrt{2} \overrightarrow{B C} \cdot \overrightarrow{C A}+\sqrt{3} \overrightarrow{C A} \cdot \overrightarrow{A B}=
\end{aligned}
$$
4. $\sqrt{2}-3 \sqrt{3}-4$.

Let $A B=c, B C=a, C A=b$. Then
$$
\begin{array}{l}
\overrightarrow{A B} \cdot \overrightarrow{B C}=-a c \cos B=\frac{1}{2}\left(b^{2}-a^{2}-c^{2}\right), \\
\overrightarrow{B C} \cdot \overrightarrow{C A}=\frac{1}{2}\left(c^{2}-a^{2}-b^{2}\right), \\
\overrightarrow{C A} \cdot \overrightarrow{A B}=\frac{1}{2}\left(a^{2}-b^{2}-c^{2}\right). \\
\text { Therefore, } \overrightarrow{A B} \cdot \overrightarrow{B C}+\sqrt{2} \overrightarrow{B C} \cdot \overrightarrow{C A}+\sqrt{3} \overrightarrow{C A} \cdot \overrightarrow{A B} \\
=\frac{(\sqrt{2}-1-\sqrt{3}) c^{2}+(\sqrt{3}-1-\sqrt{2}) a^{2}+(1-\sqrt{2}-\sqrt{3}) b^{2}}{2} \\
=\frac{7(\sqrt{2}-1-\sqrt{3})+3(\sqrt{3}-1-\sqrt{2})+2(1-\sqrt{2}-\sqrt{3})}{2} \\
=\sqrt{2}-3 \sqrt{3}-4 .
\end{array}
$$