Examples of deployProcessDefinition()


Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
       
        // Create process definition
        final InputStream is = ClassUtil.getResourceAsStream(PROCESS_DEFINITION, getClass()) ;
        final ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(is) ;
        jbpmContext.deployProcessDefinition(processDefinition) ;
       
        // Create process instance
        final ProcessInstance processInstance = jbpmContext.newProcessInstance(processDefinition.getName()) ;
       
        // Start process instance
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
       
        // Create process definition
        final InputStream is = ClassUtil.getResourceAsStream(PROCESS_DEFINITION, getClass()) ;
        final ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(is) ;
        jbpmContext.deployProcessDefinition(processDefinition) ;
       
        // Create process instance
        final ProcessInstance processInstance = jbpmContext.newProcessInstance(processDefinition.getName()) ;
        processInstanceId = processInstance.getId() ;
       
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
       
        // Create process definition
        final InputStream is = ClassUtil.getResourceAsStream(PROCESS_DEFINITION, getClass()) ;
        final ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(is) ;
        jbpmContext.deployProcessDefinition(processDefinition) ;
       
        jbpmContext.close() ;
    }
}
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
        //Extract a process definition from the processdefinition.xml file.
        ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(PROCESS_DEF_XML);
        assertNotNull(processDefinition);
        //Create an instance of the process definition.
        jbpmContext.deployProcessDefinition(processDefinition);
        ProcessInstance processInstance = jbpmContext.newProcessInstance("testTimer");
        processInstanceId = processInstance.getId();
        assertTrue(
                "Instance is in start state",
                "start".equals(processInstance.getRootToken().getNode().getName()));
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        //Extract a process definition from the processdefinition.xml file.
        ProcessDefinition processDefinition
            = ProcessDefinition.parseXmlResource(PROCESS_DEF_XML);
        assertNotNull(processDefinition);
        //Create an instance of the process definition.
        jbpmContext.deployProcessDefinition(processDefinition);
        //processInstance = new ProcessInstance(processDefinition);
        ProcessInstance processInstance = jbpmContext.newProcessInstance("testExceptionHandling");
        assertTrue(
                "Instance is in start state",
                "start".equals(processInstance.getRootToken().getNode().getName()));
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

        final String esbXmlContentKey = "xml";
        final String jbpmXmlContentKey = "xmlContent";
        final String esbXmlContent = "<somexml/>";
       
        final JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
        jbpmContext.deployProcessDefinition(ProcessDefinition.parseXmlResource("callbackCommandUnitTest.xml"));
        final ProcessDefinition processDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition("callback");
        final ProcessInstance instance = new ProcessInstance(processDefinition);
       
        Token token = instance.getRootToken();
        instance.signal();
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

   
    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(file));
      ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream);
      jbpmContext.deployProcessDefinition(processDefinition);
     
    } finally {
      jbpmContext.close();
    }
  }
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

      // get jbpm context
      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      jbpmContext = jbpmConfiguration.createJbpmContext();
      // deploy process  
      try{
        jbpmContext.deployProcessDefinition(processDefinition)
      } catch (Exception e) {
        executionMsg = msgBuilder.getMessage("dossier.workProcessStartError", "component_dossier_messages");
        logger.error("Error while deploying process definition", e);
        throw e;
      }
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

                ZipInputStream zipInputStream = new ZipInputStream(fileItem.getInputStream());
                JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
                log.debug("Preparing to parse process archive");
                ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream);
                log.debug("Created a processdefinition : " + processDefinition.getName());
                jbpmContext.deployProcessDefinition(processDefinition);
                zipInputStream.close();
                return "Deployed archive " + processDefinition.getName() + " successfully";
            } catch (IOException e) {
                return "IOException";
            }
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

               ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource( definitionResource );
               if (log.isDebugEnabled())
               {
                  log.debug( "deploying process definition : " + processDefinition.getName() );
               }
               jbpmContext.deployProcessDefinition(processDefinition);
            }
         }
         catch (RuntimeException e)
         {
            throw new RuntimeException("could not deploy a process definition", e);
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.