KIE WB with spring boot

1,892 views
Skip to first unread message

sai s chinnappa

unread,
Feb 19, 2018, 10:45:43 PM2/19/18
to Drools Setup
Hi,

I have a app which runs on spring boot, and using kie-ci to execute the rules. Is there a way for me to use kie-wb in sprinboot to externalize the rules, so I can change the rules outside the app without re-deploying the code?

I tried with kie-server-spring-boot-starter:7.6.0 dependency, but couldn't make the kie-wb work. Is there any other option for UI to host my rules?

Thanks,
Sai

Rajeev Naik

unread,
Feb 20, 2018, 11:59:54 AM2/20/18
to Drools Setup

Rajeev Naik

unread,
Feb 20, 2018, 1:39:25 PM2/20/18
to Drools Setup
For kie-server-spring-boot-starter, how did you override 'DefaultWebSecurityConfig'?

Maciej Swiderski

unread,
Feb 20, 2018, 2:17:22 PM2/20/18
to drools...@googlegroups.com
On 20 Feb 2018, at 19:39, Rajeev Naik <rajeev...@gmail.com> wrote:

For kie-server-spring-boot-starter, how did you override 'DefaultWebSecurityConfig'?

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/dde0fc90-8b5b-4ebd-845e-a627463e28dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rajeev Naik

unread,
Feb 20, 2018, 2:29:50 PM2/20/18
to Drools Setup
I used below, but doesn't seem to be working. Am trying to do without keyCloak.
@Configuration("kieServerSecurity")
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter


Rajeev Naik

unread,
Feb 20, 2018, 2:55:09 PM2/20/18
to Drools Setup
It is not scanning any component in my package.

Rajeev Naik

unread,
Feb 20, 2018, 3:06:33 PM2/20/18
to Drools Setup
OMG! problem was with my IDE. Sorry to bother you.

younes...@perfectstay.com

unread,
May 25, 2018, 9:56:32 AM5/25/18
to Drools Setup
How to use kie-server-keycloak-spring-boot with kie work bench ? 
thanks a lot for jbpm7

Younes Krifa

unread,
May 25, 2018, 10:34:54 AM5/25/18
to drools...@googlegroups.com
what is the endpoint to access to KIE workbench ? 
thanks a lot 

To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

Maciej Swiderski

unread,
May 28, 2018, 2:36:13 AM5/28/18
to drools...@googlegroups.com
it all depends how it’s deployed:
- manual deployment to WildFly is then based on the war file name - usually http://localhost:8080/kie-wb
- installed via jbpm installer it will be http://localhost:8080/jbpm-console

Maciej

Younes Krifa

unread,
May 28, 2018, 3:54:09 AM5/28/18
to drools...@googlegroups.com
Hi Maciej,

Thanks for you support.
kie-drools-wb-7.7.0.Final-wildfly11.war is only compatible with wildfly 11 ?

thanks,


Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Maciej Swiderski

unread,
May 28, 2018, 3:56:34 AM5/28/18
to drools...@googlegroups.com

On 28 May 2018, at 09:54, Younes Krifa <younes...@perfectstay.com> wrote:

Hi Maciej,

Thanks for you support.
kie-drools-wb-7.7.0.Final-wildfly11.war is only compatible with wildfly 11 ?
it was tested with WildFly 11 though it might work on 11 and later versions but was not tested. There are less chances that it will work on WildFly 10 …

Maciej

Younes Krifa

unread,
May 28, 2018, 4:04:24 AM5/28/18
to drools...@googlegroups.com
I have this error when I start standalone.bat with kie-drools-wb-7.7.0 and wildfly 13.0.0.beta.1

When I try to access to http://localhost:8080/kie-web nothing happened, just the 
09:57:49,102 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'IOWatchServiceExecutorImpl' in deployment unit 'deployment "kie-drools-wb-7.7.0.Final-wildfly11.war"' are as follows:

        java:global/kie-drools-wb-7.7.0.Final-wildfly11/IOWatchServiceExecutorImpl!org.uberfire.backend.server.io.watch.IOWatchServiceExecutor
        java:app/kie-drools-wb-7.7.0.Final-wildfly11/IOWatchServiceExecutorImpl!org.uberfire.backend.server.io.watch.IOWatchServiceExecutor
        java:module/IOWatchServiceExecutorImpl!org.uberfire.backend.server.io.watch.IOWatchServiceExecutor
        ejb:kie-drools-wb-7.7.0.Final-wildfly11/IOWatchServiceExecutorImpl!org.uberfire.backend.server.io.watch.IOWatchServiceExecutor
        java:global/kie-drools-wb-7.7.0.Final-wildfly11/IOWatchServiceExecutorImpl
        java:app/kie-drools-wb-7.7.0.Final-wildfly11/IOWatchServiceExecutorImpl
        java:module/IOWatchServiceExecutorImpl


