Package org.jbpm.jpdl

Examples of org.jbpm.jpdl.JpdlException


      {
         return Jbpm.parseInputSource( new InputSource(resource) );
      }
      catch (JpdlException e)
      {
         throw new JpdlException("Unable to parse process definition " + resourceName, e);
      } finally {
          Resources.closeStream(resource);
      }
   }
View Full Code Here


      ProcessArchiveParser processArchiveParser = (ProcessArchiveParser)iter.next();
      processDefinition = processArchiveParser.readFromArchive(this, processDefinition);
    }
    if (Problem.containsProblemsOfLevel(problems, Problem.LEVEL_ERROR))
    {
      throw new JpdlException(problems);
    }
    return processDefinition;
  }
View Full Code Here

      addProblem(new Problem(Problem.LEVEL_ERROR, "couldn't parse process definition", e));
    }

    if (Problem.containsProblemsOfLevel(problems, Problem.LEVEL_ERROR))
    {
      throw new JpdlException(problems);
    }

    if (problems != null)
    {
      for (Problem problem : problems)
View Full Code Here

   * @throws org.jbpm.jpdl.JpdlException if parsing reported an error.
   */
  public static ProcessDefinition parseXmlResource(String xmlResource) {
    URL resourceURL = ClassLoaderUtil.getClassLoader().getResource(xmlResource);
    if (resourceURL == null) {
      throw new JpdlException("resource not found: " + xmlResource);
    }
    JpdlXmlReader jpdlReader = new JpdlXmlReader(new InputSource(resourceURL.toString()));
    return jpdlReader.readProcessDefinition();
  }
View Full Code Here

      {
         return Jbpm.parseInputSource( new InputSource(resource) );
      }
      catch (JpdlException e)
      {
         throw new JpdlException("Unable to parse process definition " + resourceName, e);
      } finally {
          Resources.closeStream(resource);
      }
   }
View Full Code Here

    try {
      // getting the value
      byte[] processBytes = processArchive.getEntry("processdefinition.xml");
     
      if (processBytes==null) {
        throw new JpdlException("no processdefinition.xml inside process archive");
      }
     
      // creating the JpdlXmlReader
      InputStream processInputStream  = new ByteArrayInputStream(processBytes);
      InputSource processInputSource = new InputSource(processInputStream);
      JpdlXmlReader jpdlXmlReader = new JpdlXmlReader(processInputSource, processArchive);
     
      processDefinition = jpdlXmlReader.readProcessDefinition();

      // close all the streams
      jpdlXmlReader.close();
      processInputStream.close();
     
    } catch (IOException e) {
      throw new JpdlException("io problem while reading processdefinition.xml: "+e.getMessage(), e);
    }
   
    return processDefinition;
  }
View Full Code Here

    while (iter.hasNext()) {
      ProcessArchiveParser processArchiveParser = (ProcessArchiveParser) iter.next();
      processDefinition = processArchiveParser.readFromArchive(this, processDefinition);
    }
    if (Problem.containsProblemsOfLevel(problems, Problem.LEVEL_ERROR)) {
      throw new JpdlException(problems);
    }
    return processDefinition;
  }
View Full Code Here

            int version = Integer.parseInt(subProcessVersion);
            // select that exact process definition as the subprocess definition
            subProcessDefinition = jbpmContext.getGraphSession().findProcessDefinition(subProcessName, version);

          } catch (NumberFormatException e) {
            throw new JpdlException("version in process-state was not a number: " + subProcessElement.asXML());
          }
         
        } else { // if only the name is specified
          // select the latest version of that process as the subprocess
          // definition
          subProcessDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition(subProcessName);
        }
      } else {
        throw new JpdlException("no sub-process name specfied in process-state: " + subProcessElement.asXML());
      }
    }

    return subProcessDefinition;
  }
View Full Code Here

      log.error("couldn't parse process definition", e);
      addProblem(new Problem(Problem.LEVEL_ERROR, "couldn't parse process definition", e));
    }
   
    if (Problem.containsProblemsOfLevel(problems, Problem.LEVEL_ERROR)) {
      throw new JpdlException(problems);
    }

    return processDefinition;
  }
View Full Code Here

      {
         return Jbpm.parseInputSource( new InputSource(resource) );
      }
      catch (JpdlException e)
      {
         throw new JpdlException("Unable to parse process definition " + resourceName, e);
      } finally {
          Resources.closeStream(resource);
      }
   }
View Full Code Here

TOP

Related Classes of org.jbpm.jpdl.JpdlException

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.