File tree 2 files changed +5
-7
lines changed
src/main/java/org/playground/drools/DroolsTutotial 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 3
3
<modelVersion >4.0.0</modelVersion >
4
4
5
5
<groupId >org.playground.drools</groupId >
6
- <artifactId >DroolsTutotial1 </artifactId >
6
+ <artifactId >DroolsTutotial </artifactId >
7
7
<version >0.0.1-SNAPSHOT</version >
8
8
<packaging >jar</packaging >
9
9
10
- <name >DroolsTutotial1 </name >
10
+ <name >DroolsTutotial </name >
11
11
<url >http://maven.apache.org</url >
12
12
13
13
<properties >
Original file line number Diff line number Diff line change 9
9
10
10
public class DroolsTest {
11
11
public static void main (String [] args ) {
12
- GregorianCalendar time = new GregorianCalendar ();
13
- int hour = time .get (Calendar .HOUR_OF_DAY );
12
+ GregorianCalendar time = new GregorianCalendar ();
13
+ int hour = time .get (Calendar .HOUR_OF_DAY );
14
14
DroolsTest droolsTest = new DroolsTest ();
15
- //droolsTest.execute(1);
16
15
droolsTest .execute (hour );
17
- //droolsTest.execute(17);
18
16
}
19
17
20
18
public void execute (int time ) {
21
19
KieServices ks = KieServices .Factory .get ();
22
20
KieContainer kContainer = ks .getKieClasspathContainer ();
23
21
KieSession kSession = kContainer .newKieSession ("ksession-rules" );
24
22
Person person = new Person ();
25
- person .setName ("My dear " );
23
+ person .setName ("Dear Sunil " );
26
24
person .setTime (time );
27
25
kSession .insert (person );
28
26
kSession .fireAllRules ();
You can’t perform that action at this time.
0 commit comments