And I have this error when   I try to access to http://localhost:8080/kie-web after 1minute
The endpoint doesn"t respond.
I will try with  wildfly 11.


10:02:06,084 ERROR [stderr] (Periodic Recovery) Exception in thread "Periodic Recovery" java.lang.OutOfMemoryError: Java heap space
10:02:06,086 ERROR [stderr] (Periodic Recovery)         at java.io.DataInputStream.<init>(Unknown Source)
10:02:06,096 ERROR [stderr] (Periodic Recovery)         at com.arjuna.ats.arjuna.state.InputBuffer.setBuffer(InputBuffer.java:174)
10:02:06,084 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."kie-drools-wb-7.7.0.Final-wildfly11.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."kie-drools-wb-7.7.0.Final-wildfly11.war".WeldStartService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1728)
        at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.weld.exceptions.WeldException: Java heap space
        at org.jboss.weld.executor.AbstractExecutorServices.checkForExceptions(AbstractExecutorServices.java:81)
        at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:58)
        at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:66)
        at org.jboss.weld.bootstrap.ConcurrentValidator.validateBeans(ConcurrentValidator.java:62)
        at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:487)
        at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:490)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
        at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
        ... 6 more
Caused by: java.lang.OutOfMemoryError: Java heap space



Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Maciej Swiderski

unread,
May 28, 2018, 4:08:04 AM5/28/18
to drools...@googlegroups.com
increase -Xmx parameter in standalone.conf file

Maciej

Younes Krifa

unread,
May 28, 2018, 4:30:53 AM5/28/18
to drools...@googlegroups.com
Thanks a lot
there is no outofmemory error when I started the server wildfly I have got this 

