Home › Forum › Allgemeines › Allgemeines zu Nuclos › BO Attribute › BO Attribute
Danke für die Antworten aber beim speichern der Regel kommt diese Fehlermeldung:
addition.java:37: cannot find symbol
symbol: variable BusinessObjectProvider
location: class org.nuclet.businessentity.addition
Mein Regel-Code:
package org.nuclet.businessentity;
import org.nuclos.api.rule.InsertRule;
import org.nuclos.api.context.InsertContext;
import org.nuclos.api.annotation.Rule;
import org.nuclos.api.exception.BusinessException;
/** @name
* @description
* @usage
* @change
*/
@Rule(name=“addition“, description=“addition“)
public class addition implements InsertRule {
@Override
public void insert(InsertContext context) throws BusinessException {
Wareneingang wareneingang = context.getBusinessObject(Wareneingang.class);
//Artikel artikel = context.getBusinessObject(Artikel.class);
Artikel artikel = wareneingang.getArtikelBO();
int a,b,c;
a=artikel.getBestand();
b=wareneingang.getGeliefert();
c=a+b;
artikel.setBestand(c);
BusinessObjectProvider.update(artikel);
}
}