business rules - setup drools Kie execution server credentials -



business rules - setup drools Kie execution server credentials -

i'm trying setup kie execution service (kie-server-services-6.2.0) beingness provisioned kie-drools-wb-webapp-6.2.0, when seek access next webapp url of execution server shows basic authentication, , don't know how proceed getting access execution server, , endpoint url, provisioning build-in rules examples of kie-wb , rest or wsdl working. kie-wb has username role "admin" , can build correctly rules. many thanks!!

trying reply question decided create howto origin did drool rules executed on remote server.

my task integrate kie workbench , execution server, business users able create drools rules , deploy them repo, while developers utilize these rules via calling rest services of standalone drools execution server.

you should follow these steps:

before using drools execution server allow me utilize such terminology:

kie drools workbench - ui creating , deploying model , rules file(s) maven repository kie execution server - standalone drools execution server. consumes rest calls of commands , returns execution results assumed have tomcat 7.0/8.0 , maven installed

deployment of drools workbench

most stable version of kie drools workbench deploy @ moment 6.1.0.final. utilize 1 deploying on tomcat 7.0 only!

you can download file called kie-drools-wb-distribution-wars jboss sonar repo, utilize version 6.1.0.final , tomcat7.war

make sure added next jars tomcat's lib directory: javax.security.jacc-api-1.4.jar, kie-tomcat-integration.jar, slf4j-api-1.7.2.jar

make sure have or added next roles/users tomcat-users.xml of tomcat:

class="snippet-code-html lang-html prettyprint-override"><role rolename="admin"/> <!-- tomcat admin role --> <role rolename="analyst"/> <!-- kie workbench analyst role. --> <role rolename="kie-server"/> <!-- kie drools execution server role. needed create rest rules execution request --> <user username="admin" password="admin" roles="manager-gui,manager-script" /> <!-- tomcat admin user --> <user username="user1" password="user1" roles="admin, kie-server" /> <!-- kie drools execution server user. needed create rest rules execution request -->

deploy tomcat7.war tomcat. i'm sure know how create open link: http://localhost:8080/kie-drools-wb-distribution-wars-6.1.0.final-tomcat7.0/. utilize admin credentials configured in previous step come in workbench. in our case user1/user1

in kie workbench create model, rules file. validate them , click deploy. create sure have jar file project beingness set maven repo!

as illustration can utilize rule , model created testing purposes: drool rule file:

import com.arty.drlwb.myexampletype; rule "one" when myexampletype(message == "hello worlddddd") system.out.println("hello world:)"); end

deployment of kie drools execution server

for moment of to-do writing stable version of kie drools execution server kie-server-services-6.2.0.beta3.war. can download here, jboss sonar repo:

deploy kie-server-services-6.2.0.beta3.war on tomcat make request on http://localhost:8080/kie-server-services-6.2.0.beta3/services/rest/server/. if asked provide user/password utilize 1 you've configured kie-server role in tomcat-users.xml. should see same response:

class="snippet-code-html lang-html prettyprint-override"> <response type="success" msg="kie server info"> <kie-server-info> <version>6.2.0.beta3</version> </kie-server-info> </response>

if see same result see, time deploy kie container: create set request @ http://localhost:8080/kie-server-services-6.2.0.beta3/services/rest/server/containers/{your_container_id} utilize xml format:

class="snippet-code-html lang-html prettyprint-override"><kie-container> <container-id>{your_container_id}</container-id> <status/> <release-id> <group-id>{your_project_group_id}</group-id> <artifact-id>{your_project_artifact_id}</artifact-id> <version>{your_project_version}</version> </release-id> <resolved-release-id/> </kie-container>

if success status response can check containers have been deployed. create on http://localhost:8080/kie-server-services-6.2.0.beta3/services/rest/server/containers. should see container been deployed:

class="snippet-code-html lang-html prettyprint-override"><response type="success" msg="list of created containers"> <kie-containers> <kie-container container-id="{your_container_id}" status="started"> <release-id> <artifact-id>{your_project_artifact_id}</artifact-id> <group-id>{your_project_group_id}</group-id> <version>{your_project_version}</version> </release-id> <resolved-release-id> <artifact-id>{your_project_artifact_id}</artifact-id> <group-id>{your_project_group_id}</group-id> <version>{your_project_version}</version> </resolved-release-id> </kie-container> </kie-containers> </response>

now launch rules you've created , set project jar: create post request @ http://localhost:8080/kie-server-services-6.2.0.beta3/services/rest/server/containers/{your_container_id}

use xml format. of cause utilize own model instead of myexampletype:

class="snippet-code-html lang-html prettyprint-override"><batch-execution lookup="defaultkiesession"> <insert out-identifier="message" return-object="true" entry-point="default"> <com.arty.drlwb.myexampletype> <message>hello worlddddd</message> </com.arty.drlwb.myexampletype> </insert> <fire-all-rules/> </batch-execution>

check tomcat console. if hello world:) message , success response type works now!

p.s due luck of documentation topic checked out server's sources github. take @ kie-server-client , kie-server-integ-tests code , tests. hope helps.

drools business-rules kie-wb

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -