There are some known, quite explicit, algorithms for the case in which $\mathfrak h$ is abelian. The fact that this case is already quite difficult shows how the problem can be difficult to examine. I suggest reading:

https://homepage.univie.ac.at/Dietrich.Burde/papers/burde_39_max_ab.pdf

and

https://link.springer.com/article/10.1007/s00607-009-0029-8