Package org.jbpm.compiler.xml

Examples of org.jbpm.compiler.xml.XmlProcessReader


        try {
            isr = new StringReader( xml );
            SemanticModules semanticModules = new SemanticModules();
            semanticModules.addSemanticModule( new BPMNSemanticModule() );
            semanticModules.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                               getClassLoader() );

            //An asset can only contain one process (and a RuleFlowProcess at that)
            List<Process> processes = xmlReader.read( isr );
            RuleFlowProcess process = null;
            if ( processes.size() == 0 ) {
                final String message = "RuleFlowProcess not found.";
                log.error( message );
                throw new RuntimeException( message );
View Full Code Here


            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)
            processes = xmlReader.read( reader );
            if ( processes.size() == 0 ) {
                final String message = "BPMN2Process not found.";
                log.error( message );
                throw new RuntimeException( message );
            }
View Full Code Here

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

            //An asset can only contain one process (and a RuleFlowProcess at that)
            processes = xmlReader.read( reader );
            if ( processes.size() == 0 ) {
                final String message = "RuleFlowProcess not found.";
                log.error( message );
                throw new RuntimeException( message );
            }
View Full Code Here

            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)
            processes = xmlReader.read( reader );
            if ( processes.size() == 0 ) {
                final String message = "BPMN2Process not found.";
                log.error( message );
                throw new RuntimeException( message );
            }
View Full Code Here

            InputStreamReader isr = new InputStreamReader(is);
            SemanticModules semanticModules = new SemanticModules();
            semanticModules.addSemanticModule(new BPMNSemanticModule());
          semanticModules.addSemanticModule(new BPMNExtensionsSemanticModule());
            semanticModules.addSemanticModule(new BPMNDISemanticModule());
            XmlProcessReader xmlReader = new XmlProcessReader(semanticModules, Thread.currentThread().getContextClassLoader());

            try
            {
                List<Process> processes = xmlReader.read(isr);
                if (processes == null || processes.size() == 0) {
                    setModel(createModel());
                } else {
                    RuleFlowProcess process = (RuleFlowProcess) processes.get(0);
                    if (process == null) {
View Full Code Here

        try {
            isr = new StringReader( xml );
            SemanticModules semanticModules = new SemanticModules();
            semanticModules.addSemanticModule( new BPMNSemanticModule() );
            semanticModules.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                               getClassLoader() );

            //An asset can only contain one process (and a RuleFlowProcess at that)
            List<Process> processes = xmlReader.read( isr );
            RuleFlowProcess process = null;
            if ( processes.size() == 0 ) {
                final String message = "RuleFlowProcess not found.";
                log.error( message );
                throw new RuntimeException( message );
View Full Code Here

        try {
            isr = new StringReader( xml );
            SemanticModules semanticModules = new SemanticModules();
            semanticModules.addSemanticModule( new BPMNSemanticModule() );
            semanticModules.addSemanticModule( new BPMNDISemanticModule() );
            XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                               getClassLoader() );

            //An asset can only contain one process (and a RuleFlowProcess at that)
            List<Process> processes = xmlReader.read( isr );
            RuleFlowProcess process = null;
            if ( processes.size() == 0 ) {
                final String message = "RuleFlowProcess not found.";
                log.error( message );
                throw new RuntimeException( message );
View Full Code Here

            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)
            processes = xmlReader.read( reader );
            if ( processes.size() == 0 ) {
                final String message = "BPMN2Process not found.";
                log.error( message );
                throw new RuntimeException( message );
            }
View Full Code Here

                modules.addSemanticModule( new BPMNSemanticModule() );
                modules.addSemanticModule( new BPMNDISemanticModule() );
                modules.addSemanticModule( new BPMNExtensionsSemanticModule() );
                modules.addSemanticModule( new ProcessSemanticModule() );
               
                XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
                List<org.kie.api.definition.process.Process> processes =
                    (List<org.kie.api.definition.process.Process>) xmlReader.read( new StringReader( input ) );
                if (processes != null) {
                    for (org.kie.api.definition.process.Process process: processes) {
                        if ( process != null ) {
                            return parseProcess( (Process) process,
                                                 resource,
View Full Code Here

        {
            InputStreamReader isr = new InputStreamReader(is);
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            SemanticModules modules = configuration.getSemanticModules();
            modules.addSemanticModule(new ProcessSemanticModule());
            XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );

            //Migrate v4 ruleflows to v5
            Reader reader = null;
            try
            {
                String xml = RuleFlowMigrator.convertReaderToString(isr);
                if (RuleFlowMigrator.needToMigrateRFM(xml))
                {
                    xml = RuleFlowMigrator.portRFToCurrentVersion(xml);
                    MessageDialog.openInformation(this.getSite().getShell(),
                            "Incompatible RuleFlow Version",
                            "WARNING! The selected RuleFlow is Drools version 4 format.\n\n" +
                            "Any changes made to this RuleFlow will be saved in Drools 5 format, which is " +
                            "not compatible with Drools 4. To convert this RuleFlow " +
                            "to Drools 5 format, select Save As from the File menu and overwrite this " +
                            "file - the new RuleFlow file will be saved in Drools 5 format.");
                }

                reader =  new StringReader(xml);

                List<Process> processes = xmlReader.read(reader);
                if (processes == null || processes.size() == 0) {
                    setModel(createModel());
                } else {
                    RuleFlowProcess process = (RuleFlowProcess) processes.get(0);
                    if (process == null) {
View Full Code Here

TOP

Related Classes of org.jbpm.compiler.xml.XmlProcessReader

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.