Package org.jbpm.pvm.internal.cfg

Examples of org.jbpm.pvm.internal.cfg.JbpmConfiguration


  public Object parseDocument(Document document, Parse parse) {
    Element documentElement = document.getDocumentElement();
   
    // if the default environment factory was already set in the parse
    JbpmConfiguration jbpmConfiguration = (JbpmConfiguration) parse.findObject(JbpmConfiguration.class);
    if (jbpmConfiguration==null) {
      jbpmConfiguration = new JbpmConfiguration();
    }
   
    for (Element importElement : XmlUtil.elements(documentElement, "import")) {
      if (importElement.hasAttribute("resource")) {
        String resource = importElement.getAttribute("resource");
        Parse importParse = createParse()
          .setResource(resource)
          .pushObject(jbpmConfiguration)
          .execute();
       
        parse.addProblems(importParse.getProblems());
      }
    }

    Element processEngineElement = XmlUtil.element(documentElement, "process-engine-context");
    if (processEngineElement != null) {
      WireDefinition processEngineContextDefinition = jbpmConfiguration.getProcessEngineWireContext().getWireDefinition();
      parse.pushObject(processEngineContextDefinition);
      try {
        processEngineContextParser.parseDocumentElement(processEngineElement, parse);
      } finally {
        parse.popObject();
      }
    }

    Element txCtxElement = XmlUtil.element(documentElement, "transaction-context");
    if (txCtxElement != null) {
      WireDefinition transactionContextDefinition = jbpmConfiguration.getTransactionWireDefinition();
      parse.pushObject(transactionContextDefinition);
      try {
        transactionContextParser.parseDocumentElement(txCtxElement, parse);
      } finally {
        parse.popObject();
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.cfg.JbpmConfiguration

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.