Package org.drools.workbench.models.datamodel.workitems

Examples of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition


        con5.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        fp5.addConstraint( con5 );
        m.addLhsItem( fp5 );

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

        PortableBooleanParameterDefinition p1 = new PortableBooleanParameterDefinition();
        p1.setName( "BooleanParameter" );
        p1.setBinding( "$b" );
        p1.setValue( Boolean.TRUE );
        pwd.addParameter( p1 );

        PortableFloatParameterDefinition p2 = new PortableFloatParameterDefinition();
        p2.setName( "FloatParameter" );
        p2.setBinding( "$f" );
        p2.setValue( 123.456f );
        pwd.addParameter( p2 );

        PortableIntegerParameterDefinition p3 = new PortableIntegerParameterDefinition();
        p3.setName( "IntegerParameter" );
        p3.setBinding( "$i" );
        p3.setValue( 123 );
        pwd.addParameter( p3 );

        PortableStringParameterDefinition p4 = new PortableStringParameterDefinition();
        p4.setName( "StringParameter" );
        p4.setBinding( "$s" );
        p4.setValue( "hello" );
        pwd.addParameter( p4 );

        m.addRhsItem( awi );

        String result = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
View Full Code Here


        con5.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        fp5.addConstraint( con5 );
        m.addLhsItem( fp5 );

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

        PortableBooleanParameterDefinition p1 = new PortableBooleanParameterDefinition();
        p1.setName( "BooleanParameter" );
        p1.setBinding( "$b" );
        p1.setValue( Boolean.TRUE );
        pwd.addParameter( p1 );

        PortableFloatParameterDefinition p2 = new PortableFloatParameterDefinition();
        p2.setName( "FloatParameter" );
        p2.setBinding( "$f" );
        p2.setValue( 123.456f );
        pwd.addParameter( p2 );

        PortableIntegerParameterDefinition p3 = new PortableIntegerParameterDefinition();
        p3.setName( "IntegerParameter" );
        p3.setBinding( "$i" );
        p3.setValue( 123 );
        pwd.addParameter( p3 );

        PortableStringParameterDefinition p4 = new PortableStringParameterDefinition();
        p4.setName( "StringParameter" );
        p4.setBinding( "$s" );
        p4.setValue( "hello" );
        pwd.addParameter( p4 );

        m.addRhsItem( awi );

        String result = RuleModelDRLPersistenceImpl.getInstance().marshal( m );
