Examples of deployProcessDefinition()


Examples of org.jbpm.JbpmContext.deployProcessDefinition()

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

            // deploy the ProcessDefinitions
            for (int i = 0; i < processDefinitions.length; i++) {
              context.deployProcessDefinition(processDefinitions[i]);
            }
          }
          if (processDefinitionsResources != null) {
            ProcessDefinitionFactoryBean factory = new ProcessDefinitionFactoryBean();
            String toString = Arrays.asList(processDefinitionsResources).toString();
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

            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

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

            try {
                ZipInputStream zis = new ZipInputStream(inputStream);
                try {
                    processDefinition = ProcessDefinition.parseParZipInputStream(zis);
                    final JbpmContext jbpmContext = context.getJbpmContext();
                    jbpmContext.deployProcessDefinition(processDefinition);
                } finally {
                    try {
                        zis.close();
                    } catch (IOException e) {
                        log.warning("Error closing zip Ninput stream after deploy: " + e.getMessage());
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

  }

  private void deployProcessDefinition(ProcessDefinition processDefinition, JbpmConfiguration jbpmConfiguration) {
    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      jbpmContext.deployProcessDefinition(processDefinition);
      log("deployed process " + processDefinition.getName() + " successfully");
    }
    catch (RuntimeException e) {
      jbpmContext.setRollbackOnly();
      log("failed to deploy process " + processDefinition.getName(), e, Project.MSG_ERR);
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

  }
 
  public static void deploy(ProcessDefinition processDefinition) {
    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      jbpmContext.deployProcessDefinition(processDefinition);
    } finally {
      jbpmContext.close();
    }
  }
 
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

    try {
       ZipInputStream zipInputStream = new ZipInputStream(fileItem.getInputStream());
       JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
       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()

    try {
      URL archiveUrl = new URL(archive);
      ZipInputStream zis = new ZipInputStream(archiveUrl.openStream());
      JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
      ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zis);
      jbpmContext.deployProcessDefinition(processDefinition);
      zis.close();
     
      writer.write("Deployed archive "+archive+" successfully");
     
    } catch (Exception e) {
View Full Code Here

Examples of org.jbpm.JbpmContext.deployProcessDefinition()

    // Lookup the pojo persistence context-builder that is configured above
    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      // Deploy the process definition in the database
      jbpmContext.deployProcessDefinition(processDefinition);

    } finally {
      // Tear down the pojo persistence context.
      // This includes flush the SQL for inserting the process definition 
      // to the database.
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()

    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    jbpmContext.setConnection(connection);
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
      "<process-definition name='hello' />"
    );
    jbpmContext.deployProcessDefinition(processDefinition);
    jbpmContext.close();
    connection.commit();
    connection.close();

    connection = DriverManager.getConnection("jdbc:hsqldb:.");
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.