Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.ProcessDefinition


   @Test
   public void testGetProcessDefinitionFromXml()
   {

      Jbpm jbpm = new Jbpm();
      ProcessDefinition pd = jbpm.getProcessDefinitionFromXml(PROCESS_DEFINITION);
      assert "start".equals(pd.getStartState().getName());
      assert "test".equals(pd.getName());     
     
   }
View Full Code Here


   @Test
   public void testGetPageflowDefinitionFromXml()
   {

      Jbpm jbpm = new Jbpm();
      ProcessDefinition pd = jbpm.getPageflowDefinitionFromXml(PAGE_FLOW_DEFINITION);
      assert "start".equals(pd.getStartState().getName());
      assert "newuser".equals(pd.getName());
     
   }
View Full Code Here

public class SimpleProcessTest extends TestCase {

  public void testSimpleProcess() throws Exception {

    // Extract a process definition from the processdefinition.xml file.
    ProcessDefinition definition =
      ProcessDefinition.parseXmlResource("simple.par/processdefinition.xml");
    assertNotNull("Definition should not be null", definition);

    // Create an instance of the process definition.
    ProcessInstance instance = new ProcessInstance(definition);
View Full Code Here

         mergedPageflowDefinitions.add(fileDescriptor.getName());
      }
     
      for (String pageflow: mergedPageflowDefinitions)
      {
         ProcessDefinition pd = getPageflowDefinitionFromResource(pageflow);
         pageflowProcessDefinitions.put( pd.getName(), pd );
      }
   }
View Full Code Here

      }
   }

   private void deployProcess(JbpmContext jbpmContext, String definitionResource)
   {
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(definitionResource);
      if (log.isDebugEnabled())
      {
         log.debug( "deploying process definition : " + processDefinition.getName() );
      }
      jbpmContext.deployProcessDefinition(processDefinition);
   }
View Full Code Here

   class SeamSubProcessResolver implements SubProcessResolver
   {
      public ProcessDefinition findSubProcess(Element element)
      {
         String subProcessName = element.attributeValue("name");
         ProcessDefinition pageflow = pageflowProcessDefinitions.get(subProcessName);
         return pageflow==null ? DB_SUB_PROCESS_RESOLVER.findSubProcess(element) : pageflow;
      }
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 class ProcessDefinitionTests extends TestCase {

    public void testLoadProcessDefinition() throws IOException {
        ClassPathResource resource = new ClassPathResource("simpleWorkflow.xml", getClass());
        ProcessDefinition pd = ProcessDefinition.parseXmlInputStream(resource.getInputStream());
        assertNotNull(pd);
    }
View Full Code Here

    graphSession.saveProcessDefinition(processDefinition);
    //     Get All Process Definitions
    List l = graphSession.findLatestProcessDefinitions();

    //     Get the arbitrarily first Process Definition
    ProcessDefinition pd = (ProcessDefinition) l.get(0);

    //     Load it again, individually
    ProcessDefinition pd2 = graphSession.loadProcessDefinition(pd.getId());

    //     Create an instance of the Process Def with Task
    ProcessInstance processInstance = new ProcessInstance(pd2);
    TaskInstance jbpmTaskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
View Full Code Here

  public Serializable revert(ByteArray o, Token token) {
    InputStream memoryStream = new ByteArrayInputStream(o.getBytes());
    try {
      ObjectInputStream objectStream;
      if (token != null) {
        ProcessDefinition processDefinition = token.getProcessInstance().getProcessDefinition();
        ClassLoader classLoader = JbpmConfiguration.getProcessClassLoader(processDefinition);
        objectStream = new CustomLoaderObjectInputStream(memoryStream, classLoader);
      }
      else {
        objectStream = new ObjectInputStream(memoryStream);
View Full Code Here

TOP

Related Classes of org.jbpm.graph.def.ProcessDefinition

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.