Skip to content

Commit d06a2d9

Browse files
committed
Update for Drools 7.0.0.Final and Maven
1 parent a98ebc2 commit d06a2d9

File tree

6 files changed

+111
-13
lines changed

6 files changed

+111
-13
lines changed

Diff for: .classpath

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src/main/java"/>
4-
<classpathentry kind="src" path="src/main/resources"/>
5-
<classpathentry kind="src" path="src/test/java"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
725
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
826
<classpathentry kind="con" path="DROOLS/Drools"/>
9-
<classpathentry kind="output" path="bin"/>
27+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
28+
<attributes>
29+
<attribute name="maven.pomderived" value="true"/>
30+
</attributes>
31+
</classpathentry>
32+
<classpathentry kind="output" path="target/classes"/>
1033
</classpath>

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
.settings/
99
bin
1010
.DS_Store
11+
/target/

Diff for: .project

+6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
<arguments>
1616
</arguments>
1717
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.m2e.core.maven2Builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
1823
</buildSpec>
1924
<natures>
25+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
2026
<nature>org.eclipse.jdt.core.javanature</nature>
2127
</natures>
2228
</projectDescription>

Diff for: pom.xml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<groupId>org.integrallis</groupId>
9+
<artifactId>drools-loans</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
12+
<name>Drools :: Loans</name>
13+
<description>Drools Loan Calculator Example</description>
14+
15+
<properties>
16+
<runtime.version>7.0.0.Final</runtime.version>
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
</properties>
20+
21+
<repositories>
22+
<repository>
23+
<id>jboss-public-repository-group</id>
24+
<name>JBoss Public Repository Group</name>
25+
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
26+
<releases>
27+
<enabled>true</enabled>
28+
<updatePolicy>never</updatePolicy>
29+
</releases>
30+
<snapshots>
31+
<enabled>true</enabled>
32+
<updatePolicy>daily</updatePolicy>
33+
</snapshots>
34+
</repository>
35+
</repositories>
36+
37+
<dependencies>
38+
<dependency>
39+
<groupId>org.kie</groupId>
40+
<artifactId>kie-api</artifactId>
41+
<version>${runtime.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.drools</groupId>
45+
<artifactId>drools-core</artifactId>
46+
<version>${runtime.version}</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.drools</groupId>
50+
<artifactId>drools-decisiontables</artifactId>
51+
<version>${runtime.version}</version>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.jbpm</groupId>
56+
<artifactId>jbpm-test</artifactId>
57+
<version>${runtime.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>junit</groupId>
61+
<artifactId>junit</artifactId>
62+
<version>4.12</version>
63+
<scope>test</scope>
64+
</dependency>
65+
</dependencies>
66+
</project>

Diff for: src/main/resources/process/acme-loans-bpm.dslr

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rule "ACME-Fico"
1414
then
1515
reject the application because "a FICO score of at least 680 is required"
1616
end
17-
17+
/*
1818
rule "ACME-Principal"
1919
ruleflow-group "qualification"
2020
when
@@ -173,6 +173,7 @@ rule "ACME-RecommendACosigner"
173173
then
174174
recommend "that you get a cosigner"
175175
end
176+
*/
176177

177178
function int yearsOfAge(Date dob) {
178179
Calendar calendar = Calendar.getInstance();

Diff for: src/main/resources/rules/dslr/acme-loans.dslr

+8-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rule "ACME-Principal"
1818
when
1919
the lender is "ACME Mortgage"
2020
and there is an application
21-
- with a Principal that is less than 50000
21+
//- with a Principal that is less than 50000
2222
then
2323
reject the application because "a Principal of at least $50,000 is required"
2424
end
@@ -27,7 +27,7 @@ rule "ACME-NumberOfUnits"
2727
when
2828
the lender is "ACME Mortgage"
2929
and there is an application
30-
- with a Number of Units greater than 4
30+
//- with a Number of Units greater than 4
3131
then
3232
reject the application because "the number of units must not be greater than 4"
3333
end
@@ -36,17 +36,18 @@ rule "ACME-OneUnitPrincipal"
3636
when
3737
the lender is "ACME Mortgage"
3838
and there is an application
39-
- with a Number of Units equal to 1
40-
- with a Principal that is equal or greater than 203150
39+
//- with a Number of Units equal to 1
40+
//- with a Principal that is equal or greater than 203150
4141
then
4242
reject the application because "the principal for a 1 unit property must be no more than $203,150"
4343
end
44-
44+
/*
4545
rule "ACME-PrincipalMultipleOf50"
4646
when
4747
the lender is "ACME Mortgage"
48-
and there is an application
49-
- with a Principal that is not a multiple of 50
48+
//and there is an application
49+
//- with a Principal that is not a multiple of 50
5050
then
5151
reject the application because "a principal that is a multiple of $50 is required"
5252
end
53+
*/

0 commit comments

Comments
 (0)