Bug 996572

Summary: Kmodule editor: limited capability
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, lpetrovi, mfusco, rzhang
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:17:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Locker 2013-08-13 13:00:09 UTC
Description of problem:
Project Screen has a kmodule editor under "Knowledge Base Settings" section, which has a few limitations:

1. Not possible to define 'packages' attribute on 'kbase' element has, that is used to include/exclude resources by package. Defaults to '*'.

2. Not possible to define 'scope' attributes on 'kbase' and 'ksession' element. The default value (ApplicationScoped) is used.

3. Not possible to define ksession sub-elements:
   - consoleLogger or fileLogger
   - workItemHandlers
   - listeners

For illustration, see kmodule.xsd https://github.com/droolsjbpm/droolsjbpm-knowledge/blob/master/kie-api/src/main/resources/org/kie/api/kmodule.xsd

Version-Release number of selected component (if applicable):
CR1 (community)

Actual results:
Not editable.

Expected results:
Decide which properties of kmodule should be editable in Workbench and add them. At least 'packages' should be there, so that the business user is able to define kbases including different subsets of resources in the project.

Comment 1 Jiri Locker 2013-08-23 07:28:57 UTC
Packages were added in ER1. What about the rest?

Comment 2 Toni Rikkola 2013-08-23 08:54:38 UTC
Just working on the rest. 

2. Not possible to define 'scope' attributes on 'kbase' and 'ksession' element. The default value (ApplicationScoped) is used.

Based on a chat with Mario Fusco, this is an option in the kmodule.xml, but not yet even implemented in the Drools core. So I'll leave it for now.

Comment 3 Toni Rikkola 2013-08-28 08:53:29 UTC
3. Not possible to define ksession sub-elements:
   - consoleLogger or fileLogger
   - workItemHandlers
   - listeners

And here console and file loggers are not implemented, but I'll have an editor ready for them the second they are.
Going to continue with work item handlers and listeners. Took a look at the code and I'm sure those are already implemented.

Comment 4 Toni Rikkola 2013-08-29 22:52:59 UTC
Ok, the editor now has the tools to edit the features we currently have.

Comment 5 Mario Fusco 2013-08-30 16:16:39 UTC
I also implemented support for loggers in kmodule.xml

Comment 6 Jiri Locker 2013-09-24 13:47:59 UTC
Thanks for adding the functionality, looks good at first glance

There is a few things to improve before closing this ticket. Starting with most important:

1. not possible to remove sessions. There is a Remove button but it's not possible to select a session to be removed.

2. not possible to rename session. The name cell is not editable.

3. Includes doesn't seem to work. I tried to provide file name of an existing resource in the project but I always got error message in server log: Unable to build KieBase, could not find include: CreditApproval.rdslr

4. it is possible to add kbase with duplicate name. It doesn't seem to be possible to fix it by removing or renaming the duplicate kbase. Attempts rather lead to losing data from the original kbase.

5. Kbase buttons don't update their state correctly.
   - Rename and Delete are always enabled. It is possible to hit them even if there is no kbase in the list.
   - Make Default only updates after changing kbase selection. It should also update after removing a kbase. Currently, after removing the last kbase which is also the default one, the button remains disabled and it stays like that even after adding a new kbase, so it cannot be made default.

6. Packages list should offer existing packages. Not really a bug, doesn't block this ticket.

Comment 7 Jiri Locker 2013-09-24 15:25:06 UTC
And one more bug: Includes and Packages list don't update correctly upon selecting kbase. The content of the old kbase is not cleared and the new kbase content is appended.

Comment 8 Toni Rikkola 2013-09-26 07:13:41 UTC
1. Fixed
2. Not fixed
3. Includes should actually be used to include other kbases. So I'll make it less confusing
4. Error/warning reporting in general needs some work in the KModule editor. I'll improve it.
5. Not fixed
6. A package picker should be a quick task to do
7. Not fixed

I'll get these fixed.