We consider attractive particle systems in Z d with product invariant measures. We prove that when particles are restricted to a subset of Z d , with birth and death dynamics at the boundaries, the hydrodynamic limit is given by the unique entropy solution of a conservation law, with boundary conditions in the sense of Bardos et al. ([7]). For the hydrostatic limit between parallel hyperplanes, we prove a multidimensional version of the phase diagram conjectured in [38], and show that it is robust with respect to perturbations of the boundaries.AMS 2000 subject classifications. 60K35, 82C22, 82C26; 35L65, 35L67, 35L50.