Examples of ProcessDefinition


Examples of org.jbpm.graph.def.ProcessDefinition

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

Examples of org.jbpm.graph.def.ProcessDefinition

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

Examples of org.jbpm.graph.def.ProcessDefinition

      }
   }

   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

Examples of org.jbpm.graph.def.ProcessDefinition

   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

Examples of org.jbpm.graph.def.ProcessDefinition

    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

Examples of org.jbpm.graph.def.ProcessDefinition

*/
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

Examples of org.jbpm.graph.def.ProcessDefinition

    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

Examples of org.jbpm.pvm.ProcessDefinition

  public ProcessDefinition findProcessDefinition(String name, int version) {
    Query query = session.getNamedQuery("findProcessDefinitionByNameAndVersion");
    query.setString("name", name);
    query.setInteger("version", version);
    ProcessDefinition processDefinition = (ProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here

Examples of org.jbpm.pvm.ProcessDefinition

  public ProcessDefinition findProcessDefinition(String name) {
    Query query = session.getNamedQuery("findProcessDefinitionsByName");
    query.setString("name", name);
    query.setMaxResults(1);
    ProcessDefinition processDefinition = (ProcessDefinition) query.uniqueResult();
    return processDefinition;
  }
View Full Code Here

Examples of org.jbpm.pvm.ProcessDefinition

        // from the process definition by name.  OuchOuchSquare :-)
       
        TransitionImpl transition = execution.getTransition();
        log.finest("no current node.  searching for transition from parent of "+transition);
        if (transition!=null) {
          ProcessDefinition processDefinition = transition.getProcessDefinition();
          ObservableElementImpl transitionParent = transition.getParent();
         
          if ( (transitionParent!=null)
               && (! transitionParent.equals(processDefinition))
             ) {
            node = (NodeImpl) processDefinition.findNode(transitionParent.getName());
          }
        }
      }
     
      if (node!=null) {
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.