  We construct a large class of completely positive and trace preserving
non-Markovian dynamical maps for an open quantum system. These maps arise from
a piecewise dynamics characterized by a continuous time evolution interrupted
by jumps, randomly distributed in time and described by a quantum channel. The
state of the open system is shown to obey a closed evolution equation, given by
a master equation with a memory kernel and a inhomogeneous term. The
non-Markovianity of the obtained dynamics is explicitly assessed studying the
behavior of the distinguishability of two different initial system's states
with elapsing time.
