Class-dependent disciplines and state-dependent routing are analyzed for queues and networks with product form solutions. Class-dependent disciplines are analyzed into the inter-class desciplines which share processor capacity among classes, and the intra-class disciplines which schedule the customers of a class. A queueing model with multiple classes of customers is suggested for describing class-dependent disciplines. It is shown that product form implies local balance even if queueing disciplines depend on classes. For given sevice time distributions, it is presented which disciplines are necessary and sufficient in order to yield product form solutions. In a network of queues with class-dependent disciplines, it is confirmed that if each queue of a network satisfies local balance when isolated, then the network takes product form. Queueing networks with state-dependent routing are analyzed by transforming them into networks with fixed routing. If each queue in a network satisfies local balance in isolation, then it is shown that the equilibrium state probability density function is derived from the transformed network. Furthermore, the branching functions are generalized.