Package org.drools.workbench.models.commons.shared.rule

Examples of org.drools.workbench.models.commons.shared.rule.ActionExecuteWorkItem


    private void doAction( List<LabelledAction> actions,
                           ActionWorkItemCol52 wi,
                           String cell ) {
        if ( Boolean.TRUE.equals( Boolean.parseBoolean( cell ) ) ) {
            ActionExecuteWorkItem aewi = new ActionExecuteWorkItem();
            aewi.setWorkDefinition( wi.getWorkItemDefinition() );
            LabelledAction a = new LabelledAction();
            a.action = aewi;
            a.boundName = wi.getWorkItemDefinition().getName();
            actions.add( a );
        }
View Full Code Here


                addSettersToAction( setStatements, variable, action, isJavaDialect );
            } else if ( line.startsWith( "retract" ) ) {
                String variable = unwrapParenthesis( line );
                m.addRhsItem( new ActionRetractFact( variable ) );
            } else if ( line.startsWith( "org.drools.core.process.instance.impl.WorkItemImpl wiWorkItem" ) ) {
                ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
                pwd = new PortableWorkDefinition();
                pwd.setName( "WorkItem" );
                awi.setWorkDefinition( pwd );
                m.addRhsItem( awi );
            } else if ( line.startsWith( "wiWorkItem.getParameters().put" ) ) {
                String statement = line.substring( "wiWorkItem.getParameters().put".length() );
                statement = unwrapParenthesis( statement );
                int commaPos = statement.indexOf( ',' );
View Full Code Here

                     rm );
        assertEquals( 1,
                      rm.rhs.length );

        //Examine RuleModel action
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 4,
                      mpwd.getParameters().size() );
View Full Code Here

                     rm );
        assertEquals( 1,
                      rm.rhs.length );

        //Examine RuleModel action
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 4,
                      mpwd.getParameters().size() );
View Full Code Here

                     rm );
        assertEquals( 2,
                      rm.rhs.length );

        //Examine RuleModel actions
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        ActionSetField asf = (ActionSetField) rm.rhs[ 1 ];
        assertNotNull( asf );

        //Check ActionExecuteWorkItem
        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 4,
                      mpwd.getResults().size() );
View Full Code Here

                     rm );
        assertEquals( 2,
                      rm.rhs.length );

        //Examine RuleModel actions
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        ActionSetField asf = (ActionSetField) rm.rhs[ 1 ];
        assertNotNull( asf );

        //Check ActionExecuteWorkItem
        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 2,
                      mpwd.getResults().size() );
View Full Code Here

                     rm );
        assertEquals( 2,
                      rm.rhs.length );

        //Examine RuleModel actions
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        ActionInsertFact aif = (ActionInsertFact) rm.rhs[ 1 ];
        assertNotNull( aif );

        //Check ActionExecuteWorkItem
        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 4,
                      mpwd.getResults().size() );
View Full Code Here

                     rm );
        assertEquals( 2,
                      rm.rhs.length );

        //Examine RuleModel actions
        ActionExecuteWorkItem aw = (ActionExecuteWorkItem) rm.rhs[ 0 ];
        assertNotNull( aw );

        ActionInsertFact aif = (ActionInsertFact) rm.rhs[ 1 ];
        assertNotNull( aif );

        //Check ActionExecuteWorkItem
        PortableWorkDefinition mpwd = aw.getWorkDefinition();
        assertNotNull( mpwd );

        assertEquals( 2,
                      mpwd.getResults().size() );
View Full Code Here

        con.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        p.addConstraint( con );

        m.addLhsItem( p );

        ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
        PortableWorkDefinition pwd = new PortableWorkDefinition();
        pwd.setName( "WorkItem" );
        awi.setWorkDefinition( pwd );

        PortableBooleanParameterDefinition p1 = new PortableBooleanParameterDefinition();
        p1.setName( "BooleanParameter" );
        p1.setValue( Boolean.TRUE );
        pwd.addParameter( p1 );
View Full Code Here

        con.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        p.addConstraint( con );

        m.addLhsItem( p );

        ActionExecuteWorkItem awi = new ActionExecuteWorkItem();
        PortableWorkDefinition pwd = new PortableWorkDefinition();
        pwd.setName( "WorkItem" );
        awi.setWorkDefinition( pwd );

        PortableBooleanParameterDefinition p1 = new PortableBooleanParameterDefinition();
        p1.setName( "BooleanParameter" );
        p1.setValue( Boolean.TRUE );
        p1.setBinding( "" );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.commons.shared.rule.ActionExecuteWorkItem

Copyright © 2018 www.massapicom. 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.