Tabnine Logo
org.kie.builder.model
Code IndexAdd Tabnine to your IDE (free)

How to use org.kie.builder.model

Best Java code snippets using org.kie.builder.model (Showing top 2 results out of 315)

origin: org.jbpm/jbpm-simulation

KieBaseModel kBase1 = kproj.newKieBaseModel(id)
    .setEqualsBehavior(EqualityBehaviorOption.EQUALITY)
    .setEventProcessingMode(EventProcessingOption.STREAM);
    .newKieSessionModel(id + ".KSession1")
    .setType(KieSessionModel.KieSessionType.STATEFUL)
    .setClockType(ClockTypeOption.get("pseudo"));
kfs.writeKModuleXML(kproj.toXML());
origin: org.jbpm/jbpm-simulation

public static ReleaseId createKJarWithMultipleResources(String id, String[] resourceFiles, ResourceType[] types) throws IOException {
  KieServices ks = KieServices.Factory.get();
  KieModuleModel kproj = ks.newKieModuleModel();
  KieFileSystem kfs = ks.newKieFileSystem();
  for (int i = 0; i < resourceFiles.length; i++) {            
    Resource resource = ResourceFactory.newClassPathResource(resourceFiles[i]);
    String res = readResourceContent(resource);
    String type = types[i].getDefaultExtension();
    kfs.write("src/main/resources/" + id.replaceAll("\\.", "/")
        + "/org/test/res" + i + "." + type, res);
  }
  KieBaseModel kBase1 = kproj.newKieBaseModel(id)
      .setEqualsBehavior(EqualityBehaviorOption.EQUALITY)
      .setEventProcessingMode(EventProcessingOption.STREAM);
  KieSessionModel ksession1 = kBase1
      .newKieSessionModel(id + ".KSession1")
      .setType(KieSessionModel.KieSessionType.STATEFUL)
      .setClockType(ClockTypeOption.get("pseudo"));
  kfs.writeKModuleXML(kproj.toXML());
  KieBuilder kieBuilder = ks.newKieBuilder(kfs).buildAll();
  assertTrue(kieBuilder.getResults().getMessages().isEmpty());
  KieModule kieModule = kieBuilder.getKieModule();
  return kieModule.getReleaseId();
}

org.kie.builder.model

Most used classes

  • KieBaseModel
  • KieModuleModel
  • KieSessionModel
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now