Package org.drools.lang.descr

Examples of org.drools.lang.descr.ProcessDescr


public class JavaReturnValueConstraintEvaluatorBuilderTest extends JbpmTestCase {

    public void testSimpleReturnValueConstraintEvaluator() throws Exception {
        final Package pkg = new Package( "pkg1" );

        ProcessDescr processDescr = new ProcessDescr();
        processDescr.setClassName( "Process1" );
        processDescr.setName( "Process1" );
       
        WorkflowProcessImpl process = new WorkflowProcessImpl();
        process.setName( "Process1" );
        process.setPackageName( "pkg1" );
View Full Code Here


        PackageBuilder pkgBuilder = new PackageBuilder( pkg );
        DialectCompiletimeRegistry dialectRegistry = pkgBuilder.getPackageRegistry( pkg.getName() ).getDialectCompiletimeRegistry();
        JavaDialect javaDialect = ( JavaDialect ) dialectRegistry.getDialect( "java" );

        ProcessDescr processDescr = new ProcessDescr();
        processDescr.setClassName( "Process1" );
        processDescr.setName( "Process1" );
       
        WorkflowProcessImpl process = new WorkflowProcessImpl();
        process.setName( "Process1" );
        process.setPackageName( "pkg1" );
View Full Code Here

      // nothing to compile.
      return;
    }

    final Process process = context.getProcess();
    final ProcessDescr processDescr = context.getProcessDescr();

    // The compilation result is for the entire rule, so difficult to
    // associate with any descr
    javaDialect.addClassCompileTask(context.getPkg().getName() + "."
        + processDescr.getClassName(), processDescr, processClass,
        null, new ProcessErrorHandler(processDescr, process,
            "Process Compilation error"));

    JavaDialectRuntimeData data = (JavaDialectRuntimeData) context.getPkg()
      .getDialectRuntimeRegistry().getDialectData(javaDialect.getId());
View Full Code Here

        for ( final Iterator it = context.getPkg().getStaticImports().iterator(); it.hasNext(); ) {
            buffer.append( "import static " + it.next() + ";" + lineSeparator );
        }

        final ProcessDescr processDescr = context.getProcessDescr();
       
        buffer.append( "public class " + StringUtils.ucFirst( processDescr.getClassName() ) + " {" + lineSeparator );
        buffer.append( "    private static final long serialVersionUID = 510l;" + lineSeparator );

        // @TODO record line numbers for each Action method
        for ( int i = 0, size = context.getMethods().size(); i < size; i++ ) {
            buffer.append( context.getMethods().get( i ) + lineSeparator );          
View Full Code Here

      if (pkgRegistry != null) {
        org.drools.rule.Package p = pkgRegistry.getPackage();
           
              if (p != null) {
             
                ProcessDescr processDescr = new ProcessDescr();
                processDescr.setName(process.getPackageName() + "." + process.getName());
                processDescr.setResource( resource );
                DialectCompiletimeRegistry dialectRegistry = pkgRegistry.getDialectCompiletimeRegistry();          
                Dialect dialect = dialectRegistry.getDialect( "java" );
                dialect.init(processDescr);
   
                ProcessBuildContext buildContext = new ProcessBuildContext(
View Full Code Here

        for ( final Iterator it = context.getPkg().getStaticImports().iterator(); it.hasNext(); ) {
            buffer.append( "import static " + it.next() + ";" + lineSeparator );
        }

        final ProcessDescr processDescr = context.getProcessDescr();
       
        buffer.append( "public class " + StringUtils.ucFirst( processDescr.getClassName() ) + " {" + lineSeparator );
        buffer.append( "    private static final long serialVersionUID = 400L;" + lineSeparator );

        // @TODO record line numbers for each Action method
        for ( int i = 0, size = context.getMethods().size(); i < size; i++ ) {
            buffer.append( context.getMethods().get( i ) + lineSeparator );          
View Full Code Here

                e.printStackTrace( System.err );
            }
           
            if (packageBuilder.getPackage() != null) {
           
              ProcessDescr processDescr = new ProcessDescr();
              processDescr.setName(process.getPackageName());
              processDescr.setUrl( url );
              PackageRegistry pkgRegistry = this.packageBuilder.getPackageRegistry( this.packageBuilder.getPackage().getName() );
              DialectCompiletimeRegistry dialectRegistry = pkgRegistry.getDialectCompiletimeRegistry();          
              Dialect dialect = dialectRegistry.getDialect( "java" );
              dialect.init(processDescr);
 
View Full Code Here

            // nothing to compile.
            return;
        }

        final Process process = context.getProcess();
        final ProcessDescr processDescr = context.getProcessDescr();

        // The compilation result is for the entire rule, so difficult to associate with any descr
        addClassCompileTask( this.pkg.getName() + "." + processDescr.getClassName(),
                             processDescr,
                             processClass,
                             this.src,
                             new ProcessErrorHandler( processDescr,
                                                      process,
View Full Code Here

        PackageBuilder pkgBuilder = new PackageBuilder( pkg );
        final PackageBuilderConfiguration conf = pkgBuilder.getPackageBuilderConfiguration();
        DialectCompiletimeRegistry dialectRegistry = pkgBuilder.getPackageRegistry( pkg.getName() ).getDialectCompiletimeRegistry();
        JavaDialect javaDialect = ( JavaDialect ) dialectRegistry.getDialect( "java" );

        ProcessDescr processDescr = new ProcessDescr();
        processDescr.setClassName( "Process1" );
        processDescr.setName( "Process1" );
       
        WorkflowProcessImpl process = new WorkflowProcessImpl();
        process.setName( "Process1" );
        process.setPackageName( "pkg1" );
View Full Code Here

    }

    public void testSimpleReturnValueConstraintEvaluator() throws Exception {
        final Package pkg = new Package( "pkg1" );

        ProcessDescr processDescr = new ProcessDescr();
        processDescr.setClassName( "Process1" );
        processDescr.setName( "Process1" );
       
        WorkflowProcessImpl process = new WorkflowProcessImpl();
        process.setName( "Process1" );
        process.setPackageName( "pkg1" );
View Full Code Here

TOP

Related Classes of org.drools.lang.descr.ProcessDescr

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.