  Globules and pillars, impressively revealed by the Spitzer and Herschel
satellites, for example, are pervasive features found in regions of massive
star formation. We studied the globule IRAS 20319+3958 in Cygnus X by means of
visible and near-infrared imaging and spectroscopy, complemented with
mid-infrared Spitzer/IRAC imaging, in order to obtain a census of its stellar
content and the nature of its embedded sources. Our observations show that the
globule contains an embedded aggregate of about 30 very young ($\lesssim
1$~Myr) stellar objects, for which we estimate a total mass of ~ 90 M_sun. The
most massive members are three systems containing early B-type stars. Two of
them most likely produced very compact HII regions, one of them being still
highly embedded and coinciding with a peak seen in emission lines
characterising the photon dominated region (PDR). Two of these three systems
are resolved binaries, and one of those contains a visible Herbig Be star. An
approximate derivation of the mass function of the members of the aggregate
gives hints of a slope at high masses shallower than the classical Salpeter
slope, and a peak of the mass distribution at a mass higher than that at which
the widely adopted log-normal initial mass function peaks. The emission
distribution of H$_2$ and Br gamma, tracing the PDR and the ionised gas phase,
respectively, suggests that molecular gas is distributed as a shell around the
embedded aggregate, filled with centrally-condensed ionised gas. Both, the
morphology and the low excitation of the HII region, indicate that the sources
of ionisation are the B stars of the embedded aggregate, rather than the
external UV field caused by the O stars of Cygnus OB2. The youth of the
embedded cluster, combined with the isolation of the globule, suggests that
star formation in the globule was triggered by the passage of the ionisation
front.
