[JBoss JIRA] Created: (JBRULES-3202) named query TasksAssignedAsPotentialOwner doesn't work with MySql db
by Frank23 Knoll23 (JIRA)
named query TasksAssignedAsPotentialOwner doesn't work with MySql db
---------------------------------------------------------------------
Key: JBRULES-3202
URL: https://issues.jboss.org/browse/JBRULES-3202
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: MYSQL database
Reporter: Frank23 Knoll23
Assignee: Mark Proctor
Hi,
When I add a task (having two potential owners) by calling the method addTask followed by calling the method getTasksAssignedAsPotentialOwner of org.jbpm.task.service.TaskClient I expect to receive a list of TaskSummaries containing at least the previously added task. But I actually get an empty list!
Here is my setup and possible solution:
I am using the trunk version of ./jbpm-human-task/src/main/resources/META-INF/orm.xml and a MYSQL database.
When calling addTask the Task table will be populated with a NULL actualOwner_id.
The named query TasksAssignedAsPotentialOwner
"select new org.jbpm.task.query.TaskSummary(...t.taskData.actualOwner...) from ... left join t.taskData.actualOwner ..." of orm.xml generates SQL consisting of an inner join "inner join OrganizationalEntity user7_ on task0_.actualOwner_id=user7_.id" which doesn't take the NULL actualOwner_id correctly into account.
When I replace the named query TasksAssignedAsPotentialOwner with
"select new org.jbpm.task.query.TaskSummary(...actualOwner...) from ...left join t.taskData.actualOwner as actualOwner ...", then the generated SQL consists of an "left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id" which takes the NULL actualOwner_id correctly into account. So I get a List of TaskSummaries containing the added task.
Is this a correct fix?
Cheers, Frank
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBRULES-3044) Need BRMS-586/590 hotfix for Drools 5.1.1 / Salience firing order reversed or not observed on multple fact inserts post index
by Armand Welsh (JIRA)
Need BRMS-586/590 hotfix for Drools 5.1.1 / Salience firing order reversed or not observed on multple fact inserts post index
-----------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3044
URL: https://issues.jboss.org/browse/JBRULES-3044
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-core
Affects Versions: 5.1.1.FINAL
Environment: Windows 7/64, ReHat Enterprise Linux 6, Drools 5.1.1 running Java 6 JRE/SDK (all versions currently available from Oracle), 2 GB RAM, 20+ GB Free HD Space
Reporter: Armand Welsh
Assignee: Mark Proctor
Priority: Critical
Fix For: 5.1.1.FINAL
When executing fireAllRules, all pre-index rules fire adhering to the salience prioritization. If, however, during post-index execution, facts are inserted that are used in the conditions of lower salience rules in the same activation group, the rule will fire, regardless of the fact a higher salience rule has already fired.
This is further complicated when defining default rules of default salience (though any salience value will suffice so long as the default rule has the lowest salience within the activation group). When no pre-indexed facts are availble for the activation group, the default rule fires. along, with other activation group rules. During execution, a new fact is inserted that provides a hit for a higher salience rule in the same activation group as the default rule which already fired, however, the rule is not fired.
In effect, pre-indexed facts are processed in descending salience order. whereas post-indexed facts are processed in ascending salience order.
In all scenarios described, there is not a fire once restriction assigned.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months