WIP drools 7.57.0.Final and Kotlin
This commit is contained in:
parent
e8c4413874
commit
58bea5166d
15 changed files with 121 additions and 107 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>drools-framework-base-tools-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
@ -123,4 +123,4 @@
|
|||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Copyright 2014 Pymma Software
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.chtijbug.drools.common.reflection;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: samuel
|
||||
* Date: 26/09/12
|
||||
* Time: 15:45
|
||||
*/
|
||||
public class ReflectionUtils {
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the method is a getter meaning :
|
||||
* <ul>
|
||||
* <li>method name start with 'get' </li>
|
||||
* <li>no parameters expected from the method</li>
|
||||
* <li>the return type of the method is not void</li>
|
||||
* </ul>
|
||||
* Otherwise, it will return <code>false</code>
|
||||
*
|
||||
* @param method Method
|
||||
* @return true if the method is a getter. false otherwise.
|
||||
*/
|
||||
public static boolean IsGetter(Method method) {
|
||||
if (!method.getName().startsWith("get")) return false;
|
||||
if (method.getParameterTypes().length != 0) return false;
|
||||
if (void.class.equals(method.getReturnType())) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.chtijbug.drools.common.reflection
|
||||
|
||||
import java.lang.reflect.Method
|
||||
|
||||
class ReflectionUtils {
|
||||
companion object {
|
||||
fun IsGetter(method: Method): Boolean {
|
||||
if (!method.getName().startsWith("get")) return false
|
||||
if (method.getParameterTypes().size != 0) return false
|
||||
if (Void.TYPE == method.getReturnType()) return false
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,10 +35,10 @@ public class ReflectionUtilsTestCase {
|
|||
|
||||
try {
|
||||
Method methodToEval = TestClass.class.getMethod("getProperty");
|
||||
assertTrue(ReflectionUtils.IsGetter(methodToEval));
|
||||
assertTrue(ReflectionUtils.Companion.IsGetter(methodToEval));
|
||||
|
||||
methodToEval = TestClass.class.getMethod("execute");
|
||||
assertFalse(ReflectionUtils.IsGetter(methodToEval));
|
||||
assertFalse(ReflectionUtils.Companion.IsGetter(methodToEval));
|
||||
|
||||
|
||||
} catch (NoSuchMethodException e) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<artifactId>drools-framework-examples</artifactId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -30,4 +30,4 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<artifactId>drools-framework-examples</artifactId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>drools-framework-swimmingpool-web-ui</artifactId>
|
||||
|
|
@ -341,4 +341,4 @@
|
|||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<artifactId>drools-framework-base-tools-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -21,4 +21,4 @@
|
|||
<!--module>drools-framework-loyalty-web</module-->
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>drools-framework-base-tools-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
|
||||
|
|
@ -48,34 +48,41 @@
|
|||
<groupId>org.codehaus.jettison</groupId>
|
||||
<artifactId>jettison</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-compiler</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<groupId>org.kie</groupId>
|
||||
<artifactId>kie-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie.kogito</groupId>
|
||||
<artifactId>jbpm-bpmn2</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-wiring-dynamic</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<artifactId>drools-compiler</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jbpm</groupId>
|
||||
<artifactId>jbpm-bpmn2</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie.server</groupId>
|
||||
<artifactId>kie-server-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
|
|
@ -89,7 +96,16 @@
|
|||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.kie.server</groupId>
|
||||
<artifactId>kie-server-api</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
|
|
@ -110,7 +126,11 @@
|
|||
<artifactId>logback-classic</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
|
|
@ -120,17 +140,31 @@
|
|||
<artifactId>drools-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-wiring-static</artifactId>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie.kogito</groupId>
|
||||
<groupId>org.jbpm</groupId>
|
||||
<artifactId>jbpm-flow</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie</groupId>
|
||||
<artifactId>kie-internal</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
|
|
@ -141,7 +175,10 @@
|
|||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-workbench-models-guided-dtable</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
|
|
@ -158,4 +195,4 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -22,11 +22,12 @@ import org.chtijbug.drools.entity.history.fact.FactHistoryEvent;
|
|||
import org.chtijbug.drools.entity.history.fact.InsertedFactHistoryEvent;
|
||||
import org.chtijbug.drools.entity.history.fact.UpdatedFactHistoryEvent;
|
||||
import org.chtijbug.drools.runtime.DroolsFactObjectFactory;
|
||||
import org.drools.base.definitions.rule.impl.RuleImpl;
|
||||
import org.drools.core.common.PropagationContext;
|
||||
|
||||
import org.drools.core.definitions.rule.impl.RuleImpl;
|
||||
import org.drools.core.event.rule.impl.ObjectDeletedEventImpl;
|
||||
import org.drools.core.event.rule.impl.ObjectInsertedEventImpl;
|
||||
import org.drools.core.event.rule.impl.ObjectUpdatedEventImpl;
|
||||
import org.drools.core.spi.PropagationContext;
|
||||
import org.kie.api.event.rule.ObjectDeletedEvent;
|
||||
import org.kie.api.event.rule.ObjectInsertedEvent;
|
||||
import org.kie.api.event.rule.ObjectUpdatedEvent;
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ import org.chtijbug.drools.runtime.DroolsChtijbugException;
|
|||
import org.chtijbug.drools.runtime.DroolsFactObjectFactory;
|
||||
import org.chtijbug.drools.runtime.RuleBaseSession;
|
||||
import org.chtijbug.drools.runtime.listener.HistoryListener;
|
||||
|
||||
import org.drools.base.definitions.rule.impl.RuleImpl;
|
||||
import org.drools.core.definitions.rule.impl.RuleImpl;
|
||||
import org.jbpm.workflow.core.node.RuleSetNode;
|
||||
import org.jbpm.workflow.instance.node.*;
|
||||
import org.kie.api.definition.rule.Rule;
|
||||
import org.kie.api.event.rule.DefaultAgendaEventListener;
|
||||
import org.kie.api.runtime.KieSession;
|
||||
import org.kie.api.runtime.ObjectFilter;
|
||||
import org.kie.api.runtime.process.NodeInstance;
|
||||
|
|
@ -150,9 +150,7 @@ public class RuleBaseStatefulSession implements RuleBaseSession {
|
|||
nodeType = DroolsNodeType.RuleNode;
|
||||
RuleSetNode ruleSetNode = this.getRuleSetNode(nodeInstance);
|
||||
if (ruleSetNode != null) {
|
||||
if (ruleSetNode.getRuleType().isRuleFlowGroup()) {
|
||||
ruleFlowGroupName = ruleSetNode.getRuleType().getName();
|
||||
}
|
||||
ruleFlowGroupName = ruleSetNode.getRuleFlowGroup();
|
||||
}
|
||||
} else if (nodeInstance instanceof SplitInstance) {
|
||||
nodeType = DroolsNodeType.SplitNode;
|
||||
|
|
@ -320,7 +318,7 @@ public class RuleBaseStatefulSession implements RuleBaseSession {
|
|||
//____ Then foreach getters insert item by reflection
|
||||
for (Method method : newObject.getClass().getMethods()) {
|
||||
//____ only manage getters
|
||||
if (!ReflectionUtils.IsGetter(method)) {
|
||||
if (!ReflectionUtils.Companion.IsGetter(method)) {
|
||||
continue;
|
||||
}
|
||||
Object getterValue;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@ import org.chtijbug.drools.entity.history.rule.AfterRuleFlowActivatedHistoryEven
|
|||
import org.chtijbug.drools.entity.history.rule.AfterRuleFlowDeactivatedHistoryEvent;
|
||||
import org.chtijbug.drools.entity.history.rule.BeforeRuleFiredHistoryEvent;
|
||||
import org.chtijbug.drools.entity.history.session.SessionFireAllRulesMaxNumberReachedEvent;
|
||||
import org.drools.base.reteoo.InitialFactImpl;
|
||||
|
||||
import org.drools.core.common.DefaultFactHandle;
|
||||
import org.drools.core.common.InternalFactHandle;
|
||||
import org.drools.core.event.rule.impl.BeforeActivationFiredEventImpl;
|
||||
import org.drools.core.reteoo.InitialFactImpl;
|
||||
import org.kie.api.event.rule.*;
|
||||
import org.kie.api.runtime.KieRuntime;
|
||||
import org.kie.api.runtime.rule.FactHandle;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<artifactId>drools-framework-base-tools-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>drools-framework-runtime-entity</artifactId>
|
||||
|
|
@ -97,7 +97,11 @@
|
|||
<dependency>
|
||||
<groupId>io.github.kostaskougios</groupId>
|
||||
<artifactId>cloning</artifactId>
|
||||
<version>1.12.0</version>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
|
|
@ -109,6 +113,10 @@
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie</groupId>
|
||||
<artifactId>kie-internal</artifactId>
|
||||
|
|
@ -153,4 +161,4 @@
|
|||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -149,4 +149,4 @@ class DroolsFactObject {
|
|||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>pymma-jbpm-platform-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>7.57.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
|
|
@ -21,22 +21,18 @@
|
|||
</modules>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.kie.kogito</groupId>
|
||||
<artifactId>kogito-bom</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie.kogito</groupId>
|
||||
<artifactId>kogito-bom</artifactId>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-bom</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.drools</groupId>
|
||||
<artifactId>drools-bom</artifactId>
|
||||
<groupId>org.jbpm</groupId>
|
||||
<artifactId>jbpm-bom</artifactId>
|
||||
<version>${jbpm.version}</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
|
|
@ -97,6 +93,11 @@
|
|||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-jaxb-annotations</artifactId>
|
||||
|
|
@ -212,4 +213,4 @@
|
|||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue