Examples of GuidedDecisionTable


Examples of org.drools.guvnor.client.modeldriven.dt.GuidedDecisionTable

public class GuidedDTDRLPersistenceTest extends TestCase {


  public void test2Rules() throws Exception {
    GuidedDecisionTable dt = new GuidedDecisionTable();
    dt.tableName = "michael";

    AttributeCol attr = new AttributeCol();
    attr.attr = "salience";
    dt.attributeCols.add(attr);
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.dt.GuidedDecisionTable


  }

  public void testNoConstraints() {
    GuidedDecisionTable dt = new GuidedDecisionTable();
    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.dt.GuidedDecisionTable


  }

  public void testUpdateModify() {
    GuidedDecisionTable dt = new GuidedDecisionTable();
    ConditionCol c = new ConditionCol();
    c.boundName = "x";
    c.factType = "Context";
    c.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
    dt.conditionCols.add(c);
View Full Code Here

Examples of org.drools.guvnor.models.guided.dtable.shared.model.legacy.GuidedDecisionTable

        //Upgrade DTModel to new class
        Object model = xt.fromXML( xml );
        GuidedDecisionTable52 newDTModel;
        if ( model instanceof GuidedDecisionTable ) {
            GuidedDecisionTable legacyDTModel = (GuidedDecisionTable) model;
            newDTModel = upgrader1.upgrade( legacyDTModel );
        } else {
            newDTModel = (GuidedDecisionTable52) model;
        }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

        //Upgrade DTModel to new class
        Object model = xt.fromXML( xml );
        GuidedDecisionTable52 newDTModel;
        if ( model instanceof GuidedDecisionTable ) {
            GuidedDecisionTable legacyDTModel = (GuidedDecisionTable) model;
            newDTModel = UPGRADER.upgrade( legacyDTModel );
        } else {
            newDTModel = (GuidedDecisionTable52) model;
        }
        return newDTModel;
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

    private GuidedDecisionTableModelUpgradeHelper upgrader = new GuidedDecisionTableModelUpgradeHelper();

    @Test
    public void testConversion() {

        GuidedDecisionTable dt = new GuidedDecisionTable();
        dt.tableName = "michael";

        MetadataCol md = new MetadataCol();
        md.attr = "legacy";
        md.defaultValue = "yes";
        dt.getMetadataCols().add( md );

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

    }

    @Test
    public void testConversionPatternGrouping() {

        GuidedDecisionTable dt = new GuidedDecisionTable();
        dt.tableName = "michael";

        MetadataCol md = new MetadataCol();
        md.attr = "legacy";
        md.defaultValue = "yes";
        dt.getMetadataCols().add( md );

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

        asset.checkin("");


        asset = pkg.addAsset("testLoadSaveEventDT", "");
        asset.updateFormat(AssetFormats.DECISION_TABLE_GUIDED);
        GuidedDecisionTable gt = new GuidedDecisionTable();
        asset.updateContent(GuidedDTXMLPersistence.getInstance().marshal(gt));
        asset.checkin("");


       
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

    public void testEmptyDT() throws Exception {
        RulesRepository repo = new RulesRepository( TestEnvironmentSessionHelper.getSession() );
        PackageItem pkg = repo.loadDefaultPackage();
        AssetItem asset = pkg.addAsset( "testEmptyDT", "" );
        asset.updateFormat(AssetFormats.DECISION_TABLE_GUIDED);
        GuidedDecisionTable gt = new GuidedDecisionTable();
        asset.updateContent(GuidedDTXMLPersistence.getInstance().marshal(gt));
        asset.checkin("");

        GuidedDTContentHandler ch = new GuidedDTContentHandler();
        ch.compile(null, asset, null);
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.dt.GuidedDecisionTable

public class DecisionTableHandlerTest extends TestCase {

    public void testMoveAttribute() {

        GuidedDecisionTable dt = new GuidedDecisionTable();

        dt.attributeCols.add( TestData.newAttributeCol( "date-effective" ) );
        dt.attributeCols.add( TestData.newAttributeCol( "date-expires" ) );
        dt.conditionCols.add( TestData.newConditionCol( "amount max" ) );
        dt.conditionCols.add( TestData.newConditionCol( "amount min" ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.