Bug 1221491 - Missing support for selected Drools command
Summary: Missing support for selected Drools command
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Kie-Server
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DR1
: 6.2.0
Assignee: Edson Tirelli
QA Contact: Karel Suta
URL:
Whiteboard:
Depends On:
Blocks: 1222419 1227056
TreeView+ depends on / blocked
 
Reported: 2015-05-14 07:35 UTC by Anton Giertli
Modified: 2020-03-27 20:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1222419 (view as bug list)
Environment:
Last Closed: 2020-03-27 20:01:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Anton Giertli 2015-05-14 07:35:13 UTC
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 13:46:42 UTC
Verified in 6.2.0.ER3.


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