KIE Workbench: How to triggers rules in workbench from java application?

196 Views Asked by At

I have installed KIE Workbench and KIE server on Docker.I have the artifact in drools workbench. Now I am trying to run the artifact from eclipse. I tried doing this :

    KieServices ks = KieServices.Factory.get();
    KieContainer kContainer = ks.newKieContainer(
            ks.newReleaseId("com.myteam",   "test1", "1.0.0"));

    KieScanner kScanner = ks.newKieScanner( kContainer );
    kScanner.start( 10000L );
    KieSession kSession = kContainer.newKieSession("default");  

However I am getting a runtime exception:

Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: com.myteam:test1:1.0.0
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:172)
at com.sample.Invoke.main(Invoke.java:12)

I found in this link : Loading Drools/KIE Workbench artifacts directly from the repository . I want to try this approach.

But I am not sure what the url should be because the url in my pom file is a file path. I have attached the screen shot of pom file. Screen shot of the pom file

I checked the log of KIE Server. I have attached the screen shot of the the log.KIE Server LOG Screenshot. When I navigate to that url. I get an error message saying "took too long to respond".

Thanks

0

There are 0 best solutions below