Skip to content

Instantly share code, notes, and snippets.

View danielezonca's full-sized avatar

Daniele Zonca danielezonca

  • Red Hat
  • Milan, Italy
View GitHub Profile
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ kogito-drools ---
[INFO] org.kie.kogito:kogito-drools:jar:1.0.0-SNAPSHOT
[INFO] +- org.kie.kogito:drools-core:jar:1.0.0-SNAPSHOT:compile
[INFO] |  +- org.drools:drools-core:jar:7.46.0-SNAPSHOT:compile
[INFO] |  |  +- org.kie.soup:kie-soup-xstream:jar:7.46.0-SNAPSHOT:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- com.thoughtworks.xstream:xstream:jar:1.4.11.1:compile
[INFO] |  |  +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] |  |  \- xpp3:xpp3_min:jar:1.1.4c:compile

Use case: Card transaction dispute

End user can dispute a card transaction and the system has to decide if the dispute can be automatically processed (aka accept the dispute and refund the user) or if it requires to have manual verification

Prerequisitive:

NOTE: be sure PMML file is a valid XML

Steps:

[dzonca@dzonca kie-server-integ-tests-scenario-simulation]$ mvn clean install -Pwildfly -Dit.test=ScenarioSimulationIntegrationTest
[INFO] Scanning for projects...
[INFO]
[INFO] -----< org.kie.server:kie-server-integ-tests-scenario-simulation >------
[INFO] Building KIE :: Execution Server :: Tests :: Scenario Simulation Integration Tests 7.45.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ kie-server-integ-tests-scenario-simulation ---
[INFO] Deleting /home/dzonca/IdeaProjects/KieGroup/droolsjbpm-integration/kie-server-parent/kie-server-tests/kie-server-integ-tests-scenario-simulation/target
[INFO]
<?xml version="1.0" encoding="UTF-8"?>
<PMML xmlns="http://www.dmg.org/PMML-4_4" version="4.4">
<Header copyright="Copyright (c) 2018 Software AG" description="Default Description">
<Application name="Nyoka" version="4.3.0"/>
<Timestamp>2020-10-07 16:44:09.216900</Timestamp>
</Header>
<DataDictionary numberOfFields="3">
<DataField name="amount" optype="continuous" dataType="double"/>
<DataField name="holder_index" optype="continuous" dataType="double"/>
<DataField name="dispute_risk" optype="categorical" dataType="integer">
{
"serviceUrl": "http://localhost:8080/Traffic%20Violation/dmnresult",
"modelName": "Traffic Violation",
"namespace": "https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF",
"inputs": {
"Violation": {
"Code": null,
"Date": null,
"Type": null,
"Speed Limit": null,
package org.kie.kogito.explainability;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.client.WebClientOptions;
import io.vertx.mutiny.core.Vertx;
import io.vertx.mutiny.core.buffer.Buffer;
import io.vertx.mutiny.ext.web.client.HttpRequest;
import io.vertx.mutiny.ext.web.client.WebClient;
import org.eclipse.microprofile.context.ThreadContext;
import org.kie.kogito.explainability.model.*;
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) @ process-infinispan-persistence-quarkus ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.deals.DealsRestIT
2020-07-21 14:08:35,166 INFO [org.tes.doc.DockerClientProviderStrategy] (main) Loaded org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy from ~/.testcontainers.properties, will try it first
2020-07-21 14:08:35,783 INFO [org.tes.doc.EnvironmentAndSystemPropertyClientProviderStrategy] (main) Found docker client settings from environment
2020-07-21 14:08:35,784 INFO [org.tes.doc.DockerClientProviderStrategy] (main) Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///var/run/docker.sock
2020-07-21 14:08:36,094 INFO [org.tes.DockerClientFactory] (main) Docker host IP address is localhost
./kie-wb-distributions/business-central-parent/business-central-webapp/src/main/webapp/WEB-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mode="all">
./kie-wb-distributions/business-central-parent/business-monitoring-webapp/src/main/webapp/WEB-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mode="all">
./jbpm-wb/jbpm-wb-case-mgmt/jbpm-wb-case-mgmt-backend/src/main/resources/META-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mode="all">
./jbpm-wb/jbpm-wb-case-mgmt/jbpm-wb-case-mgmt-client/src/main/resources/META-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mode="none">
./jbpm-wb/jbpm-wb-case-mgmt/jbpm-wb-case-mgmt-showcase/src/main/webapp/WEB-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mode="all">
./jbpm-wb/jbpm-wb-common/jbpm-wb-common-client/src/main/resources/META-INF/beans.xml:<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" bean-discovery-mod
[INFO] Running io.quarkus.it.kogito.drools.newunit.NewUnitTest
May 21, 2020 12:04:58 PM io.quarkus.deployment.dev.DevModeMain start
ERROR: Quarkus dev mode failed to start in curation phase
io.quarkus.bootstrap.BootstrapException: Failed to create the application model for org.kie.kogito:kogito-quarkus-integration-test-hot-reload::jar:8.0.0-SNAPSHOT
at io.quarkus.bootstrap.BootstrapAppModelFactory.resolveAppModel(BootstrapAppModelFactory.java:301)
at io.quarkus.bootstrap.app.QuarkusBootstrap.bootstrap(QuarkusBootstrap.java:140)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:115)
at io.quarkus.test.QuarkusDevModeTest.beforeEach(QuarkusDevModeTest.java:154)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$1(TestMethodTestDescriptor.java:154)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$5(TestMethodTestDescriptor.java:190)

TrustyAI POC README

Requirements

  • git
  • mvn
  • Java 11
  • docker
  • docker-compose
  • MongoDB for persistence (see installation guide if needed)
  • npm