Package org.jbpm.env.impl

Examples of org.jbpm.env.impl.DefaultEnvironmentFactory


  public Object parseDocument(Document document, Parse parse) {
    Element documentElement = document.getDocumentElement();
   
    // if the default environment factory was already set in the parse
    // (see also {@link DefaultEnvironmentFactory#DefaultEnvironmentFactory(String, ClassLoader)})
    DefaultEnvironmentFactory defaultEnvironmentFactory = parse.findObject(DefaultEnvironmentFactory.class);
    if (defaultEnvironmentFactory==null) {
      defaultEnvironmentFactory = new DefaultEnvironmentFactory();
      parse.pushObject(defaultEnvironmentFactory);
    }

    WireDefinition applicationWireDefinition = getApplicationWireDefinition(documentElement, parse);
    WireDefinition blockWireDefinition = getBlockWireDefinition(documentElement, parse);

    // create the application wire context from the definition
    WireContext applicationWireContext = new WireContext(applicationWireDefinition, DefaultEnvironment.CONTEXTNAME_APPLICATION);
    // propagate the parser classloader to the application context
    applicationWireContext.setClassLoader(classLoader);

    // configure the default environment factory
    defaultEnvironmentFactory.setApplicationWireContext(applicationWireContext);
    defaultEnvironmentFactory.setBlockWireDefinition(blockWireDefinition);
   
    return defaultEnvironmentFactory;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.env.impl.DefaultEnvironmentFactory

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.