The vision of Software-Defined Manufacturing (SDM) and Industry 4.0 is industrial production that responds flexibly to rapidly changing markets. This requires highly adaptive, versatile production systems. This requires precise detection of the process and machine states or the capabilities of the systems to be adapted. Up to now, the quality of process execution (and thus of the products) of machine capabilities has only been recorded “statically”, i.e. under fixed process and framework conditions, so that quality predictions are only made on the basis of idealized processes and results. Since machine and process behavior is constantly changing during operation, discrepancies arise between idealized process quality predictions and real process behavior. Decisions on the use and adaptation of production systems made before these lead to cost- and time-suboptimal processes and to the waste of valuable resources. In SDM, digital twins of manufacturing systems encapsulate their functions, data, and models to achieve flexible adaptivity. Machine- and process-specific capability indicators (e.g. accuracy parameters, stability limits) exist for determining the quality of manufacturing processes. These indicators allow conclusions to be drawn about the expected quality of the products on the basis of measurements of machine and process behavior. The interrelationships between machine, process, components and environmental conditions are seldom known precisely in quantitative terms, so that they have to be laboriously collected by experts in a time-consuming and cost-intensive manner and made accessible for production planning. This is where SDMflex comes in: SDMflex empowers SDM by combining self-adaptive Digital Twins of manufacturing systems with process-dependent, precise, self-learned quality predictions of their capabilities. For this purpose, novel concepts of self-learning precise capability indicators by artificially intelligent methods for analyzing process variations and anomaly detections are developed. These are integrated into an architecture of self-adaptive digital twins that uses these methods to continuously compute capability qualities driven by demand. Calculated capability qualities are made available by the digital twin via OPC UA to a flexible transformation planning in the SDM. By independently and continuously improving the precision of quality predictions, discrepancies can be better predicted and thus taken into account in production planning in order to produce more efficiently and conserve resources.