The current state of Studie_Max_Act is undefined when you are trying to use it as a DecimalType. You could either use a persistence service to save and restore its previous state, or put a check in your rule to make sure it is currently a numeric value:
if (Studie_Max_Act.state instanceof DecimalType) {
var int B = (Studie_Max_Act.state as DecimalType).intValue
// or however you want to use it
}