Package org.jbpm.bpmn2.xml

Examples of org.jbpm.bpmn2.xml.XmlBPMNProcessDumper


   
  private KnowledgeBase createKnowledgeBase(String process) throws Exception {
    KnowledgeBaseFactory.setKnowledgeBaseServiceFactory(new ProcessBaseFactoryService());
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
//    ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(conf);
View Full Code Here


    XMLUnit.setIgnoreComments(true);
  }
 
  public void testXML() throws IOException, SAXException {
    SemanticModules modules = new SemanticModules();
    modules.addSemanticModule(new BPMNSemanticModule());
    modules.addSemanticModule(new BPMNDISemanticModule());
        XmlProcessReader processReader = new XmlProcessReader(modules, getClass().getClassLoader());
        for (String processName: processes) {
      String original = slurp(BPMN2XMLTest.class.getResourceAsStream("/" + processName));
      List<Process> processes = processReader.read(BPMN2XMLTest.class.getResourceAsStream("/" + processName));
View Full Code Here

  }
 
    public void configurePackageBuilder(PackageBuilder packageBuilder) {
        PackageBuilderConfiguration conf = packageBuilder.getPackageBuilderConfiguration();
        if (conf.getSemanticModules().getSemanticModule(BPMNSemanticModule.BPMN2_URI) == null) {
          conf.addSemanticModule(new BPMNSemanticModule());
          conf.addSemanticModule(new BPMNDISemanticModule());
          conf.addSemanticModule(new BPMNExtensionsSemanticModule());
        }
    }
View Full Code Here

  }

    public void testRuleTask() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
//        ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
    XmlProcessReader processReader = new XmlProcessReader(
            ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
    List<Process> processes = processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-RuleTask.bpmn2"));
View Full Code Here

    }

    public void testAdHocSubProcess() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
//        ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
    XmlProcessReader processReader = new XmlProcessReader(
            ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
    List<Process> processes = processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcess.bpmn2"));
View Full Code Here

    }

    public void testAdHocSubProcessAutoComplete() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
//      ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
    List<Process> processes = processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcessAutoComplete.bpmn2"));
View Full Code Here

 
  private KnowledgeBase createKnowledgeBase(String process) throws Exception {
    KnowledgeBaseFactory.setKnowledgeBaseServiceFactory(new KnowledgeBaseFactoryServiceImpl());
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNExtensionsSemanticModule());
//    ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
View Full Code Here

  }
 
  private KnowledgeBase createKnowledgeBaseWithoutDumper(String process) throws Exception {
        KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
        ((PackageBuilderConfiguration) conf).initSemanticModules();
        ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
        ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNExtensionsSemanticModule());
//      ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
        XmlProcessReader processReader = new XmlProcessReader(
            ((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
View Full Code Here

   
    protected void writeModel(OutputStream os, boolean includeGraphics) throws IOException {
        OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8");
        try {
            RuleFlowProcess process = getRuleFlowModel().getRuleFlowProcess();
            XmlBPMNProcessDumper dumper = XmlBPMNProcessDumper.INSTANCE;
            String out = dumper.dump(process, XmlBPMNProcessDumper.META_DATA_USING_DI);
            writer.write(out);
        } catch (Throwable t) {
            DroolsEclipsePlugin.log(t);
            IStatus status = new Status(
                IStatus.ERROR,
View Full Code Here

            if ( process != null ) {
                String packageName = item.getPackageName();
                String originalPackageName = process.getPackageName();
                if ( !packageName.equals( originalPackageName ) ) {
                    process.setPackageName( packageName );
                    XmlBPMNProcessDumper dumper = XmlBPMNProcessDumper.INSTANCE;
                    String out = dumper.dump( process );
                    item.updateContent( out );
                    item.checkin( "Changed BPMN2 process package from " + originalPackageName + " to " + packageName );
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.jbpm.bpmn2.xml.XmlBPMNProcessDumper

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.