[JBoss JIRA] (DROOLS-1604) Missing clone for indexing declaration in MvelConstraint
by Mario Fusco (JIRA)
Mario Fusco created DROOLS-1604:
-----------------------------------
Summary: Missing clone for indexing declaration in MvelConstraint
Key: DROOLS-1604
URL: https://issues.jboss.org/browse/DROOLS-1604
Project: Drools
Issue Type: Bug
Components: core engine
Reporter: Mario Fusco
Assignee: Mario Fusco
Indexing declaration in MvelConstraint is not cloned when a 'or' is processed and this in turn causes that the wrong field is indexed for a branch of the 'or' or even that it attempts to index on a not existing causing the following NPE:
{code}
java.lang.NullPointerException
at org.drools.core.reteoo.BaseLeftTuple.getObject(BaseLeftTuple.java:629)
at org.drools.core.reteoo.BaseTuple.getObject(BaseTuple.java:48)
at org.drools.core.util.AbstractHashTable$FieldIndex.hashCodeOf(AbstractHashTable.java:333)
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (DROOLS-1576) Intermittently Rule getting executed Twice while using Agenda Groups and Order
by Siyad Theyparambil Mohammed (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1576?page=com.atlassian.jira.plugi... ]
Siyad Theyparambil Mohammed commented on DROOLS-1576:
-----------------------------------------------------
Hi [~mfusco]
We have attached the details on how to reproduce the issue
> Intermittently Rule getting executed Twice while using Agenda Groups and Order
> ------------------------------------------------------------------------------
>
> Key: DROOLS-1576
> URL: https://issues.jboss.org/browse/DROOLS-1576
> Project: Drools
> Issue Type: Bug
> Reporter: Siyad Theyparambil Mohammed
> Assignee: Mario Fusco
> Attachments: CreateDedCharges-Rule.txt, CreateFLATFeeCharges-Rule.txt, CreatePSRLCreditCharges-Rule.txt, CreateRPERFeeCharges-Rule.txt, Drools-1576.zip, First Execution Result.txt, Second Execution Result.txt
>
>
> Hi,
> We have 4 rules which are divided into 2 agenda groups
> ||Rule||Agenda Group||
> |CreateRPERFeeCharges|createcharges|
> |CreateFLATFeeCharges|createcharges|
> |CreateDedCharges|createcharges|
> |CreatePSRLCreditCharges|postrule|
>
> Focus is set on the agenda group in the following order,
> 1. postrule
> 2. createcharges
> The Rule “CreatePSRLCreditCharges” has named consequences. Based on the accumulated Charge amount we want one of the two consequence to be executed. If you notice the “First Execution Result.txt” this rule was executed twice once for the “IF” and second for “ELSE” but during the second trigger of the rule execution it fired the rule only once with the same data. Could you please look/check and let us know if we have an issue with the rule or is this a bug in drools?
>
> We have attached the all the 4 drls and the results of the 2 execution that was triggered.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (DROOLS-1576) Intermittently Rule getting executed Twice while using Agenda Groups and Order
by Siyad Theyparambil Mohammed (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1576?page=com.atlassian.jira.plugi... ]
Siyad Theyparambil Mohammed updated DROOLS-1576:
------------------------------------------------
Attachment: Drools-1576.zip
> Intermittently Rule getting executed Twice while using Agenda Groups and Order
> ------------------------------------------------------------------------------
>
> Key: DROOLS-1576
> URL: https://issues.jboss.org/browse/DROOLS-1576
> Project: Drools
> Issue Type: Bug
> Reporter: Siyad Theyparambil Mohammed
> Assignee: Mario Fusco
> Attachments: CreateDedCharges-Rule.txt, CreateFLATFeeCharges-Rule.txt, CreatePSRLCreditCharges-Rule.txt, CreateRPERFeeCharges-Rule.txt, Drools-1576.zip, First Execution Result.txt, Second Execution Result.txt
>
>
> Hi,
> We have 4 rules which are divided into 2 agenda groups
> ||Rule||Agenda Group||
> |CreateRPERFeeCharges|createcharges|
> |CreateFLATFeeCharges|createcharges|
> |CreateDedCharges|createcharges|
> |CreatePSRLCreditCharges|postrule|
>
> Focus is set on the agenda group in the following order,
> 1. postrule
> 2. createcharges
> The Rule “CreatePSRLCreditCharges” has named consequences. Based on the accumulated Charge amount we want one of the two consequence to be executed. If you notice the “First Execution Result.txt” this rule was executed twice once for the “IF” and second for “ELSE” but during the second trigger of the rule execution it fired the rule only once with the same data. Could you please look/check and let us know if we have an issue with the rule or is this a bug in drools?
>
> We have attached the all the 4 drls and the results of the 2 execution that was triggered.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (WFCORE-2042) Improve query operation for nested child resources
by Michal Petrov (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2042?page=com.atlassian.jira.plugi... ]
Michal Petrov commented on WFCORE-2042:
---------------------------------------
[~gaol], [~brian.stansberry] I'm going to comment here for both issues. From what I'm seeing the problem is that the filter cannot be applied to nested attributes. I think a good solution would be having another attribute in the query operation for filtering on otherwise non-addressable resource (i.e. the "where" functionality wouldn't need to change, at least for the given examples).
The obvious choice is to call it "from", [I've implemented the basics|https://github.com/michpetrov/wildfly-core/commit/3ece8247ed7fcd75...]; the operations would then look like this:
{code}
/subsystem=security/security-domain=*/authentication=*:query(from=login-modules, where={code=RealmDirect})
{
"outcome" => "success",
"result" => [{
"address" => [
("subsystem" => "security"),
("security-domain" => "other"),
("authentication" => "classic")
],
"outcome" => "success",
"result" => [{
"code" => "RealmDirect",
"flag" => "required",
"module" => undefined,
"module-options" => {"password-stacking" => "useFirstPass"}
}]
}]
}
{code}
and for WFCORE-2041:
{code}
/core-service=capability-registry:query(from=possible-capabilities,where={name=org.wildfly.data-source})
{
"outcome" => "success",
"result" => [{
"name" => "org.wildfly.data-source",
"dynamic" => true,
"registration-points" => [
"/subsystem=datasources/data-source=*",
"/subsystem=datasources/xa-data-source=*"
]
}]
}
{code}
> Improve query operation for nested child resources
> --------------------------------------------------
>
> Key: WFCORE-2042
> URL: https://issues.jboss.org/browse/WFCORE-2042
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Domain Management
> Reporter: Lin Gao
>
> This is another similar RFE as WFCORE-2041.
> It would be good if the 'query()' operation can filter the resources by specifying value of attributes which are +inside of nested child resources(not only by the first level of child resource)+, so that, for example, the following command can work well as expected:
> {code:}
> [standalone@localhost:9990 /] /subsystem=security:query(select=[security-domain], where={security-domain.authentication.login-modules.code=RealmDirect})
> {
> "outcome" => "success",
> "result" => undefined
> }
> // here the expected output are the security-domain resources which have the loging-module RealmDirect defined.
> {code}
> The {{security-domain.authentication.login-modules.code}} in 'where' parameter is proposed attribute name in enhanced syntax, other options maybe possible.
> The different requirements between this WFCORE-2042 and WFCORE-2041 are:
> * WFCORE-2041 focus on complex attributes in one management resource
> * WFCORE-2042 focus on nested management resources with or without complex attributes
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (DROOLS-1593) Ruleflow Split (XOR) can't find valid outgoing connection
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1593?page=com.atlassian.jira.plugi... ]
Mario Fusco commented on DROOLS-1593:
-------------------------------------
[~swiderski.maciej] I reran all the tests locally and it worked. I now relaunched jenkins. If also jenkins would be green I'd suggest to merge this PR anyway because the place where the propagation queue is flushed is more correct in my opinion, and also the flush is done only once instead of being performed in the for-loop.
> Ruleflow Split (XOR) can't find valid outgoing connection
> ---------------------------------------------------------
>
> Key: DROOLS-1593
> URL: https://issues.jboss.org/browse/DROOLS-1593
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.5.0.Final, 7.0.0.CR3
> Environment: Drools 7.0.0-SNAPSHOT, Oracle Hotspot 1.8.0_112, KIE-Server, OpenShift DecisionServer
> Reporter: Duncan Doyle
> Assignee: Mario Fusco
>
> This seems like a regression, as this used to work in 6.4.0.Final, but broke somewhere before 6.5.0.Final. Still broken in 7.0.0-SNAPSHOT. (I actually found it in the OpenShift DecisionServer/KIE-Server image).
> See this reproducer: https://github.com/DuncanDoyle/ruleflow-split-problem
> I have a ruleflow-group that has a split-node (XOR Gateway) directly after the start-node. The outgoing sequence flows of that XOR have a Drools LHS that checks whether a fact is present in working memory (in this reproducer it's a String)
> - exists java.lang.String()
> - not java.lang.String()
> Only if that fact exists do I want to continue my ruleflow, if the fact is not there, I stop.
> I use a StatelessKieSession in which I;
> - insert a String
> - start the process
> - fire the rules
> This used to work fine in 6.4.0.Final and below, but since 6.5.0.Final I get an exception:
> {code}
> org.jbpm.workflow.instance.WorkflowRuntimeException: [test-process:1 - Has Strings?:4] -- XOR split could not find at least one valid outgoing connection for split Has Strings?
> at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:66)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:174)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:367)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:326)
> at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:72)
> at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:174)
> at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:38)
> at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:235)
> at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:443)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:208)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:192)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:184)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1859)
> at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121)
> at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:156)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:64)
> at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:238)
> at org.jboss.ddoyle.ruleflow.test.RuleflowTest.testRuleflowWithSingleFire(RuleflowTest.java:28)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalArgumentException: XOR split could not find at least one valid outgoing connection for split Has Strings?
> at org.jbpm.workflow.instance.node.SplitInstance.executeStrategy(SplitInstance.java:110)
> at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:62)
> ... 42 more
> {code}
> What seems to be causing this is that the rules in the sequence flows are not yet fired when the process arrives at the XOR node, causing it to not be able to find an outgoing connection.
> What does work is if I add an extra "fireAllRules" command BEFORE the "startProcess" command. In that case the flow behaves as it used to. So I need 2 "fireAllRules" commands. What does NOT work is when I only add a "fireAllRules" command before the startProcess command. In that case the rules in the RFG nodes are not fired (but the XOR does not throw an exception in that case).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (DROOLS-1593) Ruleflow Split (XOR) can't find valid outgoing connection
by Duncan Doyle (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1593?page=com.atlassian.jira.plugi... ]
Duncan Doyle commented on DROOLS-1593:
--------------------------------------
If I can set this option in kmodule.xml, it's fine. On DecisionServer I don't control the code that creates the KieSession and I'd rather not set JVM options in OpenShift S2I to get this to work. So kmodule.xml is fine.
> Ruleflow Split (XOR) can't find valid outgoing connection
> ---------------------------------------------------------
>
> Key: DROOLS-1593
> URL: https://issues.jboss.org/browse/DROOLS-1593
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.5.0.Final, 7.0.0.CR3
> Environment: Drools 7.0.0-SNAPSHOT, Oracle Hotspot 1.8.0_112, KIE-Server, OpenShift DecisionServer
> Reporter: Duncan Doyle
> Assignee: Mario Fusco
>
> This seems like a regression, as this used to work in 6.4.0.Final, but broke somewhere before 6.5.0.Final. Still broken in 7.0.0-SNAPSHOT. (I actually found it in the OpenShift DecisionServer/KIE-Server image).
> See this reproducer: https://github.com/DuncanDoyle/ruleflow-split-problem
> I have a ruleflow-group that has a split-node (XOR Gateway) directly after the start-node. The outgoing sequence flows of that XOR have a Drools LHS that checks whether a fact is present in working memory (in this reproducer it's a String)
> - exists java.lang.String()
> - not java.lang.String()
> Only if that fact exists do I want to continue my ruleflow, if the fact is not there, I stop.
> I use a StatelessKieSession in which I;
> - insert a String
> - start the process
> - fire the rules
> This used to work fine in 6.4.0.Final and below, but since 6.5.0.Final I get an exception:
> {code}
> org.jbpm.workflow.instance.WorkflowRuntimeException: [test-process:1 - Has Strings?:4] -- XOR split could not find at least one valid outgoing connection for split Has Strings?
> at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:66)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:174)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:367)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:326)
> at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:72)
> at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43)
> at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:174)
> at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:38)
> at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:235)
> at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:443)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:208)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:192)
> at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:184)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1859)
> at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121)
> at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:156)
> at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:64)
> at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:238)
> at org.jboss.ddoyle.ruleflow.test.RuleflowTest.testRuleflowWithSingleFire(RuleflowTest.java:28)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalArgumentException: XOR split could not find at least one valid outgoing connection for split Has Strings?
> at org.jbpm.workflow.instance.node.SplitInstance.executeStrategy(SplitInstance.java:110)
> at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:62)
> ... 42 more
> {code}
> What seems to be causing this is that the rules in the sequence flows are not yet fired when the process arrives at the XOR node, causing it to not be able to find an outgoing connection.
> What does work is if I add an extra "fireAllRules" command BEFORE the "startProcess" command. In that case the flow behaves as it used to. So I need 2 "fireAllRules" commands. What does NOT work is when I only add a "fireAllRules" command before the startProcess command. In that case the rules in the RFG nodes are not fired (but the XOR does not throw an exception in that case).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month