Bug 1222419

Summary: [GSS] (6.1.z) 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: high    
Version: 6.1.0CC: alazarot, etirelli, ksuta, kverlaen, lpetrovi, mwinkler
Target Milestone: CR1   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1221491
: 1227056 (view as bug list) Environment:
Last Closed: 2020-03-27 20:08: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:
Bug Depends On: 1221491    
Bug Blocks: 1227056, 1230818, 1230825    

Description Anton Giertli 2015-05-18 08:01:56 UTC
+++ This bug was initially created as a clone of Bug #1221491 +++

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 5 Karel Suta 2015-07-10 12:08:38 UTC
Verified in BRMS 6.1.2.CR1.