Package org.springmodules.workflow.jbpm30

Examples of org.springmodules.workflow.jbpm30.JbpmSessionFactoryUtilsTests


    TransactionTemplate transactionTemplate = new TransactionTemplate(this.transactionManager);
    transactionTemplate.execute(new TransactionCallback() {
      public Object doInTransaction(TransactionStatus status) {
        JbpmTemplate jbpmTemplate = new JbpmTemplate(jbpmSessionFactory, processDefinition);

        jbpmTemplate.execute(new JbpmCallback() {
          public Object doInJbpm(JbpmSession session) {
            session.getGraphSession().saveProcessDefinition(processDefinition);
            return null;
          }
        });
View Full Code Here


  public void testJbpmSessionSynchronization(){
    log.info("jbpmSessionSynchronization");
    TransactionTemplate transactionTemplate = new TransactionTemplate(this.transactionManager);
    transactionTemplate.execute(new TransactionCallback() {
      public Object doInTransaction(TransactionStatus status) {
        JbpmTemplate jbpmTemplate = new JbpmTemplate(jbpmSessionFactory, processDefinition);

        jbpmTemplate.execute(new JbpmCallback() {
          public Object doInJbpm(JbpmSession session) {
            session.getGraphSession().saveProcessDefinition(processDefinition);
            return null;
          }
        });
View Full Code Here

    public void setJbpmSessionFactory(JbpmSessionFactory jbpmSessionFactory) {
        this.jbpmSessionFactory = jbpmSessionFactory;
    }

    public void testWithoutDefinitionLocation() throws Exception {
        ProcessDefinitionFactoryBean factoryBean = new ProcessDefinitionFactoryBean();

        try {
            factoryBean.afterPropertiesSet();
            fail("Should not be able to call afterPropertiesSet without setting the definitionLocation");
        } catch (FatalBeanException e) {
            // success
        }
    }
View Full Code Here

        } catch (FatalBeanException e) {
            // success
        }
    }
    public void testLoadSimple() throws Exception {
        ProcessDefinitionFactoryBean factoryBean = new ProcessDefinitionFactoryBean();
        factoryBean.setDefinitionLocation(DEFINITION_LOCATION);
        factoryBean.afterPropertiesSet();

        ProcessDefinition processDefinition = (ProcessDefinition) factoryBean.getObject();
        assertNotNull("Process Definition should not be null", processDefinition);
        assertEquals("simple", processDefinition.getName());
    }
View Full Code Here

TOP

Related Classes of org.springmodules.workflow.jbpm30.JbpmSessionFactoryUtilsTests

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.