Bug 1028396 - Switching to Rete View causes an eror "Unable to parse rules to show RETE view! 2 build errors"
Switching to Rete View causes an eror "Unable to parse rules to show RETE vie...
Status: ON_QA
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Rules / jBPM integration (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: DR1
: 6.1.0
Assigned To: kconner
Matej Melko
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-08 06:05 EST by Jochen Cordes
Modified: 2018-03-29 17:52 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If you open a .drl rule file and try to switch to the Rete review, you will encounter an error. As a result, users cannot see the Rete tree view.
Story Points: ---
Clone Of:
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 Jochen Cordes 2013-11-08 06:05:47 EST
Description of problem:


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

JBDS 7.0.1 GA
JBoss Tooling (https://devstudio.jboss.com/updates/7.0-development/integration-stack/, includes JBoss Drools Core 6.0.0.201308222359)

How reproducible:

Always

Steps to Reproduce:
1. Create a rule service following the documentation at https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Fuse_Service_Works/6/html-single/Development_Guide_Volume_1_SwitchYard/index.html#Create_a_Rules_Service
2. Open the file RulesComponent.drl file
3. Switch to Rete Tree

The (default) RulesComponent.drl file looks like this:

package com.example.switchyard.switchyard_rules
import org.switchyard.Message
global Message message

rule "RulesComponent"
    when
        // insert conditional here
    then
        // insert consequence here
        System.out.println("service: RuleService, payload: " + message.getContent());
end

Actual results:

Error shown

Expected results:

Rete Tree view should be shown

Additional info:

Eclipse error log (Help -> About JBoss Developer Studio -> Configuration Details -> Show Error Log)

!ENTRY org.drools.eclipse 4 120 2013-11-08 10:27:30.204
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.Exception: 2 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:147)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.drools.eclipse 4 120 2013-11-08 10:27:30.204
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.Exception: Unable to parse rules to show RETE view! 2 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.drools.eclipse 4 120 2013-11-08 10:27:30.236
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.reflect.InvocationTargetException
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:248)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.Exception: Unable to parse rules to show RETE view! 2 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	... 1 more
Root exception:
java.lang.Exception: Unable to parse rules to show RETE view! 2 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


After changing rule to

package com.example.switchyard.switchyard_rules
import org.switchyard.Message

rule "RulesComponent"
    when
        message : Message()
    then
        // insert consequence here
        System.out.println("service: RuleService, payload: " + message.getContent());
end


!ENTRY org.drools.eclipse 4 120 2013-11-08 11:21:31.415
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.Exception: 3 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:147)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.drools.eclipse 4 120 2013-11-08 11:21:31.415
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.Exception: Unable to parse rules to show RETE view! 3 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.drools.eclipse 4 120 2013-11-08 11:21:31.420
!MESSAGE Internal error in Drools Plugin: 
!STACK 0
java.lang.reflect.InvocationTargetException
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:248)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.Exception: Unable to parse rules to show RETE view! 3 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	... 1 more
Root exception:
java.lang.Exception: Unable to parse rules to show RETE view! 3 build errors
	at org.drools.eclipse.editors.rete.ReteViewer.loadReteModel(ReteViewer.java:162)
	at org.drools.eclipse.editors.DRLRuleEditor2$3.run(DRLRuleEditor2.java:240)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


When upgrading "Drools and jBPM tools" to 6.0.0.CR5 (downloaded from http://www.jboss.org/drools/downloads) it started to work

So we have two issues:

- First the version of Drools tools need to be updated
- Second the generated example for Drools in SY should be updated
Comment 2 Rob Cernich 2013-11-08 09:25:41 EST
Changing the component as this sounds like a Drools issue, not a SY issue.

I'll investigate the template used when creating a rule, but I'm guessing we actually need the "message" global.
Comment 3 Anne-Louise Tangring 2014-06-19 14:45:04 EDT
It is possible this is fixed in the latest JBDSIS release (7.0.2)

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