nal-wildfly11.war" (runtime-name : "kie-drools-wb-7.7.0.Final-wildfly11.war")
10:23:46,285 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
10:23:46,288 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:23:46,289 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:23:46,291 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started in 69812ms - Started 914 of 1143 services (362 services are lazy, passive or on-demand)
10:24:09,472 INFO  [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (pool-12-thread-1) Getting reference to managed bean: WildflyDataSourceProvider
10:24:09,491 INFO  [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (pool-12-thread-1) Getting reference to managed bean: WildflyDriverProvider
10:24:10,787 INFO  [org.kie.workbench.common.screens.datasource.management.backend.DataSourceManagementBootstrap] (pool-12-thread-1) Initialize deployments task finished successfully.

And when I try access to  http://127.0.0.1:9990/management I have got this 

{
    "outcome" : "failed",
    "failure-description" : "WFLYDMHTTP0006: The security realm is not ready to process requests, see http://127.0.0.1:9990/error",
    "rolled-back" : "true"
}


I have only deployed kie-drools-wb-7.7.0.war on wildfly and not kie-server.war.
It's possible to use KieServer from SpringBoot to use  KIE-WORKBENCH or it's important to have both kie-server and kie-workbench wars on wildfly server ?

Thanks a lot ,


Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Maciej Swiderski

unread,
May 28, 2018, 4:36:30 AM5/28/18
to drools...@googlegroups.com

On 28 May 2018, at 10:30, Younes Krifa <younes...@perfectstay.com> wrote:

Thanks a lot
there is no outofmemory error when I started the server wildfly I have got this 

nal-wildfly11.war" (runtime-name : "kie-drools-wb-7.7.0.Final-wildfly11.war")
10:23:46,285 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
10:23:46,288 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:23:46,289 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:23:46,291 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started in 69812ms - Started 914 of 1143 services (362 services are lazy, passive or on-demand)
10:24:09,472 INFO  [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (pool-12-thread-1) Getting reference to managed bean: WildflyDataSourceProvider
10:24:09,491 INFO  [org.kie.workbench.common.screens.datasource.management.util.ServiceUtil] (pool-12-thread-1) Getting reference to managed bean: WildflyDriverProvider
10:24:10,787 INFO  [org.kie.workbench.common.screens.datasource.management.backend.DataSourceManagementBootstrap] (pool-12-thread-1) Initialize deployments task finished successfully.

And when I try access to  http://127.0.0.1:9990/management I have got this 

{
    "outcome" : "failed",
    "failure-description" : "WFLYDMHTTP0006: The security realm is not ready to process requests, see http://127.0.0.1:9990/error",
    "rolled-back" : "true"
}


I have only deployed kie-drools-wb-7.7.0.war on wildfly and not kie-server.war.
It's possible to use KieServer from SpringBoot to use  KIE-WORKBENCH or it's important to have both kie-server and kie-workbench wars on wildfly server ?
yes, you can have KIE Server from spring boot which will be managed by workbench see the starters and samples we have https://github.com/kiegroup/droolsjbpm-integration/tree/master/kie-spring-boot/kie-spring-boot-samples

Maciej

Younes Krifa

unread,
May 28, 2018, 9:02:30 AM5/28/18
to drools...@googlegroups.com

I have got this error on my spring boot project, what's wrong with my configuration ? 
Thanks, 

2018-05-28 14:56:35.492  WARN 2840 --- [ntrollerConnect] o.k.s.s.i.c.DefaultRestControllerImpl    : Exception encountered while syncing with controller at http://localhost:8080/kie-drools-wb-7.7.0.Final-wildfly11/rest/controller/server/SpringBoot error Error while sending PUT request to http://localhost:8080/kie-drools-wb-7.7.0.Final-wildfly11/rest/controller/server/SpringBoot response code 401
2018-05-28 14:56:45.503  WARN 2840 --- [ntrollerConnect] o.kie.server.common.KeyStoreHelperUtil   : Unable to load key store. Using password from configuration


Configuration

1. keycloak started at port 8180 : endpoint : http://localhost:8180/auth -> OK

2. kie-workbench started at port 8080
 with the following properties in standalone..conf

set KIE_SERVER_USER=-Dorg.kie.server.user=kieserver
set KIE_SERVER_PWD=-Dorg.kie.server.pwd=kieserver
set KIE_CONTROLLER_USER=-Dorg.kie.server.controller.user=kieserver
set KIE_CONTROLLER_PWD=-Dorg.kie.server.controller.pwd=kieserver
set KIE_SERVER=-Dorg.kie.server.location=%KIE_SERVER_URL%


3 spring-boot-keycloak-kie-server-sample project at port 8090 started with the following properties
endpoint : http://localhost:8090/rest/server-> OK
kieserver.restContextPath=/rest
kieserver.serverid=springboot
kieserver.location=http://${server.address}:${server.port}${kieserver.restContextPath}/server
kieserver.controllers=http://localhost:8080/kie-drools-wb-7.7.0.Final-wildfly11/rest/controller

kieserver.drools.enabled=true
kieserver.dmn.enabled=true
kieserver.jbpm.enabled=true
kieserver.jbpmui.enabled=true
kieserver.casemgmt.enabled=true
kieserver.optaplanner.enabled=true



2018-05-28 11:08 GMT+02:00 Younes Krifa <younes...@perfectstay.com>:
ok thanks !

so if I want to use spring boot project with keycloak authentication and kie server managed by workbench I must follow this step : (correct me if I am wrong)

1. download keycloak and start keycloak on port 8080 ( standalone.bat command )

2. start springboot server on port 8090 with the following properties
kieserver.restContextPath=/rest
kieserver.serverid=springboot
kieserver.location=http://${server.address}:${server.port}${kieserver.restContextPath}/server
kieserver.controllers=http://localhost:8090/kie-wb/rest/controller

keycloak.auth-server-url=http://localhost:8080/auth
3. set   kie-drools-wb-7.7.0.Final-wildfly11.war on wildfly11/deployments directory  and start wildfly 

question1: can I set  kie-drools-wb-7.7.0.Final-wildfly11.war on keycloak/deployments directory or there should be independant ? °
question2 : if I launch keycloak and kie-drools-wb on wiIdfly separatly I must change port name of one configuration ?


4. last step if I have want workbench managed by  KIE SERVER from spring boot project I must change this propertie to use the correct endpoint generated by kie-drools-wb-7.7.0.Final-wildfly11.war on wildfly11 ? 
or I must change configuration on wildfly11 server ?
kieserver.controllers=http://localhost:8090/kie-wb/rest/controller

Thanks a lot for you support 
I am not familiar with redhat eco-system and we want to use jbpmn 7 for production.




Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

Clinton Gomes

unread,
Mar 21, 2019, 7:05:51 PM3/21/19
to Drools Setup
Hi Younes,

Please set the following properties on the spring boot property via system properties. Should show in your output with -Dorg.kie.server.controller.user etc..

org.kie.server.controller.user system property
org.kie.server.controller.pwd system property
Maciej

Thanks a lot ,


Maciej

Maciej

thanks,


Maciej




--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.



--
Cordialement,
Younes Krifa

PerfectSay - 06 40 44 94 68
Reply all
Reply to author
Forward
0 new messages