[JBoss JIRA] (DROOLS-4305) getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
by Benoit Proulx (Jira)
[ https://issues.jboss.org/browse/DROOLS-4305?page=com.atlassian.jira.plugi... ]
Benoit Proulx updated DROOLS-4305:
----------------------------------
Steps to Reproduce:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
@Override public String toString() {return testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
System.out.println("Old value=" + even event.getOldObject());
System.out.println("New value=" + even event.getObject());
}
}
{code}
*Execute*
{code:java}
org.kie.api.runtime.KieSession kSession = [Initialize KieSession]
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
*Expected Output*
{noformat}
Old and New are the same? false
Old value=input
New value=output
{noformat}
*Actual output*
{noformat}
Old and New are the same? true
Old value=output
New value=output
{noformat}
was:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
}
}
{code}
*Execute*
{code:java}
org.kie.api.runtime.KieSession kSession = [Initialize KieSession]
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
The console should show "Old and New are the same? true" indicating that both getOldObject() and getObject() are of the same reference.
> getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4305
> URL: https://issues.jboss.org/browse/DROOLS-4305
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.16.0.Final
> Environment: Windows 10 Version 1803 (OS Build 17134.829)
> Eclipse 2018-12 (4.10.0)
> jdk1.8.0_171
> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
> spring-boot-starter-parent 2.1.2.RELEASE
> Reporter: Benoit Proulx
> Assignee: Mario Fusco
> Priority: Optional
>
> We have built a logger file for our rules that implements org.kie.api.event.rule.RuleRuntimeEventListener.
> Whenever the objectUpdated(ObjectUpdatedEvent) method is called, the ObjectUpdatedEvent contains the values of both the old Object and new object (or getOldObject() and getObject() )
> However, it seems that getOldObject() is always returning the same value as getObject().
> Having both values would be very helpful in debugging rules.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4305) getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
by Benoit Proulx (Jira)
[ https://issues.jboss.org/browse/DROOLS-4305?page=com.atlassian.jira.plugi... ]
Benoit Proulx updated DROOLS-4305:
----------------------------------
Steps to Reproduce:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
}
}
{code}
*Execute*
{code:java}
org.kie.api.runtime.KieSession kSession = _[Initialize KieSession]_
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
The console should show "Old and New are the same? true" indicating that both getOldObject() and getObject() are of the same reference.
was:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
}
}
{code}
Execute
{code:java}
org.kie.api.runtime.KieSession kSession = [Initialize KieSession]
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
The console should show "Old and New are the same? true" indicating that both getOldObject() and getObject() are of the same reference.
> getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4305
> URL: https://issues.jboss.org/browse/DROOLS-4305
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.16.0.Final
> Environment: Windows 10 Version 1803 (OS Build 17134.829)
> Eclipse 2018-12 (4.10.0)
> jdk1.8.0_171
> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
> spring-boot-starter-parent 2.1.2.RELEASE
> Reporter: Benoit Proulx
> Assignee: Mario Fusco
> Priority: Optional
>
> We have built a logger file for our rules that implements org.kie.api.event.rule.RuleRuntimeEventListener.
> Whenever the objectUpdated(ObjectUpdatedEvent) method is called, the ObjectUpdatedEvent contains the values of both the old Object and new object (or getOldObject() and getObject() )
> However, it seems that getOldObject() is always returning the same value as getObject().
> Having both values would be very helpful in debugging rules.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4305) getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
by Benoit Proulx (Jira)
[ https://issues.jboss.org/browse/DROOLS-4305?page=com.atlassian.jira.plugi... ]
Benoit Proulx updated DROOLS-4305:
----------------------------------
Steps to Reproduce:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
}
}
{code}
*Execute*
{code:java}
org.kie.api.runtime.KieSession kSession = [Initialize KieSession]
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
The console should show "Old and New are the same? true" indicating that both getOldObject() and getObject() are of the same reference.
was:
*Create a fact file*
{code:java}
public class TestFact {
private String testString;
public String getTestString() {return testString;}
public void setTestString(String testString) {this.testString = testString;}
}
{code}
*Create a test.drl file*
{code}
when
$test : TestFact(testString == "input")
then
$test.setTestString("output");
update($test);
{code}
*Create a Listener*
{code:java}
public class TestRuntimeListener implements org.kie.api.event.rule.RuleRuntimeEventListener {
@Override public void objectDeleted(final ObjectDeletedEvent event) {}
@Override public void objectInserted(final ObjectInsertedEvent event) {}
@Override public void objectUpdated(final ObjectUpdatedEvent event) {
System.out.println("Old and New are the same? " + event.getOldObject() == event.getObject());
}
}
{code}
*Execute*
{code:java}
org.kie.api.runtime.KieSession kSession = _[Initialize KieSession]_
kSession.addEventListener(new TestRuntimeListener());
TestFact fact = new TestFact;
fact.setString("input");
kSession.insert(fact);
kSession.fireAllRules();
{code}
The console should show "Old and New are the same? true" indicating that both getOldObject() and getObject() are of the same reference.
> getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4305
> URL: https://issues.jboss.org/browse/DROOLS-4305
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.16.0.Final
> Environment: Windows 10 Version 1803 (OS Build 17134.829)
> Eclipse 2018-12 (4.10.0)
> jdk1.8.0_171
> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
> spring-boot-starter-parent 2.1.2.RELEASE
> Reporter: Benoit Proulx
> Assignee: Mario Fusco
> Priority: Optional
>
> We have built a logger file for our rules that implements org.kie.api.event.rule.RuleRuntimeEventListener.
> Whenever the objectUpdated(ObjectUpdatedEvent) method is called, the ObjectUpdatedEvent contains the values of both the old Object and new object (or getOldObject() and getObject() )
> However, it seems that getOldObject() is always returning the same value as getObject().
> Having both values would be very helpful in debugging rules.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4305) getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
by Benoit Proulx (Jira)
Benoit Proulx created DROOLS-4305:
-------------------------------------
Summary: getOldObject() of ObjectUpdatedEvent is returning same value as getObject()
Key: DROOLS-4305
URL: https://issues.jboss.org/browse/DROOLS-4305
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.16.0.Final
Environment: Windows 10 Version 1803 (OS Build 17134.829)
Eclipse 2018-12 (4.10.0)
jdk1.8.0_171
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
spring-boot-starter-parent 2.1.2.RELEASE
Reporter: Benoit Proulx
Assignee: Mario Fusco
We have built a logger file for our rules that implements org.kie.api.event.rule.RuleRuntimeEventListener.
Whenever the objectUpdated(ObjectUpdatedEvent) method is called, the ObjectUpdatedEvent contains the values of both the old Object and new object (or getOldObject() and getObject() )
However, it seems that getOldObject() is always returning the same value as getObject().
Having both values would be very helpful in debugging rules.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4304) UX design: Keyboard shortcuts for Find feature in GDST/DMN 7.5
by Elizabeth Clayton (Jira)
[ https://issues.jboss.org/browse/DROOLS-4304?page=com.atlassian.jira.plugi... ]
Elizabeth Clayton updated DROOLS-4304:
--------------------------------------
Description:
This is a community epic for the [BAPL-1279|https://issues.jboss.org/browse/BAPL-1279]. The epic was created according to the [definition of ready|https://docs.google.com/document/d/1WKv_Cx7jCts7gCQCGt_323ANH_H7dv4...] that advices what needs to be agreed before each feature implementation.
h1. Requirements
See referenced document: https://docs.google.com/document/d/1VX_KhMhPgs2ZoOv7_jpfbl2o2-Y528UEImGk9...
h1. Documentation
Keyboard recommendations to be documented at: https://docs.google.com/presentation/d/1itceVe225mMtR55pqB-llpLNdU6kq4TBi...
h1. Acceptance test
- Enter to large amount of data in search box
- Search is possible when you type only the part of indicated word. For example, if you type text like 'test', the words 'testing', 'tester' should be displayed.
- Searching for non-existing result
- Result appearing once
- Result appearing multiple times
- Set of inputs:
*- A-Z
*- a-z
*- 0-9
*- Symbols: } { ] [ ) ( ~ ! @ # $ % ^ & ` | \ : " ; ' < > ? , . ⁄ - +
*- Blank spaces
was:
This is a community epic for the [BAPL-1279|https://issues.jboss.org/browse/BAPL-1279]. The epic was created according to the [definition of ready|https://docs.google.com/document/d/1WKv_Cx7jCts7gCQCGt_323ANH_H7dv4...] that advices what needs to be agreed before each feature implementation.
h1. Requirements
See referenced document: https://docs.google.com/document/d/1VX_KhMhPgs2ZoOv7_jpfbl2o2-Y528UEImGk9...
h1. Documentation
- Replace picture of GDT and DMN editor where they become obsolete
h1. Acceptance test
- Enter to large amount of data in search box
- Search is possible when you type only the part of indicated word. For example, if you type text like 'test', the words 'testing', 'tester' should be displayed.
- Searching for non-existing result
- Result appearing once
- Result appearing multiple times
- Set of inputs:
*- A-Z
*- a-z
*- 0-9
*- Symbols: } { ] [ ) ( ~ ! @ # $ % ^ & ` | \ : " ; ' < > ? , . ⁄ - +
*- Blank spaces
> UX design: Keyboard shortcuts for Find feature in GDST/DMN 7.5
> --------------------------------------------------------------
>
> Key: DROOLS-4304
> URL: https://issues.jboss.org/browse/DROOLS-4304
> Project: Drools
> Issue Type: Story
> Components: DMN Editor
> Affects Versions: 7.23.0.Final
> Reporter: Elizabeth Clayton
> Assignee: Sarah Rambacher
> Priority: Major
> Labels: UX, UXTeam, drools-tools
>
> This is a community epic for the [BAPL-1279|https://issues.jboss.org/browse/BAPL-1279]. The epic was created according to the [definition of ready|https://docs.google.com/document/d/1WKv_Cx7jCts7gCQCGt_323ANH_H7dv4...] that advices what needs to be agreed before each feature implementation.
> h1. Requirements
> See referenced document: https://docs.google.com/document/d/1VX_KhMhPgs2ZoOv7_jpfbl2o2-Y528UEImGk9...
> h1. Documentation
> Keyboard recommendations to be documented at: https://docs.google.com/presentation/d/1itceVe225mMtR55pqB-llpLNdU6kq4TBi...
> h1. Acceptance test
> - Enter to large amount of data in search box
> - Search is possible when you type only the part of indicated word. For example, if you type text like 'test', the words 'testing', 'tester' should be displayed.
> - Searching for non-existing result
> - Result appearing once
> - Result appearing multiple times
> - Set of inputs:
> *- A-Z
> *- a-z
> *- 0-9
> *- Symbols: } { ] [ ) ( ~ ! @ # $ % ^ & ` | \ : " ; ' < > ? , . ⁄ - +
> *- Blank spaces
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months