  We study the Josephson current in two types of lateral junctions with
spin-orbit coupling and an exchange field. The first system (type 1 junction)
consists of superconductors with heavy metal interlayers linked by a
ferromagnetic bridge, such that the spin-orbit coupling is finite only at the
superconductor/heavy metal interface. In the second type (type 2) of system we
assume that the spin orbit coupling is finite in the bridge region. The length
of both junctions is larger than the magnetic decay length such that the
Josephson current is carried uniquely by the long-range triplet component of
the condensate. The latter is generated by the spin-orbit coupling via two
mechanisms, spin precession and inhomogeneous spin-relaxation. We show that the
current can be controlled by rotating the magnetization of the bridge or by
tuning the strength of the spin-orbit coupling in type 2 junctions., and also
discuss how the ground-state of the junction can be tuned from a $0$ to a $\pi$
phase difference between the superconducting electrodes. In leading order in
the spin-orbit coupling, the spin precession dominates the behavior of the
triplet component and both
  junctions behave similarly. However, when spin relaxation effects are
included junction of type 2 offers a wider parameter range in which $0$-$\pi$
transitions take place.
