[JBoss JIRA] (WFLY-3940) Parsers should print expected elements in case of error
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3940?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar commented on WFLY-3940:
-----------------------------------
Why don't go with PersistentResourceDefinition & PersistentResourceXMLDescription for defining your parser?
It was done just so we can minimize problems like this. See IO, Mail and undertow subsystems for examples on how to use it.
If you are doing parser by hand then only way to report problems is by adding code to do reporting to your parser.
> Parsers should print expected elements in case of error
> -------------------------------------------------------
>
> Key: WFLY-3940
> URL: https://issues.jboss.org/browse/WFLY-3940
> Project: WildFly
> Issue Type: Feature Request
> Components: Domain Management
> Reporter: Heiko Rupp
> Assignee: Tomaz Cerar
>
> While developing an extension I get "JBAS014789: Unexpected element "bla" encountered"
> At this point it would be sooooooo helpful if #WildFly would tell me what it did expect here to help me modifying my code.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFBUILD-10) Allow artifact versions to be overridden on the command line
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFBUILD-10?page=com.atlassian.jira.plugin... ]
David Lloyd commented on WFBUILD-10:
------------------------------------
One thing worth noting which I forgot to put before - at present, if you give the system property, it would override some cases but not others. So it's sort of weird and broken, rather than simply not working.
> Allow artifact versions to be overridden on the command line
> ------------------------------------------------------------
>
> Key: WFBUILD-10
> URL: https://issues.jboss.org/browse/WFBUILD-10
> Project: WildFly Build Tools
> Issue Type: Feature Request
> Reporter: David Lloyd
> Assignee: Stuart Douglas
> Fix For: 1.0.0.Alpha5
>
>
> For CI environments. Re-enable the lost ability to specify the version of a dependency or transitive dependency on the command line. Right now only immediate dependencies can be overridden due to the standard maven mechanism. Transitive dependency properties are presently ignored.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3941) Provide a translator .xsd->parser+object model
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3941?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar closed WFLY-3941.
-----------------------------
Resolution: Rejected
You are thinking too much in forms of XML.
XML is just current default persistent state of the model.
There are initiatives to support different formats like json for our persistent model. Based on that XSD --> model definition tooling would be just redundant extra work.
You can still make it as standalone tool and we can add it to Wildfly Extras https://github.com/wildfly-extras but I don't see any good reason to have this in main code base or a definitive go-to tool for writing subsystems.
> Provide a translator .xsd->parser+object model
> ----------------------------------------------
>
> Key: WFLY-3941
> URL: https://issues.jboss.org/browse/WFLY-3941
> Project: WildFly
> Issue Type: Feature Request
> Components: Domain Management
> Reporter: Heiko Rupp
> Assignee: Brian Stansberry
> Priority: Minor
>
> When writing a new subsystem, it would be good to have tooling that takes a .xsd for the <subsystem> element and translates its content in a rough first form of parser + matching object model (*Definition, *Add and so on).
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3940) Parsers should print expected elements in case of error
by Heiko Rupp (JIRA)
[ https://issues.jboss.org/browse/WFLY-3940?page=com.atlassian.jira.plugin.... ]
Heiko Rupp commented on WFLY-3940:
----------------------------------
I am writing a *new subsystem/extension* and need to get the SubsystemParser + Object model right. I have some code but apparently the object hierarchy is not what the parser expects (or the other way around).
> Parsers should print expected elements in case of error
> -------------------------------------------------------
>
> Key: WFLY-3940
> URL: https://issues.jboss.org/browse/WFLY-3940
> Project: WildFly
> Issue Type: Feature Request
> Components: Domain Management
> Reporter: Heiko Rupp
> Assignee: Tomaz Cerar
>
> While developing an extension I get "JBAS014789: Unexpected element "bla" encountered"
> At this point it would be sooooooo helpful if #WildFly would tell me what it did expect here to help me modifying my code.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3941) Provide a translator .xsd->parser+object model
by Heiko Rupp (JIRA)
Heiko Rupp created WFLY-3941:
--------------------------------
Summary: Provide a translator .xsd->parser+object model
Key: WFLY-3941
URL: https://issues.jboss.org/browse/WFLY-3941
Project: WildFly
Issue Type: Feature Request
Components: Domain Management
Reporter: Heiko Rupp
Assignee: Brian Stansberry
Priority: Minor
When writing a new subsystem, it would be good to have tooling that takes a .xsd for the <subsystem> element and translates its content in a rough first form of parser + matching object model (*Definition, *Add and so on).
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3940) Parsers should print expected elements in case of error
by Heiko Rupp (JIRA)
Heiko Rupp created WFLY-3940:
--------------------------------
Summary: Parsers should print expected elements in case of error
Key: WFLY-3940
URL: https://issues.jboss.org/browse/WFLY-3940
Project: WildFly
Issue Type: Feature Request
Components: Domain Management
Reporter: Heiko Rupp
Assignee: Brian Stansberry
While developing an extension I get "JBAS014789: Unexpected element "bla" encountered"
At this point it would be sooooooo helpful if #WildFly would tell me what it did expect here to help me modifying my code.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (DROOLS-627) Rule with two accumulate followed by object type selection fail to fire rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-627?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-627.
--------------------------------
Labels: backport-to-6.0.x (was: )
Fix Version/s: 6.2.0.CR1
Resolution: Done
Fixed by https://github.com/droolsjbpm/drools/commit/f2e2d1240
> Rule with two accumulate followed by object type selection fail to fire rule
> ----------------------------------------------------------------------------
>
> Key: DROOLS-627
> URL: https://issues.jboss.org/browse/DROOLS-627
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final, 6.2.0.Beta1
> Reporter: Anantjot Anand
> Assignee: Mario Fusco
> Labels: backport-to-6.0.x
> Fix For: 6.2.0.CR1
>
> Attachments: TestTwoAccumulateEval.java
>
>
> A rule with two accumulate function followed by Type(true) select fails to fire the rule.
> please note removing the second aggregation makes the Rule R1 fire.
> import java.lang.*;
> import java.util.*;
> import com.test.unittest.TestTwoAccumulateEval.TypeA;
> import com.test.unittest.TestTwoAccumulateEval.TypeB;
> import com.test.unittest.TestTwoAccumulateEval.TypeC;
> import com.test.unittest.TestTwoAccumulateEval.TypeD;
> import com.test.unittest.TestTwoAccumulateEval.TypeDD;
> rule R0
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id )
> $d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
> then
> System.out.println("Rule R0 Fired");
> $d.setValue(1.0);
> $d.getFirings().add("Rule R0 Fired");
> update($d);
> end
> rule R1
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
> $d : TypeD( parentId == $c.id)
> // Aggregate function [sum] creates a separate context
> $sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C1 : TypeA( )
>
> and
> $b_C1 : TypeB( parentId == $a_C1.id)
>
> and
> $c_C1 : TypeC( parentId == $b_C1.id )
>
> and
> $d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
> ;sum($value_C1))
> // end of sum aggregation
>
> // Aggregate function [sum] creates a separate context
> $sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C2 : TypeA( )
>
> and
> $b_C2 : TypeB( parentId == $a_C2.id)
>
> and
> $c_C2 : TypeC( parentId == $b_C2.id )
>
> and
> $dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
> ;sum($value_C2))
> // end of sum aggregation
> //eval(($sumOfAll_1 + $sumOfAll_2) > 0)
> //eval returns true however TypeA(true) evaluates to false...removing second aggregate
> //makes TypeA works
> TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
> then
> System.out.println("Rule R1 Fired");
> $c.getFirings().add("Rule R1 Fired");
> update($c);
> end
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (DROOLS-627) Rule with two accumulate followed by object type selection fail to fire rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-627?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-627:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Rule with two accumulate followed by object type selection fail to fire rule
> ----------------------------------------------------------------------------
>
> Key: DROOLS-627
> URL: https://issues.jboss.org/browse/DROOLS-627
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final, 6.2.0.Beta1
> Reporter: Anantjot Anand
> Assignee: Mario Fusco
> Attachments: TestTwoAccumulateEval.java
>
>
> A rule with two accumulate function followed by Type(true) select fails to fire the rule.
> please note removing the second aggregation makes the Rule R1 fire.
> import java.lang.*;
> import java.util.*;
> import com.test.unittest.TestTwoAccumulateEval.TypeA;
> import com.test.unittest.TestTwoAccumulateEval.TypeB;
> import com.test.unittest.TestTwoAccumulateEval.TypeC;
> import com.test.unittest.TestTwoAccumulateEval.TypeD;
> import com.test.unittest.TestTwoAccumulateEval.TypeDD;
> rule R0
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id )
> $d : TypeD( parentId == $c.id, firings not contains "Rule R0 Fired" )
> then
> System.out.println("Rule R0 Fired");
> $d.setValue(1.0);
> $d.getFirings().add("Rule R0 Fired");
> update($d);
> end
> rule R1
> dialect "java"
> when
> $a : TypeA( )
> $b : TypeB( parentId == $a.id)
> $c : TypeC( parentId == $b.id, firings not contains "Rule R1 Fired" )
> $d : TypeD( parentId == $c.id)
> // Aggregate function [sum] creates a separate context
> $sumOfAll_1 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C1 : TypeA( )
>
> and
> $b_C1 : TypeB( parentId == $a_C1.id)
>
> and
> $c_C1 : TypeC( parentId == $b_C1.id )
>
> and
> $d_C1 : TypeD( parentId == $c_C1.id , $value_C1 : value , value != 0 )
> ;sum($value_C1))
> // end of sum aggregation
>
> // Aggregate function [sum] creates a separate context
> $sumOfAll_2 : Double(doubleValue != Double.MAX_VALUE) from accumulate (
> $a_C2 : TypeA( )
>
> and
> $b_C2 : TypeB( parentId == $a_C2.id)
>
> and
> $c_C2 : TypeC( parentId == $b_C2.id )
>
> and
> $dd_C2 : TypeDD( parentId == $c_C2.id , $value_C2 : value , value != 0 )
> ;sum($value_C2))
> // end of sum aggregation
> //eval(($sumOfAll_1 + $sumOfAll_2) > 0)
> //eval returns true however TypeA(true) evaluates to false...removing second aggregate
> //makes TypeA works
> TypeA(eval(($sumOfAll_1 + $sumOfAll_2) > 0))
> then
> System.out.println("Rule R1 Fired");
> $c.getFirings().add("Rule R1 Fired");
> update($c);
> end
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years