Package org.jbpm

Examples of org.jbpm.JbpmConfiguration


    beanFactoryControl.replay();
    factoryControl.replay();

    // configuration.setBeanFactory(beanFactory);
    configuration.afterPropertiesSet();
    JbpmConfiguration cfg = (JbpmConfiguration) configuration.getObject();

    assertSame(context, cfg.createJbpmContext());

    beanFactoryControl.verify();
    factoryControl.verify();
  }
View Full Code Here


        new JbpmContext(null, mockFactory), 2);
    factoryControl.replay();
    configuration.setObjectFactory(mockFactory);
    configuration.afterPropertiesSet();

    JbpmConfiguration cfg = (JbpmConfiguration) configuration.getObject();

    Field of = cfg.getClass().getDeclaredField("objectFactory");
    of.setAccessible(true);
    assertSame(mockFactory, getObjectFactory(cfg));
  }
View Full Code Here

  public void testLoadResource() throws Exception {

    configuration.setConfiguration(configurationResource);
    // configuration.setUseSpringObjectFactory(false);
    configuration.afterPropertiesSet();
    JbpmConfiguration cfg = (JbpmConfiguration) configuration.getObject();
    JbpmContext context = cfg.createJbpmContext();
  }
View Full Code Here

      stream.close();
    }
    else
      jbpmObjectFactory = objectFactory;

    jbpmConfiguration = new JbpmConfiguration(jbpmObjectFactory);

    JbpmContext context = null;
    try {
      // 2. inject the HB session factory if it is the case
      context = jbpmConfiguration.createJbpmContext(contextName);
View Full Code Here

  public void init() throws ServletException {
    configurationName = getInitParameter("jbpm.configuration.resource", null);
  }
 
  public void destroy() {
    JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(configurationName);
    jbpmConfiguration.close();
  }
View Full Code Here

    return configuration;
  }

  public static JbpmConfiguration getJbpmConfiguration(String jbpmCfg)
  {
    JbpmConfiguration jbpmConfiguration = (JbpmConfiguration)jbpmConfigurations.get(jbpmCfg);
    if (jbpmConfiguration == null)
    {
      if (jbpmCfg == null)
      {
        jbpmConfiguration = JbpmConfiguration.getInstance();
View Full Code Here

  List fileSets = new ArrayList();
  boolean failOnError = true;

  public void execute() throws BuildException {
    // get the JbpmConfiguration
    JbpmConfiguration jbpmConfiguration = AntHelper.getJbpmConfiguration(jbpmCfg);
   
    // if attribute process is set, deploy that process file
    if (process!=null) {
      deployProcessArchive(jbpmConfiguration, process);
    }
View Full Code Here

  private String cfg = null;
  private String properties = null;

  public void execute() throws BuildException {
    // get the JbpmSessionFactory
    JbpmConfiguration jbpmConfiguration = AntHelper.getJbpmConfiguration(cfg,properties);
   
    // if attribute file is set, deploy that file file
    if (file==null) throw new BuildException("no file specified in the loadidentities task");

    log( "loading identities from "+file+" ..." );
    File identitiesFile = new File(file);
    FileInputStream fileInputStream = null;
    try {
      fileInputStream = new FileInputStream(identitiesFile);
    } catch (FileNotFoundException e) {
      throw new BuildException("identities file '"+file+"' not found");
    }
    Entity[] entities = IdentityXmlParser.parseEntitiesResource(fileInputStream);
   
    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      Session session = jbpmContext.getSession();
      for (int i=0; i<entities.length; i++) {
        session.save(entities[i]);
      }
View Full Code Here

public class FileDefinitionFileSystemConfigTest extends FileDefinitionDbConfigTest {
 
  JbpmContext jbpmContext = null;
 
  public void setUp() {
    JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseXmlString(
      "<jbpm-configuration>" +
      "  <jbpm-context name='default.jbpm.context' />" +
      "  <string name='jbpm.files.dir'>"+FileDefinitionFileSystemConfigTest.class.getProtectionDomain().getCodeSource().getLocation().getFile().toString()+"</string>" +
      "</jbpm-configuration>"
    );
    jbpmContext = jbpmConfiguration.createJbpmContext();
  }
View Full Code Here

      jbpmContextName = JbpmContext.DEFAULT_JBPM_CONTEXT_NAME;
    } else {
      log.debug("using jbpm context: '"+jbpmContextName+"'");
    }

    JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(jbpmConfigurationResource);

    commandExecutorThread = new CommandExecutorThread(jbpmConfiguration);
    commandExecutorThread.start();

    schedulerThread = new SchedulerThread(jbpmConfiguration);
View Full Code Here

TOP

Related Classes of org.jbpm.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.