Examples of PvmException


Examples of org.jbpm.PvmException

  /** @see Execution#createExecution(String) */
  public ExecutionImpl createExecution(String name) {
    // creating a child execution implies that this execution
    // is not a leave any more and therefore, it is inactivated
    if (userCodeType==UserCodeType.EVENT_ACTIVITY) {
      throw new PvmException("createExecution is not allowed inside an event. only node behaviour activities can control the propagation of execution");
    }
    if (isActive()) {
      lock(STATE_INACTIVE);
      propagation = Propagation.EXPLICIT;
    }
View Full Code Here

Examples of org.jbpm.PvmException

 
  // extensions ///////////////////////////////////////////////////////////////

  public <T> T getExtension(Class<T> extensionClass) {
    if (extensionClass==null) {
      throw new PvmException("extensionClass is null");
    }
    throw new PvmException("unsuppported extension "+extensionClass.getName());
  }
View Full Code Here

Examples of org.jbpm.PvmException

        String converterName = properties.getProperty(converterClassName);
        converterNames.put(converterClass, converterName);
        Converter converter = (Converter) converterClass.newInstance();
        converters.put(converterName, converter);
      } catch (Exception e) {
        throw new PvmException("couldn't initialize converter type "+converterClassName, e);
      }
    }
  }
View Full Code Here

Examples of org.jbpm.PvmException

      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(o);
      oos.flush();
      bytes = baos.toByteArray();
    } catch (IOException e) {
      throw new PvmException("couldn't serialize '"+o+"'", e);
    }
   
    return bytes;
  }
View Full Code Here

Examples of org.jbpm.PvmException

    try {
      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
      ObjectInputStream ois = new ObjectInputStream(bais);
      return ois.readObject();
    } catch (Exception e) {
      throw new PvmException("couldn't deserialize object", e);
    }
  }
View Full Code Here

Examples of org.jbpm.PvmException

      if (Environment.getCurrent() == null) {
        environmentFactory.openEnvironment();
        Environment.getCurrent().get(JobExecutor.class).jobWasAdded();
        Environment.getCurrent().close();
      } else {
        throw new PvmException("No environment should be open in this thread");
      }
    }
View Full Code Here

Examples of org.jbpm.PvmException

   * unit = (y|year|years|month|months|w|week|weeks|d|day|days|h|hour|hours|min|minute|minutes|s|sec|second|seconds|milli|millis|millisecond|milliseconds)
   *
   * @throws PvmException if the parsing is unsuccessful
   */
  public Duration(String text) {
    if (text==null) throw new PvmException("text is null");

    for (String part: splitInParts(text)) {
      parsePart(part);
    }
   
View Full Code Here

Examples of org.jbpm.PvmException

  }

  private void parsePart(String part) {
    int spaceIndex = part.indexOf(' ');
    if (spaceIndex==-1) {
      throw new PvmException("couldn't parse duration part "+part);
    }
    String quantityText = part.substring(0, spaceIndex).trim();
    spaceIndex = part.lastIndexOf(' ');
    String unitText = part.substring(spaceIndex+1).trim().toLowerCase();
   
    int quantity;
    try {
      quantity = Integer.parseInt(quantityText);
    } catch (NumberFormatException e) {
      throw new PvmException("couldn't parse quantity "+quantityText+" in duration text", e);
    }
    FieldSetter fieldSetter = fieldSetters.get(unitText);
    if (fieldSetter==null) {
      throw new PvmException("couldn't parse quantity "+quantityText);
    }
    fieldSetter.set(this, quantity);
  }
View Full Code Here

Examples of org.jbpm.PvmException

  public Object revert(Object o) {
    try {
      return dateFormat.parseObject((String)o);
    } catch (ParseException e) {
      throw new PvmException("invalid date format in date variable: "+o, e);
    }
  }
View Full Code Here

Examples of org.jbpm.PvmException

        javaTimer.schedule(task, eligibleDate, repeatDelay);
      } else {
        javaTimer.schedule(task, eligibleDate);
      }
    } catch (IllegalStateException e) {
      throw new PvmException(e.getMessage(), e);
    }
    scheduledJobs.put(id, task);
  }
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.