Loading Drools/KIE Workbench artifacts directly from the repository

前端 未结 3 795
北海茫月
北海茫月 2020-12-02 16:14

We try to switch to Drools 6 with the all new KIE workbench (formerly known as Guvnor) and the new maven-based artifacts.

Now I\'d like to use the the system describ

3条回答
  •  误落风尘
    2020-12-02 16:53

    Here are the steps, All the steps are mandatory

    • Add kie-clie dependency in your pom

      
          org.kie
          kie-ci
          6.2.0.Final
      
      
    • Add your KIE workbench maven repo to your pom.xml

      
          guvnor-m2-repo
          Guvnor M2 Repo
          http://localhost:8080/drools/maven2wb/
      
      
    • Add the dependency to your pom.xml

      
          groupId
          artifactId
          LATEST
      
      
    • Provide your repo credentials into settings.xml

      
          guvnor-m2-repo
          admin
          @dmin
      
      
    • Java code

      KieServices ks = KieServices.Factory.get();
      ReleaseId releaseId = ks.newReleaseId("groupID", "artifactID", "LATEST");
      KieContainer kieContainer = ks.newKieContainer(releaseId);
      KieSession kieSession = kieContainer.newKieSession();
      kieSession.insert(object);
      kieSession.fireAllRules();
      

提交回复
热议问题