[jboss-jira] [JBoss JIRA] (JBRULES-2929) Note about Undeeded Patterns
Toni Rikkola (Jira)
issues at jboss.org
Fri Jan 11 03:43:02 EST 2019
[ https://issues.jboss.org/browse/JBRULES-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Toni Rikkola closed JBRULES-2929.
---------------------------------
Resolution: Won't Do
> Note about Undeeded Patterns
> ----------------------------
>
> Key: JBRULES-2929
> URL: https://issues.jboss.org/browse/JBRULES-2929
> Project: JBRULES
> Issue Type: Feature Request
> Components: drools-verifier
> Reporter: Toni Rikkola
> Assignee: Toni Rikkola
> Priority: Minor
>
> Restrictions are not needed in this rule.
> rule "Pattern possibility that is always true"
> when
> a: Restriction()
> b: Restriction()
> $pp: SubPattern()
> Opposites(
> (
> left == a && right memberOf $pp.items
> ) && (
> left == b && right memberOf $pp.items
> )
> )
> then
> insert( new AlwaysTrue( $pp, a, b ) );
> end
> Because it could be simply written as:
> when
> $pp: SubPattern()
> Opposites( $left: left memberOf $pp.items &&
> $right: right memberOf $pp.items )
> then
> insert( new AlwaysTrue( $pp, $left, $right ) );
> end
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list