While the boundary is often ignored in textbooks, it is crucial in the study of flows. Suppose we have a "flow", i.e. the generator of a smooth one-dimensional group of transformations of the configuration space, which maps on-shell states to on-shell states while preserving the boundary conditions. Because of the variational principle, the action for all of the configurations on the orbit is the same. This is not the case for more general transformations which map on shell to on shell states but change the boundary conditions.