Maintenance planning of trucks at Scania have previously been done using static cyclic plans with fixed sets of maintenance points, determined by mileage, calendar time, and some data driven physical models. Flexible or condition based maintenance have improved the maintenance program with the addition of general data driven expert rules and the ability to move sub-sets of maintenance points between maintenance occasions. Meanwhile, successful modelling with machine learning on big data and automatic planning using constraint programming are hinting on the ability to achieve even higher fleet utilization by further improvements of the flexible maintenance. The maintenance program have therefore been partitioned into its smallest parts and formulated as individual constraint rules. One maintenance point for a component have been selected and operational data have been collected showing how each truck have been used over its lifetime and if it have had a repair of the component or not. Using machine learning, the operational data have been used to train a random forest predictive model that can predict the probability that a vehicle will have a breakdown given its operational data as input. The overall goal is to maximize the utilization of a fleet, i.e. maximize the ability to perform transport assignments, with respect to maintenance. A sub-goal is to minimize costs for vehicle break downs and the costs for maintenance actions. The constraint program takes as input customer preferences and maintenance point deadlines where the existing expert rule for the component has been replaced by the predictive model. The model satisfactory predicts failures and the constraint program successfully computes consistent and good maintenance plans within seconds of operation time. The model and the constraint program have been integrated into a demonstrator able to highlight the usability and feasibility of the suggested approach.