Package org.drools.process.core.impl

Examples of org.drools.process.core.impl.WorkDefinitionExtensionImpl


                                                                                  RuleBaseConfiguration.class ) );
        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                if ( parameterMap != null ) {
                    for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                        parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                     entry.getValue() ) );
                    }
                }
                workDefinition.setParameters( parameters );
                Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                if ( resultMap != null ) {
                    for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                        results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                  entry.getValue() ) );
                    }
                }
                workDefinition.setResults( results );
                this.workDefinitions.put( workDefinition.getName(),
                                          workDefinition );
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
            System.err.println( "Continuing without reading these work definitions" );
View Full Code Here


                Map<String, WorkDefinition> workDefinitions = new HashMap<String, WorkDefinition>();
                Thread.currentThread().setContextClassLoader(newLoader);
                List<Map<String, Object>> workDefinitionsMaps = new RuleBaseConfiguration().getWorkDefinitions();
                for ( Map<String, Object> workDefinitionMap : workDefinitionsMaps ) {
                    if ( workDefinitionMap != null ) {
                        WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                        workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                        workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                        workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                        workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                        Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                        Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                        if ( parameterMap != null ) {
                            for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                                parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                             entry.getValue() ) );
                            }
                        }
                        workDefinition.setParameters( parameters );
                        Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                        Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                        if ( resultMap != null ) {
                            for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                                results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                          entry.getValue() ) );
                            }
                        }
                        workDefinition.setResults( results );
                        workDefinitions.put( workDefinition.getName(),
                                                  workDefinition );
                    }
                }

                return workDefinitions;
View Full Code Here

                                                                                  RuleBaseConfiguration.class ) );
        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                if ( parameterMap != null ) {
                    for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                        parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                     entry.getValue() ) );
                    }
                }
                workDefinition.setParameters( parameters );
                Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                if ( resultMap != null ) {
                    for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                        results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                  entry.getValue() ) );
                    }
                }
                workDefinition.setResults( results );
                this.workDefinitions.put( workDefinition.getName(),
                                          workDefinition );
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
            System.err.println( "Continuing without reading these work definitions" );
View Full Code Here

                Map<String, WorkDefinition> workDefinitions = new HashMap<String, WorkDefinition>();
                Thread.currentThread().setContextClassLoader(newLoader);
                List<Map<String, Object>> workDefinitionsMaps = new RuleBaseConfiguration().getWorkDefinitions();
                for ( Map<String, Object> workDefinitionMap : workDefinitionsMaps ) {
                    if ( workDefinitionMap != null ) {
                        WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                        workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                        workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                        workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                        String customEditor = (String) workDefinitionMap.get( "eclipse:customEditor" );
                        if (customEditor == null) {
                          customEditor = (String) workDefinitionMap.get( "customEditor" );
                        }
                        if (customEditor == null) {
                          customEditor = "org.drools.eclipse.flow.common.editor.editpart.work.SampleCustomEditor";
                        }
                        workDefinition.setCustomEditor( customEditor );
                        Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                        Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                        if ( parameterMap != null ) {
                            for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                                parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                             entry.getValue() ) );
                            }
                        }
                        workDefinition.setParameters( parameters );
                        Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                        Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                        if ( resultMap != null ) {
                            for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                                results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                          entry.getValue() ) );
                            }
                        }
                        workDefinition.setResults( results );
                        workDefinitions.put( workDefinition.getName(),
                                                  workDefinition );
                    }
                }

                return workDefinitions;
