Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1158813

Summary: "Fact Type Cannot be found" error when Collect is used in Guided Rule
Product: [Retired] JBoss BRMS Platform 6 Reporter: Anton Giertli <agiertli>
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.0.3CC: kverlaen
Target Milestone: ER2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:05:19 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:
Attachments:
Description Flags
[0] git repo
none
[1] screenshot none

Description Anton Giertli 2014-10-30 09:59:11 UTC
Created attachment 952043 [details]
[0] git repo

Description of problem:

Guided Editor wrongly reports the error via UI, even though the rule definition is alright.

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

BPM Suite 6.0.3

How reproducible:
always

Steps to Reproduce:
1. Create a rule with Collect construct and some custom model (i.e. created in data modeler)


I am attaching git repository.

Actual results:

Guided Editor reports following error:
"Fact Type cannot be found in the available models. Section has been disabled"
Expected results:
There is no error.

Additional info:
The project can be saved / validated and even built without issues, so this seems like a minor UI issue

Comment 1 Anton Giertli 2014-10-30 09:59:47 UTC
Created attachment 952044 [details]
[1] screenshot

Comment 3 manstis 2014-11-05 21:06:03 UTC
The issue is caused by java.util.List not being imported as a type for the rule using the "Config" tab. That said it is quite possible to build a rule containing a java.util.List without this type being explicitly imported and so there is room for improvement.

Comment 5 manstis 2014-11-06 10:19:58 UTC
I have made operation of the Guided Rule Editor's use of "From Collect" consistent with its handling of other "Primary" fact types. For the purpose of this BZ a "Primary" Fact Type is the root of a pattern (e.g. "Person(..)", "List(..)" etc).

The "From Collect" Widget used to support selection of List, Collection or Set even if these types had not been imported into the Rule (using the "Config" tab). This was inconsistent with how other "Primary" fact types work and led to the issue reported here.

Now you need to import "java.util.List" (or one of the other Collections) into the Rule before it is available in the "From Collect" widget. This is consistent with other "Primary" fact types.

For existing Rules, e.g. the one reported here, "java.util.List" will need to be imported into the Rule (using the "Config" tab).