View Full Code Here

                           String rhs,
                           boolean isJavaDialect,
                           Map<String, String> boundParams,
                           ExpandedDRLInfo expandedDRLInfo,
                           PackageDataModelOracle dmo ) {
        PortableWorkDefinition pwd = null;
        Map<String, List<String>> setStatements = new HashMap<String, List<String>>();
        Map<String, Integer> setStatementsPosition = new HashMap<String, Integer>();
        Map<String, String> factsType = new HashMap<String, String>();

        int lineCounter = -1;
        String[] lines = rhs.split( "\n" );
        for ( String line : lines ) {
            lineCounter++;
            if ( expandedDRLInfo.hasDsl ) {
                String dslLine = expandedDRLInfo.dslStatementsInRhs.get( lineCounter );
                while ( dslLine != null ) {
                    m.addRhsItem( toDSLSentence( expandedDRLInfo.rhsDslPatterns, dslLine ) );
                    dslLine = expandedDRLInfo.dslStatementsInRhs.get( ++lineCounter );
                }
            }
            line = line.trim();
            if ( line.startsWith( "insertLogical" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact, factsType );
                if ( type != null ) {
                    ActionInsertLogicalFact action = new ActionInsertLogicalFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "insert" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact, factsType );
                if ( type != null ) {
                    ActionInsertFact action = new ActionInsertFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        action.setBoundName( fact );
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "update" ) ) {
                String variable = unwrapParenthesis( line );
                ActionUpdateField action = new ActionUpdateField();
                action.setVariable( variable );
                m.addRhsItem( action );
                addSettersToAction( setStatements,
                                    variable,
                                    action,
                                    boundParams,
                                    dmo,
                                    m.getImports(),
                                    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( ',' );
                String name = statement.substring( 0, commaPos ).trim();
                String value = statement.substring( commaPos + 1 ).trim();
                pwd.addParameter( buildPortableParameterDefinition( name, value, boundParams ) );
            } else if ( line.startsWith( "wim.internalExecuteWorkItem" ) || line.startsWith( "wiWorkItem.setName" ) ) {
                // ignore
            } else {
                int dotPos = line.indexOf( '.' );
                int argStart = line.indexOf( '(' );
View Full Code Here

            workDefinitions.putAll( configWorkDefinitionsLoader.loadWorkDefinitions() );

            //Copy the Work Items into Structures suitable for GWT
            final Set<PortableWorkDefinition> workItems = new HashSet<PortableWorkDefinition>();
            for ( Map.Entry<String, WorkDefinition> entry : workDefinitions.entrySet() ) {
                final PortableWorkDefinition wid = new PortableWorkDefinition();
                final WorkDefinitionImpl wd = (WorkDefinitionImpl) entry.getValue();
                wid.setName( wd.getName() );
                wid.setDisplayName( wd.getDisplayName() );
                wid.setParameters( convertWorkItemParameters( entry.getValue().getParameters() ) );
                wid.setResults( convertWorkItemParameters( entry.getValue().getResults() ) );
                workItems.add( wid );
            }
            return workItems;

        } catch ( Exception e ) {
View Full Code Here

                           final String rhs,
                           final boolean isJavaDialect,
                           final Map<String, String> boundParams,
                           final ExpandedDRLInfo expandedDRLInfo,
                           final PackageDataModelOracle dmo ) {
        PortableWorkDefinition pwd = null;
        Map<String, List<String>> setStatements = new HashMap<String, List<String>>();
        Map<String, Integer> setStatementsPosition = new HashMap<String, Integer>();
        Map<String, String> factsType = new HashMap<String, String>();

        String modifiedVariable = null;
        String modifiers = null;

        int lineCounter = -1;
        String[] lines = rhs.split( "\n" );
        for ( String line : lines ) {
            lineCounter++;
            if ( expandedDRLInfo.hasDsl ) {
                String dslLine = expandedDRLInfo.dslStatementsInRhs.get( lineCounter );
                while ( dslLine != null ) {
                    m.addRhsItem( toDSLSentence( expandedDRLInfo.rhsDslPatterns,
                                                 dslLine ) );
                    dslLine = expandedDRLInfo.dslStatementsInRhs.get( ++lineCounter );
                }
            }
            line = line.trim();
            if ( modifiedVariable != null ) {
                int modifyBlockEnd = line.lastIndexOf( '}' );
                if ( modifiers == null ) {
                    modifiers = modifyBlockEnd > 0 ?
                            line.substring( line.indexOf( '{' ) + 1,
                                            modifyBlockEnd ).trim() :
                            line.substring( line.indexOf( '{' ) + 1 ).trim();
                } else if ( modifyBlockEnd != 0 ) {
                    modifiers += modifyBlockEnd > 0 ?
                            line.substring( 0,
                                            modifyBlockEnd ).trim() :
                            line;
                }
                if ( modifyBlockEnd >= 0 ) {
                    ActionUpdateField action = new ActionUpdateField();
                    action.setVariable( modifiedVariable );
                    m.addRhsItem( action );
                    addModifiersToAction( modifiers,
                                          action,
                                          boundParams,
                                          dmo,
                                          m.getImports(),
                                          isJavaDialect );
                    modifiedVariable = null;
                    modifiers = null;
                }
            } else if ( line.startsWith( "insertLogical" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact,
                                                factsType );
                if ( type != null ) {
                    ActionInsertLogicalFact action = new ActionInsertLogicalFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "insert" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact,
                                                factsType );
                if ( type != null ) {
                    ActionInsertFact action = new ActionInsertFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        action.setBoundName( fact );
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "update" ) ) {
                String variable = unwrapParenthesis( line );
                ActionUpdateField action = new ActionUpdateField();
                action.setVariable( variable );
                m.addRhsItem( action );
                addSettersToAction( setStatements,
                                    variable,
                                    action,
                                    boundParams,
                                    dmo,
                                    m.getImports(),
                                    isJavaDialect );
            } else if ( line.startsWith( "modify" ) ) {
                int modifyBlockEnd = line.lastIndexOf( '}' );
                if ( modifyBlockEnd > 0 ) {
                    String variable = line.substring( line.indexOf( '(' ) + 1,
                                                      line.indexOf( ')' ) ).trim();
                    ActionUpdateField action = new ActionUpdateField();
                    action.setVariable( variable );
                    m.addRhsItem( action );
                    addModifiersToAction( line.substring( line.indexOf( '{' ) + 1,
                                                          modifyBlockEnd ).trim(),
                                          action,
                                          boundParams,
                                          dmo,
                                          m.getImports(),
                                          isJavaDialect );
                } else {
                    modifiedVariable = line.substring( line.indexOf( '(' ) + 1,
                                                       line.indexOf( ')' ) ).trim();
                    int modifyBlockStart = line.indexOf( '{' );
                    if ( modifyBlockStart > 0 ) {
                        modifiers = line.substring( modifyBlockStart + 1 ).trim();
                    }
                }
            } else if ( line.startsWith( "retract" ) || line.startsWith( "delete" ) ) {
                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( ',' );
                String name = statement.substring( 0,
                                                   commaPos ).trim();
                String value = statement.substring( commaPos + 1 ).trim();
                pwd.addParameter( buildPortableParameterDefinition( name,
                                                                    value,
                                                                    boundParams ) );
            } else if ( line.startsWith( "wim.internalExecuteWorkItem" ) || line.startsWith( "wiWorkItem.setName" ) ) {
                // ignore
            } else {
View Full Code Here

                           String rhs,
                           boolean isJavaDialect,
                           Map<String, String> boundParams,
                           ExpandedDRLInfo expandedDRLInfo,
                           PackageDataModelOracle dmo ) {
        PortableWorkDefinition pwd = null;
        Map<String, List<String>> setStatements = new HashMap<String, List<String>>();
        Map<String, Integer> setStatementsPosition = new HashMap<String, Integer>();
        Map<String, String> factsType = new HashMap<String, String>();

        int lineCounter = -1;
        String[] lines = rhs.split( "\n" );
        for ( String line : lines ) {
            lineCounter++;
            if ( expandedDRLInfo.hasDsl ) {
                String dslLine = expandedDRLInfo.dslStatementsInRhs.get( lineCounter );
                while ( dslLine != null ) {
                    m.addRhsItem( toDSLSentence( expandedDRLInfo.rhsDslPatterns, dslLine ) );
                    dslLine = expandedDRLInfo.dslStatementsInRhs.get( ++lineCounter );
                }
            }
            line = line.trim();
            if ( line.startsWith( "insertLogical" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact, factsType );
                if ( type != null ) {
                    ActionInsertLogicalFact action = new ActionInsertLogicalFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "insert" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact, factsType );
                if ( type != null ) {
                    ActionInsertFact action = new ActionInsertFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        action.setBoundName( fact );
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "update" ) ) {
                String variable = unwrapParenthesis( line );
                ActionUpdateField action = new ActionUpdateField();
                action.setVariable( variable );
                m.addRhsItem( action );
                addSettersToAction( setStatements,
                                    variable,
                                    action,
                                    boundParams,
                                    dmo,
                                    m.getImports(),
                                    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( ',' );
                String name = statement.substring( 0, commaPos ).trim();
                String value = statement.substring( commaPos + 1 ).trim();
                pwd.addParameter( buildPortableParameterDefinition( name, value, boundParams ) );
            } else if ( line.startsWith( "wim.internalExecuteWorkItem" ) || line.startsWith( "wiWorkItem.setName" ) ) {
                // ignore
            } else {
                int dotPos = line.indexOf( '.' );
                int argStart = line.indexOf( '(' );
View Full Code Here

                           final String rhs,
                           final boolean isJavaDialect,
                           final Map<String, String> boundParams,
                           final ExpandedDRLInfo expandedDRLInfo,
                           final PackageDataModelOracle dmo ) {
        PortableWorkDefinition pwd = null;
        Map<String, List<String>> setStatements = new HashMap<String, List<String>>();
        Map<String, Integer> setStatementsPosition = new HashMap<String, Integer>();
        Map<String, String> factsType = new HashMap<String, String>();

        String modifiedVariable = null;
        String modifiers = null;

        int lineCounter = -1;
        String[] lines = rhs.split( "\n" );
        for ( String line : lines ) {
            lineCounter++;
            if ( expandedDRLInfo.hasDsl ) {
                String dslLine = expandedDRLInfo.dslStatementsInRhs.get( lineCounter );
                while ( dslLine != null ) {
                    m.addRhsItem( toDSLSentence( expandedDRLInfo.rhsDslPatterns,
                                                 dslLine ) );
                    dslLine = expandedDRLInfo.dslStatementsInRhs.get( ++lineCounter );
                }
            }
            line = line.trim();
            if ( modifiedVariable != null ) {
                int modifyBlockEnd = line.lastIndexOf( '}' );
                if ( modifiers == null ) {
                    modifiers = modifyBlockEnd > 0 ?
                            line.substring( line.indexOf( '{' ) + 1,
                                            modifyBlockEnd ).trim() :
                            line.substring( line.indexOf( '{' ) + 1 ).trim();
                } else if ( modifyBlockEnd != 0 ) {
                    modifiers += modifyBlockEnd > 0 ?
                            line.substring( 0,
                                            modifyBlockEnd ).trim() :
                            line;
                }
                if ( modifyBlockEnd >= 0 ) {
                    ActionUpdateField action = new ActionUpdateField();
                    action.setVariable( modifiedVariable );
                    m.addRhsItem( action );
                    addModifiersToAction( modifiers,
                                          action,
                                          boundParams,
                                          dmo,
                                          m.getImports(),
                                          isJavaDialect );
                    modifiedVariable = null;
                    modifiers = null;
                }
            } else if ( line.startsWith( "insertLogical" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact,
                                                factsType );
                if ( type != null ) {
                    ActionInsertLogicalFact action = new ActionInsertLogicalFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "insert" ) ) {
                String fact = unwrapParenthesis( line );
                String type = getStatementType( fact,
                                                factsType );
                if ( type != null ) {
                    ActionInsertFact action = new ActionInsertFact( type );
                    m.addRhsItem( action );
                    if ( factsType.containsKey( fact ) ) {
                        action.setBoundName( fact );
                        addSettersToAction( setStatements,
                                            fact,
                                            action,
                                            boundParams,
                                            dmo,
                                            m.getImports(),
                                            isJavaDialect );
                    }
                }
            } else if ( line.startsWith( "update" ) ) {
                String variable = unwrapParenthesis( line );
                ActionUpdateField action = new ActionUpdateField();
                action.setVariable( variable );
                m.addRhsItem( action );
                addSettersToAction( setStatements,
                                    variable,
                                    action,
                                    boundParams,
                                    dmo,
                                    m.getImports(),
                                    isJavaDialect );
            } else if ( line.startsWith( "modify" ) ) {
                int modifyBlockEnd = line.lastIndexOf( '}' );
                if ( modifyBlockEnd > 0 ) {
                    String variable = line.substring( line.indexOf( '(' ) + 1,
                                                      line.indexOf( ')' ) ).trim();
                    ActionUpdateField action = new ActionUpdateField();
                    action.setVariable( variable );
                    m.addRhsItem( action );
                    addModifiersToAction( line.substring( line.indexOf( '{' ) + 1,
                                                          modifyBlockEnd ).trim(),
                                          action,
                                          boundParams,
                                          dmo,
                                          m.getImports(),
                                          isJavaDialect );
                } else {
                    modifiedVariable = line.substring( line.indexOf( '(' ) + 1,
                                                       line.indexOf( ')' ) ).trim();
                    int modifyBlockStart = line.indexOf( '{' );
                    if ( modifyBlockStart > 0 ) {
                        modifiers = line.substring( modifyBlockStart + 1 ).trim();
                    }
                }
            } else if ( line.startsWith( "retract" ) || line.startsWith( "delete" ) ) {
                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( ',' );
                String name = statement.substring( 0,
                                                   commaPos ).trim();
                String value = statement.substring( commaPos + 1 ).trim();
                pwd.addParameter( buildPortableParameterDefinition( name,
                                                                    value,
                                                                    boundParams ) );
            } else if ( line.startsWith( "wim.internalExecuteWorkItem" ) || line.startsWith( "wiWorkItem.setName" ) ) {
                // ignore
            } else {
View Full Code Here

            workDefinitions.putAll( configWorkDefinitionsLoader.loadWorkDefinitions() );

            //Copy the Work Items into Structures suitable for GWT
            final Set<PortableWorkDefinition> workItems = new HashSet<PortableWorkDefinition>();
            for ( Map.Entry<String, WorkDefinition> entry : workDefinitions.entrySet() ) {
                final PortableWorkDefinition wid = new PortableWorkDefinition();
                final WorkDefinitionImpl wd = (WorkDefinitionImpl) entry.getValue();
                wid.setName( wd.getName() );
                wid.setDisplayName( wd.getDisplayName() );
                wid.setParameters( convertWorkItemParameters( entry.getValue().getParameters() ) );
                wid.setResults( convertWorkItemParameters( entry.getValue().getResults() ) );
                workItems.add( wid );
            }
            return workItems;

        } catch ( Exception e ) {
View Full Code Here

        //Get list of Work Items executed by Actions
        List<PortableWorkDefinition> actionWorkItems = new ArrayList<PortableWorkDefinition>();
        for ( ActionCol52 ac : model.getActionCols() ) {
            if ( ac instanceof ActionWorkItemCol52 ) {
                PortableWorkDefinition pwd = ( (ActionWorkItemCol52) ac ).getWorkItemDefinition();
                actionWorkItems.add( pwd );
            }
        }

        //Populate list of available result parameters
        if ( actionWorkItems.size() == 0 ) {
            workItemResultParameters.setEnabled( false );
            workItemResultParameters.addItem( GuidedDecisionTableConstants.INSTANCE.NoWorkItemsAvailable() );
            editingCol.setWorkItemName( null );
            editingCol.setWorkItemResultParameterName( null );
            editingCol.setParameterClassName( null );
        } else {
            int selectedItemIndex = -1;
            String selectedItemKey = editingCol.getWorkItemName() + "" + editingCol.getWorkItemResultParameterName();
            workItemResultParameters.setEnabled( true && !isReadOnly );
            for ( PortableWorkDefinition pwd : actionWorkItems ) {
                for ( PortableParameterDefinition ppd : pwd.getResults() ) {
                    if ( acceptParameterType( ppd ) ) {
                        String key = pwd.getName() + "" + ppd.getName();
                        String parameterDisplayName = pwd.getDisplayName() + "" + ppd.getName();

                        //Pre-select item if applicable
                        if ( key.equals( selectedItemKey ) ) {
                            selectedItemIndex = workItemResultParameters.getItemCount();
                        }
View Full Code Here

    }

    private void showWorkItemParameters() {

        //Hide parameter selections if a Work Item has not been selected
        PortableWorkDefinition wid = editingCol.getWorkItemDefinition();
        if ( wid == null ) {
            this.setAttributeVisibility( workItemInputParametersIndex,
                                         false );
            return;
        }

        //Show parameters
        this.setAttributeVisibility( workItemInputParametersIndex,
                                     true );

        //Input parameters
        workItemInputParameters.setParameters( wid.getParameters() );

    }
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.workitems.PortableWorkDefinition

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.