Bug 1221491

Summary: Missing support for selected Drools command
Product: [Retired] JBoss BRMS Platform 6 Reporter: Anton Giertli <agiertli>
Component: Kie-ServerAssignee: Edson Tirelli <etirelli>
Status: CLOSED EOL QA Contact: Karel Suta <ksuta>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0   
Target Milestone: DR1   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1222419 (view as bug list) Environment:
Last Closed: 2020-03-27 20:01:35 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:
Bug Depends On:    
Bug Blocks: 1222419, 1227056    

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.