Package org.jbpm

Examples of org.jbpm.JbpmException


    try {
      weekDays = Day.parseWeekDays(calendarProperties, this);
      holidays = Holiday.parseHolidays(calendarProperties, this);

    } catch (Exception e) {
      throw new JbpmException("couldn't create business calendar", e);
    }
  }
View Full Code Here


  Session session = null;

  public DbLoggingService() {
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext == null) {
      throw new JbpmException("instantiation of the DbLoggingService requires a current JbpmContext");
    }
    session = jbpmContext.getSession();
  }
View Full Code Here

    if (beanElement.hasAttribute("class")) {
      className = beanElement.getAttribute("class");
    } else if ( (constructorInfo.factoryRefName==null)
                && (constructorInfo.factoryClassName==null )
              ) {
      throw new JbpmException("bean element must have a class attribute: "+XmlUtil.toString(beanElement));
    }

    // parse fields
    List propertyInfoList = new ArrayList();
    Iterator iter = XmlUtil.elementIterator(beanElement, "field");
View Full Code Here

      {
        length = Integer.parseInt(propval);
      }
      catch (NumberFormatException e)
      {
        throw new JbpmException("hibernate column type 'string_max' can't parse value '" + propval + "' as a max length.  default is 4000.", e);
      }
    }
  }
View Full Code Here

  public Object createObject(ObjectFactoryImpl objectFactory) {
    Object object = null;
   
    if (constructorInfo==null) {
      if (className==null) throw new JbpmException("bean '"+getName()+"' doesn't have a class or constructor specified");
      try {
        Class clazz = objectFactory.classForName(className);
        object = clazz.newInstance();
      } catch (Exception e) {
        throw new JbpmException("couldn't instantiate bean '"+getName()+"' of type '"+className+"'", e);
      }
    } else {
      object = constructorInfo.createObject(objectFactory);
    }
   
View Full Code Here

          configuration.setProperties(properties);
        }
        catch (Exception ex)
        {
          ex.printStackTrace();
          throw new JbpmException("couldn't set properties '" + hibernatePropertiesResource + "'", ex);
        }
      }
      configurations.put(key, configuration);
    }
    else
View Full Code Here

    return convertersIds.get(converter);
  }

  public static void registerConverter(String databaseId, Converter<?, ?> converter) {
    if (databaseId.length() != 1)
      throw new JbpmException("converter-ids must be of length 1 (to be stored in a char)");
    if (convertersByDatabaseId.containsKey(databaseId))
      throw new JbpmException("duplicate converter id: '" + databaseId + "'");

    log.debug("adding converter '" + databaseId + "', '" + converter + "'");
    convertersByClassNames.put(converter.getClass().getName(), converter);
    convertersByDatabaseId.put(databaseId, converter);
    convertersIds.put(converter, databaseId);
View Full Code Here

  {
    ProcessDefinition oldDef = pi.getProcessDefinition();
    ProcessDefinition newDef = loadNewProcessDefinition(oldDef.getName());
   
    if (newDef==null) {
      throw new JbpmException("Process definition " + oldDef.getName() + " in version " + newVersion + " not found.");
    }
   
    // set process variable to remember old version
    pi.getContextInstance().setVariable(OLD_VERSION_PROCESS_VARIABLE_NAME, oldDef.getVersion());
View Full Code Here

  {
    String name = getReplacementNodeName( oldNode );
    Node newNode = newDef.findNode(name);
    if (newNode == null)
    {
      throw new JbpmException("node with name '" + name + "' not found in new process definition");
    }
    return newNode;
  }
View Full Code Here

   * <li>years</li>
   * </ul>
   */
  public Duration(String duration) {
    if (duration == null)
      throw new JbpmException("duration is null");

    int index = indexOfNonWhite(duration, 0);
    char lead = duration.charAt(index);
    if (lead == '+' || lead == '-')
      ++index;
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.