Description of problem:
DSL sentences in guided rule templates cause validation errors, project cannot be built. Source looks correct though.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a data object: Fact with String field
2. Create a simple dsl definition: [when]There is a Fact with=f : Fact()
3. Create a guided rule template, add (non-dsl) constraint on Fact.field, bind it to a template key.
4. In the Data tab, add a new row, fill in some value.
5. Save and validate the template -> everything is fine.
6. Add the dsl sentence 'There is a Fact with' (from step 2), save, validate.
[ERR 102] Line 6:2 mismatched input '>' in rule "rtemplate_0"
Parser returned a null Package
Source looks as expected - "There is a Fact with" in the guided editor is turned into "f : Fact()" in the Source tab.
There is no such trouble with guided rules, just rule templates.
The problem is that we only generate DRL from the templates, without translating the DSL parts to DRL. The guided template editor should have never allowed the user to add DSL. Based on the code this has never worked.
My first fix attempt was to translate the DSL in the knowledge builder. While this works if there is DSL in the file, it breaks the build if there is not. We have this similar issue with decision tables that have DSL. The plan is to group this fix with that work.
Fixed by detecting if templates contain DSL sentences. If they do, the generated source is treated as DSLR, otherwise as standard DRL.
The e88a97 commit didn't make it into the product it seems.
Correct, the commit is not part of 6.2.0.ER5.
@Ryan, I guess you take the cutoff date and consider BZs according to that. However, the cut off date does not really say at which time we actually branched, so there is several hours where the commits can be pushed into the branch, but won't make it into the tag. Is there any way to fix this?
I am facing this issue drool workbench in 6.3 version. Is this issue is not resoled in in 6.3 version?
Issue- When I create rule in Guided Rule Template with DSL in “When” and “Then” condition it very much shows in the “SOURCE” tab but not in the “DATA” tab columns where table is created.