This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample; | |
import java.util.List; | |
import java.util.UUID; | |
import org.drools.KnowledgeBase; | |
import org.drools.SystemEventListenerFactory; | |
import org.drools.builder.KnowledgeBuilder; | |
import org.drools.builder.KnowledgeBuilderFactory; | |
import org.drools.builder.ResourceType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testJSONTypeInfoTopLevelOnly() { | |
Marshaller marshaller = MarshallerFactory.getMarshaller( getCustomClasses(), MarshallingFormat.JSON, getClass().getClassLoader() ); | |
String rawContent = "{\"org.kie.server.api.marshalling.objects.PojoA\": " | |
+ "{\"name\": \"A\"," | |
+ " \"pojoBList\":" | |
+ " [{\"name\": \"B1\"," | |
+ " \"pojoCList\":" | |
+ " [" | |
+ " {\"name\": \"C1\"}, " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testJSONTypeInfoTopLevelOnly() { | |
Marshaller marshaller = MarshallerFactory.getMarshaller( getCustomClasses(), MarshallingFormat.JSON, getClass().getClassLoader() ); | |
String rawContent = "{\"org.kie.server.api.marshalling.objects.PojoA\": " | |
+ "{\"name\": \"A\"," | |
+ " \"pojoBList\":" | |
+ " [{\"name\": \"B1\"," | |
+ " \"pojoCList\":" | |
+ " [" | |
+ " {\"name\": \"C1\"}, " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void resetAllMemories(StatefulKnowledgeSession session) { | |
InternalKnowledgeBase kBase = (InternalKnowledgeBase) session.getKieBase(); | |
for (int i = 0; i < memories.length(); i++) { | |
Memory memory = memories.get(i); | |
if (memory != null) { | |
memory.reset(); | |
if (memory instanceof PathMemory) { | |
SegmentMemory[] smems = ((PathMemory) memory).getSegmentMemories(); | |
if (smems != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kie.kogito.queries; | |
unit LoanUnit; | |
import org.kie.kogito.queries.LoanApplication | |
rule SmallDeposit when | |
$l: /loanApplications[ applicant.age >= 20, deposit < 1000, amount <= 2000 ] | |
then | |
modify($l) { setApproved(true) }; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kie.kogito.queries; | |
unit LoanUnit; | |
import org.kie.kogito.queries.LoanApplication | |
rule SmallDeposit when | |
$l: /loanApplications[ applicant.age >= 20, deposit < 1000, amount <= 2000 ] | |
then | |
modify($l) { setApproved(true) }; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.kie.kogito.queries; | |
unit LoanUnit; | |
import org.kie.kogito.queries.LoanApplication | |
rule SmallDepositApprove when | |
$l: /loanApplications[ applicant.age >= 20, deposit < 1000, amount <= 2000 ] | |
then | |
modify($l) { setApproved(true) }; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kie-internal/src/main/java/org/kie/internal/builder/ChangeType.java b/kie-internal/src/main/java/org/kie/internal/builder/ChangeType.java | |
index 1af74ca..1cb589a 100644 | |
--- a/kie-internal/src/main/java/org/kie/internal/builder/ChangeType.java | |
+++ b/kie-internal/src/main/java/org/kie/internal/builder/ChangeType.java | |
@@ -16,7 +16,7 @@ | |
package org.kie.internal.builder; | |
public enum ChangeType { | |
- REMOVED, UPDATED, ADDED; | |
+ REMOVED, UPDATED, ADDED, MERGE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.kie.kogito</groupId> | |
<artifactId>kogito-examples</artifactId> | |
<version>0.7.0</version> | |
</parent> | |
<groupId>org.kie.kogito.examples</groupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<project | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | |
xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.kie.kogito</groupId> | |
<artifactId>kogito-examples</artifactId> |
OlderNewer