View Full Code Here

        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                if ( workDefinitionMap != null ) {
                    WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                    workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                    workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                    workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                    workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                    Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                    Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                    if ( parameterMap != null ) {
                        for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                            parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                         entry.getValue() ) );
                        }
                    }
                    workDefinition.setParameters( parameters );
                    Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                    Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                    if ( resultMap != null ) {
                        for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                            results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                      entry.getValue() ) );
                        }
                    }
                    workDefinition.setResults( results );
                    this.workDefinitions.put( workDefinition.getName(),
                                              workDefinition );
                }
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
View Full Code Here

        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                if ( workDefinitionMap != null ) {
                    WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                    workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                    workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                    workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                    workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                    Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                    Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                    if ( parameterMap != null ) {
                        for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                            parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                         entry.getValue() ) );
                        }
                    }
                    workDefinition.setParameters( parameters );
                    Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                    Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                    if ( resultMap != null ) {
                        for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                            results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                      entry.getValue() ) );
                        }
                    }
                    workDefinition.setResults( results );
                    this.workDefinitions.put( workDefinition.getName(),
                                              workDefinition );
                }
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
View Full Code Here

                                                                                  RuleBaseConfiguration.class ) );
        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                if ( parameterMap != null ) {
                    for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                        parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                     entry.getValue() ) );
                    }
                }
                workDefinition.setParameters( parameters );
                Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                if ( resultMap != null ) {
                    for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                        results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                  entry.getValue() ) );
                    }
                }
                workDefinition.setResults( results );
                this.workDefinitions.put( workDefinition.getName(),
                                          workDefinition );
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
            System.err.println( "Continuing without reading these work definitions" );
View Full Code Here

                                                                                  RuleBaseConfiguration.class ) );
        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                if ( parameterMap != null ) {
                    for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                        parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                     entry.getValue() ) );
                    }
                }
                workDefinition.setParameters( parameters );
                Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                if ( resultMap != null ) {
                    for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                        results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                  entry.getValue() ) );
                    }
                }
                workDefinition.setResults( results );
                this.workDefinitions.put( workDefinition.getName(),
                                          workDefinition );
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
            System.err.println( "Continuing without reading these work definitions" );
View Full Code Here

                                                                                  RuleBaseConfiguration.class ) );
        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                if ( parameterMap != null ) {
                    for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                        parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                     entry.getValue() ) );
                    }
                }
                workDefinition.setParameters( parameters );
                Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                if ( resultMap != null ) {
                    for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                        results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                  entry.getValue() ) );
                    }
                }
                workDefinition.setResults( results );
                this.workDefinitions.put( workDefinition.getName(),
                                          workDefinition );
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
            System.err.println( "Continuing without reading these work definitions" );
View Full Code Here

        try {
            List<Map<String, Object>> workDefinitionsMap = (List<Map<String, Object>>) MVEL.eval( content,
                                                                                                  new HashMap() );
            for ( Map<String, Object> workDefinitionMap : workDefinitionsMap ) {
                if ( workDefinitionMap != null ) {
                    WorkDefinitionExtensionImpl workDefinition = new WorkDefinitionExtensionImpl();
                    workDefinition.setName( (String) workDefinitionMap.get( "name" ) );
                    workDefinition.setDisplayName( (String) workDefinitionMap.get( "displayName" ) );
                    workDefinition.setIcon( (String) workDefinitionMap.get( "icon" ) );
                    workDefinition.setCustomEditor( (String) workDefinitionMap.get( "customEditor" ) );
                    Set<ParameterDefinition> parameters = new HashSet<ParameterDefinition>();
                    Map<String, DataType> parameterMap = (Map<String, DataType>) workDefinitionMap.get( "parameters" );
                    if ( parameterMap != null ) {
                        for ( Map.Entry<String, DataType> entry : parameterMap.entrySet() ) {
                            parameters.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                         entry.getValue() ) );
                        }
                    }
                    workDefinition.setParameters( parameters );
                    Set<ParameterDefinition> results = new HashSet<ParameterDefinition>();
                    Map<String, DataType> resultMap = (Map<String, DataType>) workDefinitionMap.get( "results" );
                    if ( resultMap != null ) {
                        for ( Map.Entry<String, DataType> entry : resultMap.entrySet() ) {
                            results.add( new ParameterDefinitionImpl( entry.getKey(),
                                                                      entry.getValue() ) );
                        }
                    }
                    workDefinition.setResults( results );
                    this.workDefinitions.put( workDefinition.getName(),
                                              workDefinition );
                }
            }
        } catch ( Throwable t ) {
            System.err.println( "Error occured while loading work definitions " + location );
View Full Code Here

TOP

Related Classes of org.drools.process.core.impl.WorkDefinitionExtensionImpl

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.