Package org.jbpm.workflow.core.impl

Examples of org.jbpm.workflow.core.impl.WorkflowProcessImpl


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

        ReturnValueDescr descr = new ReturnValueDescr();
        descr.setText( "return value;" );

        PackageBuilder pkgBuilder = new PackageBuilder( pkg );
View Full Code Here


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

        ProcessBuildContext context = new ProcessBuildContext(pkgBuilder, pkgBuilder.getPackage(), null, processDescr, dialectRegistry, javaDialect);
       
        context.init( pkgBuilder, pkg, null, dialectRegistry, javaDialect, null);
       
View Full Code Here

                        final Attributes attrs,
                        final ExtensibleXmlParser xmlPackageReader) throws SAXException {
        xmlPackageReader.startElementBuilder( localName,
                                                  attrs );
       
        WorkflowProcessImpl  process = ( WorkflowProcessImpl ) xmlPackageReader.getParent();
       
        ActionNode actionNode = new ActionNode();
       
        final String name = attrs.getValue( "name" );       
        emptyAttributeCheck( localName, "name", name, xmlPackageReader );       
        actionNode.setName( name );
       
        final String id = attrs.getValue( "id" );       
        emptyAttributeCheck( localName, "id", name, xmlPackageReader );       
        actionNode.setId( new Long(id) );
       
        process.addNode( actionNode );
        ((ProcessBuildData)xmlPackageReader.getData()).addNode( actionNode );
       
        return actionNode;
    }   
View Full Code Here

                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
       
        WorkflowProcessImpl  process = ( WorkflowProcessImpl ) parser.getParent();       
       
        final String name = attrs.getValue( "name" );       
        emptyAttributeCheck( localName, "name", name, parser );      
       
        java.util.List<String> list = process.getFunctionImports();
        if ( list == null ) {
            list = new ArrayList<String>();
            process.setFunctionImports( list );
        }
        list.add( name );
       
        return null;
    }   
View Full Code Here

                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
       
        WorkflowProcessImpl  process = ( WorkflowProcessImpl ) parser.getParent();       
       
        final String name = attrs.getValue( "name" );       
        emptyAttributeCheck( localName, "name", name, parser );      
       
        java.util.List<String> list = process.getImports();
        if ( list == null ) {
            list = new ArrayList<String>();
            process.setImports( list );
        }
        list.add( name );
       
        return null;
    }   
View Full Code Here

                        final String localName,
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
        WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent();
        final String name = attrs.getValue("name");
        emptyAttributeCheck(localName, "name", name, parser);
       
        SwimlaneContext swimlaneContext = (SwimlaneContext)
            process.getDefaultContext(SwimlaneContext.SWIMLANE_SCOPE);
        if (swimlaneContext != null) {
            Swimlane swimlane = new Swimlane();
            swimlane.setName(name);
            swimlaneContext.addSwimlane(swimlane);
        } else {
View Full Code Here

                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );
       
        WorkflowProcessImpl  process = ( WorkflowProcessImpl ) parser.getParent();       
       
        final String identifier = attrs.getValue( "identifier" );
        final String type = attrs.getValue( "type" );
       
        emptyAttributeCheck( localName, "identifier", identifier, parser );
        emptyAttributeCheck( localName, "type", type, parser );
       
        Map<String, String> map = process.getGlobals();
        if ( map == null ) {
            map = new HashMap<String, String>();
            process.setGlobals( map );
        }
        map.put( identifier, type );
       
        return null;
    }   
View Full Code Here

  public Object start(final String uri, final String localName,
      final Attributes attrs, final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);
    WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent();

    final String name = attrs.getValue("name");
    emptyAttributeCheck(localName, "name", name, parser);

    java.util.List<String> list = process.getImports();
    if (list == null) {
      list = new ArrayList<String>();
      process.setImports(list);
    }
    list.add(name);

    return null;
  }
View Full Code Here

    private String generateRules(final Process process) {
        StringBuffer builder = new StringBuffer();

        if ( process instanceof WorkflowProcessImpl ) {
            WorkflowProcessImpl ruleFlow = (WorkflowProcessImpl) process;
            builder.append( "package " + ruleFlow.getPackageName() + "\n" );
            List<String> imports = ruleFlow.getImports();
            if ( imports != null ) {
                for ( String importString: imports ) {
                    builder.append( "import " + importString + ";\n" );
                }
            }
            List<String> functionImports = ruleFlow.getFunctionImports();
            if ( functionImports != null ) {
                for ( String importString: functionImports ) {
                    builder.append( "import function " + importString + ";\n" );
                }
            }
            Map<String, String> globals = ruleFlow.getGlobals();
            if ( globals != null ) {
                for ( Map.Entry<String, String> entry: globals.entrySet()) {
                    builder.append( "global " + entry.getValue() + " " + entry.getKey() + ";\n" );
                }
            }

            Node[] nodes = ruleFlow.getNodes();
            generateRules(nodes, process, builder);
        }
        return builder.toString();
    }
View Full Code Here

    public Object start(final String uri,
                        final String localName,
                        final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName, attrs );
        WorkflowProcessImpl  process = ( WorkflowProcessImpl ) parser.getParent();       
       
        final String identifier = attrs.getValue( "identifier" );
        final String type = attrs.getValue( "type" );
        emptyAttributeCheck( localName, "identifier", identifier, parser );
        emptyAttributeCheck( localName, "type", type, parser );
       
        Map<String, String> map = process.getGlobals();
        if ( map == null ) {
            map = new HashMap<String, String>();
            process.setGlobals( map );
        }
        map.put( identifier, type );
       
        return null;
    }   
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.core.impl.WorkflowProcessImpl

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.