Package org.drools.bpmn2.xml

Examples of org.drools.bpmn2.xml.BPMNSemanticModule


        RuleFlowProcess process = null;
        try {
            InputStreamReader reader = new InputStreamReader( is );
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            configuration.initSemanticModules();
            configuration.addSemanticModule( new BPMNSemanticModule() );
            configuration.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( configuration.getSemanticModules(),
                                                               getClassLoader() );
            try {
                process = (RuleFlowProcess) xmlReader.read( reader );
View Full Code Here


        try {
            reader = new InputStreamReader( is );
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            configuration.initSemanticModules();
            configuration.addSemanticModule( new BPMNSemanticModule() );
            configuration.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( configuration.getSemanticModules(),
                                                               getClassLoader() );

            //An asset can only contain one process (and a RuleFlowProcess at that)
View Full Code Here

    public static Map<String, String[]> extract(String json) throws Exception {
        Map<String, String[]> result = null;
        String xml = BPMN2ProcessHandler.serialize( "http://localhost:8080/designer/bpmn2_0serialization", json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
View Full Code Here

    public static String inject(String json, Map<String, String> constraints) throws Exception {
        String xml = BPMN2ProcessHandler.serialize( "http://localhost:8080/designer/bpmn2_0serialization", json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        isr.close();
        if ( process == null ) {
View Full Code Here

        RuleFlowProcess process = null;
        try {
            InputStreamReader reader = new InputStreamReader( is );
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            configuration.initSemanticModules();
            configuration.addSemanticModule( new BPMNSemanticModule() );
            configuration.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( configuration.getSemanticModules() );
            try {
                process = (RuleFlowProcess) xmlReader.read( reader );
            } catch ( Exception e ) {
View Full Code Here

        properties.setProperty( "drools.dialect.java.compiler", chainedProperties.getProperty( "drools.dialect.java.compiler", "ECLIPSE" ) );
        properties.putAll( buildProps );
        PackageBuilderConfiguration pkgConf = new PackageBuilderConfiguration( properties, loader );

        pkgConf.setAllowMultipleNamespaces( false );
        pkgConf.addSemanticModule( new BPMNSemanticModule() );
        pkgConf.addSemanticModule( new BPMNDISemanticModule() );

        return new BRMSPackageBuilder( pkgConf );

    }
View Full Code Here

                    JavaDialectConfiguration javaConf = (JavaDialectConfiguration) configuration.getDialectConfiguration( "java" );
                    javaConf.setJavaLanguageLevel( level );
                }
               
                SemanticModules modules = configuration.getSemanticModules();
                modules.addSemanticModule( new BPMNSemanticModule() );
                modules.addSemanticModule( new BPMNDISemanticModule() );
                modules.addSemanticModule( new BPMNExtensionsSemanticModule() );
                modules.addSemanticModule( new ProcessSemanticModule() );
               
                XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
View Full Code Here

        try {
            reader = new InputStreamReader( is );
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            configuration.initSemanticModules();
            configuration.addSemanticModule( new BPMNSemanticModule() );
            configuration.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( configuration.getSemanticModules(),
                                                               getClassLoader() );

            //An asset can only contain one process (and a RuleFlowProcess at that)
View Full Code Here

    private static PackageBuilderConfiguration getPackageBuilderConfiguration(Properties properties, ClassLoader classLoader) {
        PackageBuilderConfiguration packageBuilderConfiguration = new PackageBuilderConfiguration(properties, classLoader);

        packageBuilderConfiguration.setAllowMultipleNamespaces(false);
        packageBuilderConfiguration.addSemanticModule(new BPMNSemanticModule());
        packageBuilderConfiguration.addSemanticModule(new BPMNDISemanticModule());
        return packageBuilderConfiguration;
    }
View Full Code Here

                    javaConf.setJavaLanguageLevel( level );
                }
                configuration.getClassLoader().addClassLoader( newLoader );
               
                SemanticModules modules = configuration.getSemanticModules();
                modules.addSemanticModule( new BPMNSemanticModule() );
                modules.addSemanticModule( new BPMNDISemanticModule() );
                modules.addSemanticModule( new ProcessSemanticModule() );
               
                XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
                List<org.drools.definition.process.Process> processes =
View Full Code Here

TOP

Related Classes of org.drools.bpmn2.xml.BPMNSemanticModule

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.