Examples of FreeFormLine


Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

            if ( pattern.getRightPattern() instanceof FreeFormLine ) {
                // this allows MVEL to skip the collect, if any vars are empty
                // note this actually duplicates another inner check for the FFL itself
                // @TODO the FFL should get a reference to the parent, so it can avoid this duplication.
                final FreeFormLine ffl = (FreeFormLine) pattern.getRightPattern();
                if ( ffl.getText() == null ) {
                    return;
                }
                final Matcher matcherTemplateKey = patternTemplateKey.matcher( ffl.getText() );
                boolean found = matcherTemplateKey.find();
                if ( found ) {
                    buf.append( "@if{" );
                    boolean addAnd = false;
                    while ( found ) {
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

    private int parseFreeForm( final RuleModel m,
                               final ExpandedDRLInfo expandedDRLInfo,
                               int lineCounter ) {
        String freeForm = expandedDRLInfo.freeFormStatementsInLhs.get( lineCounter );
        while ( freeForm != null ) {
            FreeFormLine ffl = new FreeFormLine();
            ffl.setText( freeForm );
            m.addLhsItem( ffl );
            freeForm = expandedDRLInfo.freeFormStatementsInLhs.get( ++lineCounter );
        }
        return lineCounter;
    }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

                                   andDescr.getDescrs().get( 0 ),
                                   isJavaDialect,
                                   boundParams,
                                   dmo );
        } else if ( descr instanceof EvalDescr ) {
            FreeFormLine freeFormLine = new FreeFormLine();
            freeFormLine.setText( "eval( " + ( (EvalDescr) descr ).getContent() + " )" );
            return freeFormLine;
        } else if ( descr instanceof ConditionalElementDescr ) {
            return parseExistentialElementDescr( m,
                                                 (ConditionalElementDescr) descr,
                                                 isJavaDialect,
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

                                                            lineCounter,
                                                            split[ 1 ] );
                    }
                }
                if ( addFreeFormLine ) {
                    FreeFormLine ffl = new FreeFormLine();
                    ffl.setText( line );
                    m.addRhsItem( ffl );
                }
            }
        }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

            assertEquals( 2,
                          m.rhs.length );

            assertTrue( m.rhs[ 0 ] instanceof FreeFormLine );
            FreeFormLine ffl = (FreeFormLine) m.rhs[ 0 ];
            assertEquals( "DateTime newStartDate = new DateTime();",
                          ffl.getText() );

            assertTrue( m.rhs[ 1 ] instanceof ActionUpdateField );
            ActionUpdateField auf = (ActionUpdateField) m.rhs[ 1 ];
            assertEquals( "$bundle",
                          auf.getVariable() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

            assertEquals( 2,
                          m.rhs.length );

            assertTrue( m.rhs[ 0 ] instanceof FreeFormLine );
            FreeFormLine ffl = (FreeFormLine) m.rhs[ 0 ];
            assertEquals( "java.util.Date newStartDate = new java.util.Date();",
                          ffl.getText() );

            assertTrue( m.rhs[ 1 ] instanceof ActionUpdateField );
            ActionUpdateField auf = (ActionUpdateField) m.rhs[ 1 ];
            assertEquals( "$a",
                          auf.getVariable() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

            assertEquals( 2,
                          m.rhs.length );

            assertTrue( m.rhs[ 0 ] instanceof FreeFormLine );
            FreeFormLine ffl = (FreeFormLine) m.rhs[ 0 ];
            assertEquals( "java.util.Date newStartDate = new java.util.Date();",
                          ffl.getText() );

            assertTrue( m.rhs[ 1 ] instanceof ActionUpdateField );
            ActionUpdateField auf = (ActionUpdateField) m.rhs[ 1 ];
            assertEquals( "$a",
                          auf.getVariable() );
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

    private int parseFreeForm( final RuleModel m,
                               final ExpandedDRLInfo expandedDRLInfo,
                               int lineCounter ) {
        String freeForm = expandedDRLInfo.freeFormStatementsInLhs.get( lineCounter );
        while ( freeForm != null ) {
            FreeFormLine ffl = new FreeFormLine();
            ffl.setText( freeForm );
            m.addLhsItem( ffl );
            freeForm = expandedDRLInfo.freeFormStatementsInLhs.get( ++lineCounter );
        }
        return lineCounter;
    }
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

                                   andDescr.getDescrs().get( 0 ),
                                   isJavaDialect,
                                   boundParams,
                                   dmo );
        } else if ( descr instanceof EvalDescr ) {
            FreeFormLine freeFormLine = new FreeFormLine();
            freeFormLine.setText( "eval( " + ( (EvalDescr) descr ).getContent() + " )" );
            return freeFormLine;
        } else if ( descr instanceof ConditionalElementDescr ) {
            return parseExistentialElementDescr( m,
                                                 (ConditionalElementDescr) descr,
                                                 isJavaDialect,
View Full Code Here

Examples of org.drools.workbench.models.datamodel.rule.FreeFormLine

                                                            lineCounter,
                                                            split[ 1 ] );
                    }
                }
                if ( addFreeFormLine ) {
                    FreeFormLine ffl = new FreeFormLine();
                    ffl.setText( line );
                    m.addRhsItem( ffl );
                }
            }
        }
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.