In this paper we consider the solution of optimization tasks with a piecewise linear objective function and piecewise linear constraints. First, we state optimality conditions for that class of problems using the abs-linearization approach and prove that they can be verified in polynomial time. Subsequently, we propose an algorithm called Constrained Active Signature Method that explicitly exploits the piecewise linear structure to solve such optimization problems. Convergence of the algorithm within a finite number of iterations is proven. Numerical results for various testcases including linear complementarity conditions and a bi-level problem illustrate the performance of the new algorithm.