[JBoss JIRA] (DROOLS-1549) Extend date and time functions
by Edson Tirelli (JIRA)
Edson Tirelli created DROOLS-1549:
-------------------------------------
Summary: Extend date and time functions
Key: DROOLS-1549
URL: https://issues.jboss.org/browse/DROOLS-1549
Project: Drools
Issue Type: Bug
Components: dmn engine
Affects Versions: 7.0.0.CR3
Reporter: Edson Tirelli
Assignee: Edson Tirelli
Fix For: 7.1.0.Final
Extend date and time functions to support the following cases:
* {{date( <dateTimeString> )}} should return a date ignoring the time component of the string
* {{time( <dateTimeString> )}} should return a time ignoring the date component of the string
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1543) DMN ItemDefinition dependencies ordering
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1543?page=com.atlassian.jira.plugi... ]
Edson Tirelli updated DROOLS-1543:
----------------------------------
Component/s: dmn engine
> DMN ItemDefinition dependencies ordering
> ----------------------------------------
>
> Key: DROOLS-1543
> URL: https://issues.jboss.org/browse/DROOLS-1543
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.CR3
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Fix For: 7.1.0.Final
>
>
> Using Java-api Comparator is not easily suitable to address the problem of ordering the ItemDefinition by their dependencies.
> If the Comparator is used to check purely for dependencies, returning 0 for indipendent elements, assume the following:
> {code:java}
> X
> Y -> Z
> {code}
> where X is independent from Y, Z; and Y depends on Z.
> {code:java}
> compare(X, Y) == 0 // by definition above
> compare(X, Z) == 0 // still, by definition above, X is independent also from Z
> compare(Y, Z) == 1 // because Y depends on Z, Y is bigger than Z.
> {code}
> The above breaks the API contract in the Java-API Comparator where stating:
> {quote}Finally, the implementor must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.{quote}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1543) DMN ItemDefinition dependencies ordering
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1543?page=com.atlassian.jira.plugi... ]
Edson Tirelli updated DROOLS-1543:
----------------------------------
Fix Version/s: 7.1.0.Final
> DMN ItemDefinition dependencies ordering
> ----------------------------------------
>
> Key: DROOLS-1543
> URL: https://issues.jboss.org/browse/DROOLS-1543
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.CR3
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Fix For: 7.1.0.Final
>
>
> Using Java-api Comparator is not easily suitable to address the problem of ordering the ItemDefinition by their dependencies.
> If the Comparator is used to check purely for dependencies, returning 0 for indipendent elements, assume the following:
> {code:java}
> X
> Y -> Z
> {code}
> where X is independent from Y, Z; and Y depends on Z.
> {code:java}
> compare(X, Y) == 0 // by definition above
> compare(X, Z) == 0 // still, by definition above, X is independent also from Z
> compare(Y, Z) == 1 // because Y depends on Z, Y is bigger than Z.
> {code}
> The above breaks the API contract in the Java-API Comparator where stating:
> {quote}Finally, the implementor must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.{quote}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1543) DMN ItemDefinition dependencies ordering
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1543?page=com.atlassian.jira.plugi... ]
Edson Tirelli updated DROOLS-1543:
----------------------------------
Affects Version/s: 7.0.0.CR3
> DMN ItemDefinition dependencies ordering
> ----------------------------------------
>
> Key: DROOLS-1543
> URL: https://issues.jboss.org/browse/DROOLS-1543
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.CR3
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Fix For: 7.1.0.Final
>
>
> Using Java-api Comparator is not easily suitable to address the problem of ordering the ItemDefinition by their dependencies.
> If the Comparator is used to check purely for dependencies, returning 0 for indipendent elements, assume the following:
> {code:java}
> X
> Y -> Z
> {code}
> where X is independent from Y, Z; and Y depends on Z.
> {code:java}
> compare(X, Y) == 0 // by definition above
> compare(X, Z) == 0 // still, by definition above, X is independent also from Z
> compare(Y, Z) == 1 // because Y depends on Z, Y is bigger than Z.
> {code}
> The above breaks the API contract in the Java-API Comparator where stating:
> {quote}Finally, the implementor must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.{quote}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1548) Fix bug with filter selection operator
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1548?page=com.atlassian.jira.plugi... ]
Edson Tirelli updated DROOLS-1548:
----------------------------------
Attachment: Ex_6_1.dmn
> Fix bug with filter selection operator
> --------------------------------------
>
> Key: DROOLS-1548
> URL: https://issues.jboss.org/browse/DROOLS-1548
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.CR3
> Reporter: Edson Tirelli
> Assignee: Edson Tirelli
> Fix For: 7.1.0.Final
>
> Attachments: Ex_6_1.dmn
>
>
> The attached model is not completely working. This is likely to the fact that the filter selection operator is not working. E.g.:
> {code}
> max( NBA Pacific.wins )
> {code}
> Should return the team with the most wins in the {{NBA Pacific}} list of teams.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1548) Fix bug with filter selection operator
by Edson Tirelli (JIRA)
Edson Tirelli created DROOLS-1548:
-------------------------------------
Summary: Fix bug with filter selection operator
Key: DROOLS-1548
URL: https://issues.jboss.org/browse/DROOLS-1548
Project: Drools
Issue Type: Bug
Components: dmn engine
Affects Versions: 7.0.0.CR3
Reporter: Edson Tirelli
Assignee: Edson Tirelli
Fix For: 7.1.0.Final
Attachments: Ex_6_1.dmn
The attached model is not completely working. This is likely to the fact that the filter selection operator is not working. E.g.:
{code}
max( NBA Pacific.wins )
{code}
Should return the team with the most wins in the {{NBA Pacific}} list of teams.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (DROOLS-1547) Add tests to confirm that singleton lists can be treated as the element itself in filter results
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1547?page=com.atlassian.jira.plugi... ]
Edson Tirelli updated DROOLS-1547:
----------------------------------
Description:
The specification has a provision that singleton lists should be treated as the element itself in some cases, like filter results. I.e., in some cases, {{[a] = a}}.
This is not completely consistent, but we need to handle it for some cases, like filter results. In other words, the following assignment should work fine, assuming {{a flight}} is a flight variable and {{flight list}} is a list of flights, and the filter returns a single result.
{code}
{
a flight : flight list[ number = "AC 531" ]
}
{code}
We need to add tests to make sure it is working like that and fix it in case it is not.
was:
The specification has a provision that singleton lists should be treated as the element itself in some cases, like filter results. I.e., in some cases, {{[a] = a}}.
This is not completely consistent, but we need to handle it for some cases, like filter results. In other words, the following assignment should work fine, assuming {{a flight}} is a flight variable and {{flight list}} is a list of flights, and the filter returns a single result.
{
a flight : flight list[ number = "AC 531" ]
}
We need to add tests to make sure it is working like that and fix it in case it is not.
> Add tests to confirm that singleton lists can be treated as the element itself in filter results
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1547
> URL: https://issues.jboss.org/browse/DROOLS-1547
> Project: Drools
> Issue Type: Bug
> Components: dmn engine
> Affects Versions: 7.0.0.CR3
> Reporter: Edson Tirelli
> Assignee: Edson Tirelli
> Fix For: 7.1.0.Final
>
>
> The specification has a provision that singleton lists should be treated as the element itself in some cases, like filter results. I.e., in some cases, {{[a] = a}}.
> This is not completely consistent, but we need to handle it for some cases, like filter results. In other words, the following assignment should work fine, assuming {{a flight}} is a flight variable and {{flight list}} is a list of flights, and the filter returns a single result.
> {code}
> {
> a flight : flight list[ number = "AC 531" ]
> }
> {code}
> We need to add tests to make sure it is working like that and fix it in case it is not.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months