Package org.springmodules.workflow.jbpm30.definition

Examples of org.springmodules.workflow.jbpm30.definition.ProcessDefinitionFactoryBean.afterPropertiesSet()


    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


        }
    }
    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

  public void testDeployDefinitions() throws Exception {

    Resource definitionLocation = new ClassPathResource("org/springmodules/workflow/jbpm31/simpleWorkflow.xml");
    ProcessDefinitionFactoryBean definition = new ProcessDefinitionFactoryBean();
    definition.setDefinitionLocation(definitionLocation);
    definition.afterPropertiesSet();

    MockControl sfCtrl = MockControl.createControl(SessionFactory.class);
    SessionFactory sf = (SessionFactory) sfCtrl.getMock();

    MockControl sCtrl = MockControl.createNiceControl(Session.class);
View Full Code Here

            String toString = Arrays.asList(processDefinitionsResources).toString();
            logger.info("deploying process definitions (from resources):" + toString);

            for (int i = 0; i < processDefinitionsResources.length; i++) {
              factory.setDefinitionLocation(processDefinitionsResources[i]);
              factory.afterPropertiesSet();
              context.deployProcessDefinition((ProcessDefinition) factory.getObject());
            }
          }
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.