コード例 #1
0
  protected void removePackage(String uuid) {

    try {
      PackageItem item = rulesRepository.loadPackageByUUID(uuid);
      log.info("USER:"******" REMOVEING package [" + item.getName() + "]");
      item.remove();
      rulesRepository.save();
    } catch (RulesRepositoryException e) {
      log.error("Unable to remove package.", e);
      throw e;
    }
  }
コード例 #2
0
  public BuilderResult buildPackage(
      String packageUUID,
      boolean force,
      String buildMode,
      String statusOperator,
      String statusDescriptionValue,
      boolean enableStatusSelector,
      String categoryOperator,
      String category,
      boolean enableCategorySelector,
      String customSelectorName)
      throws SerializationException {

    PackageItem item = rulesRepository.loadPackageByUUID(packageUUID);
    try {
      return buildPackage(
          item,
          force,
          createConfiguration(
              buildMode,
              statusOperator,
              statusDescriptionValue,
              enableStatusSelector,
              categoryOperator,
              category,
              enableCategorySelector,
              customSelectorName));
    } catch (NoClassDefFoundError e) {
      throw new DetailedSerializationException(
          "Unable to find a class that was needed when building the package  ["
              + e.getMessage()
              + "]",
          "Perhaps you are missing them from the model jars, or from the BRMS itself (lib directory).");
    } catch (UnsupportedClassVersionError e) {
      throw new DetailedSerializationException(
          "Can not build the package. One or more of the classes that are needed were compiled with an unsupported Java version.",
          "For example the pojo classes were compiled with Java 1.6 and Guvnor is running on Java 1.5. ["
              + e.getMessage()
              + "]");
    }
  }
コード例 #3
0
  protected String buildPackageSource(String packageUUID) throws SerializationException {

    PackageItem item = rulesRepository.loadPackageByUUID(packageUUID);
    PackageDRLAssembler asm = new PackageDRLAssembler(item);
    return asm.getDRL();
  }