Package org.jbpm

Examples of org.jbpm.JbpmException


      StringTokenizer tokenizer = new StringTokenizer(hierarchicalName, "/");
      while (tokenizer.hasMoreElements()) {
        String namePart = tokenizer.nextToken();
        if ("..".equals(namePart) ) {
          if (nodeCollection instanceof ProcessDefinition) {
            throw new JbpmException("couldn't find node '"+hierarchicalName+"' because of a '..' on the process definition.");
          }
          nodeCollection = (NodeCollection) ((GraphElement)nodeCollection).getParent();
        } else if ( tokenizer.hasMoreElements() ) {
          nodeCollection = (NodeCollection)nodeCollection.getNode(namePart);
        } else {
View Full Code Here


        // create the instantiator with the default constructor
        instantiator = (Instantiator) instantiatorClass.newInstance();
        instantiatorCache.put(configType, instantiator);
      }
      catch (ClassNotFoundException e) {
        throw new JbpmException("could not load instantiator class '" + configType + "'", e);
      }
      catch (InstantiationException e) {
        throw new JbpmException("could not instantiate " + instantiatorClass, e);
      }
      catch (IllegalAccessException e) {
        throw new JbpmException("could not access " + instantiatorClass, e);
      }
    }

    // instantiate the object
    return instantiator.instantiate(delegationClass, configuration);
View Full Code Here

  boolean hasProducedJobs = false;
 
  public DbMessageService() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext==null) {
      throw new JbpmException("instantiation of the DbMessageService requires a current JbpmContext");
    }
    jobSession = jbpmContext.getJobSession();
    jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
  }
View Full Code Here

              + processDefinition.getName()
              + "/classes/"
              + name, new BytesUrlStreamHandler(bytes));
        }
        catch (MalformedURLException e) {
          throw new JbpmException("couldn't create url", e);
        }
      }
    }
    return url;
  }
View Full Code Here

  public static <T> T instantiate(Class<T> type) {
    try {
      return type.newInstance();
    }
    catch (InstantiationException e) {
      throw new JbpmException("could not instantiate " + type, e);
    }
    catch (IllegalAccessException e) {
      throw new JbpmException(type + " is inaccessible", e);
    }
  }
View Full Code Here

      Constructor<T> constructor = type.getDeclaredConstructor(configType);
      constructor.setAccessible(true);
      return constructor.newInstance(config);
    }
    catch (NoSuchMethodException e) {
      throw new JbpmException(type
          + " does not have a "
          + config.getClass().getSimpleName()
          + " constructor", e);
    }
    catch (InstantiationException e) {
      throw new JbpmException("could not instantiate " + type, e);
    }
    catch (IllegalAccessException e) {
      throw new JbpmException(type + " is inaccessible", e);
    }
    catch (IllegalArgumentException e) {
      throw new JbpmException(type + " cannot be constructed with value " + config, e);
    }
    catch (InvocationTargetException e) {
      throw new JbpmException("constructor for " + type + " threw exception", e.getCause());
    }
  }
View Full Code Here

  Writer writer = null;
  List problems = new ArrayList();
  boolean useNamespace = false;

  public JpdlXmlWriter( Writer writer ) {
    if (writer==null) throw new JbpmException("writer is null");
    this.writer = writer;
  }
View Full Code Here

    Element element = null;
    try {
      element = DocumentHelper.parseText("<action>" + config + "</action>").getRootElement();
    }
    catch (DocumentException e) {
      throw new JbpmException("failed to parse configuration: " + config, e);
    }
    return element;
  }
View Full Code Here

 
  //newElement.add( jbpmNamespace );

  public void write(ProcessDefinition processDefinition) {
    problems = new ArrayList();
    if (processDefinition==null) throw new JbpmException("processDefinition is null");
    try {
      // collect the actions of the process definition
      // we will remove each named event action and the remaining ones will be written
      // on the process definition.
      // create a dom4j dom-tree for the process definition
View Full Code Here

      } else { // its stored in the database
        storeFileInDb(name, is);
      }
    } catch (Exception e) {
      throw new JbpmException("file '" + name + "' could not be stored", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.JbpmException

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.