Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1221491 - Missing support for selected Drools command
Missing support for selected Drools command
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Kie-Server (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: DR1
: 6.2.0
Assigned To: Edson Tirelli
Karel Suta
:
Depends On:
Blocks: 1222419 1227056
  Show dependency treegraph
 
Reported: 2015-05-14 03:35 EDT by Anton Giertli
Modified: 2015-10-05 09:46 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1222419 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anton Giertli 2015-05-14 03:35:13 EDT
Description of problem:

Kie-Server doesn't support all valid Drools command.

Version-Release number of selected component (if applicable):
BRMS 6.1.0

How reproducible:
always

Steps to Reproduce:
1. Try to send AgendaGroupSetFocusCommand

i.e.
List<String> classNames3 = new ArrayList<String>();
		classNames3.add("org.drools.core.command.runtime.rule.AgendaGroupSetFocusCommand");
		JAXBContext jaxbContext3 = DroolsJaxbHelperProviderImpl.createDroolsJaxbContext(classNames3, null);
		Marshaller marshaller3 = jaxbContext3.createMarshaller();

		marshaller3.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
		marshaller3.marshal(agenda, xml3);
		System.out.println(xml3);

Fails with 
Caused by: com.sun.istack.SAXException2: unable to marshal type "org.drools.core.command.runtime.rule.AgendaGroupSetFocusCommand" as an element because it is missing an @XmlRootElement annotation


Actual results:
Not all Drools commands are supported


Expected results:
All Drools commands are supported

Additional info:
Seems like following works:
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/runtime/help/impl/XStreamXML.java#L70

However, there are few others which are quite common and should be supported too:

Checking https://github.com/droolsjbpm/drools/tree/6.2.x/drools-core/src/main/java/org/drools/core/command/runtime/rule

Those could be:

AgendaGroupSetFocusCommand (this one is directly requested by customer)
it comes hand in hand with
ClearAgendaGroupCommand


Please check https://github.com/droolsjbpm/drools/tree/6.2.x/drools-core/src/main/java/org/drools/core/command/runtime/rule
and make sure that for commands which it makes sense there is a support in Kie-Server (both JAXB and XTream requests should work)
Comment 4 Karel Suta 2015-10-05 09:46:42 EDT
Verified in 6.2.0.ER3.

Note You need to log in before you can comment on or make changes to this bug.