[rules-users] Dependency enumeration
Michael Anstis
michael.anstis at gmail.com
Thu Aug 11 14:34:30 EDT 2011
This is a known bug in Guvnor, https://issues.jboss.org/browse/GUVNOR-1106.
I assume your example uses a single DSL sentence - if not the bug is still
related and at present unresolved.
With kind regards,
Mike
On 11 August 2011 13:05, agarwalk <agarwalk at altisource.com> wrote:
> Hi
>
> I have created following enumeration and java class file.
>
> *Enumeration:*
>
> 'OrderData.propertyState':(new com.asps.rules.OrderData()).loadStates()
> 'OrderData.fulfillmentReviewerName[propertyState]':'(new
> com.asps.rules.OrderData()).loadReviewers("@{propertyState}")'
>
> *Java class:*
>
> public class OrderData implements Serializable {
> private String propertyState;
> private String fulfillmentReviewerName;
>
> // getters and setters
>
> public List<String> loadStates() {
> List<String> states = new ArrayList<String>();
> states.add("CA");
> states.add("NY");
> states.add("FL");
> return states;
> }
>
> public List<String> loadReviewers(final String propertyState) {
> List<String> reviewers = new ArrayList<String>();
> System.out.println("### in load reviewers ### : " +
> propertyState);
> if ("CA".equalsIgnoreCase(propertyState)) {
> reviewers.add("A");
> reviewers.add("B");
> System.out.println("Reviewers : A & B");
> } else if ("NY".equalsIgnoreCase(propertyState)) {
> reviewers.add("C");
> reviewers.add("D");
> System.out.println("Reviewers : C& D");
> } else if ("FL".equalsIgnoreCase(propertyState)) {
> reviewers.add("E");
> reviewers.add("F");
> System.out.println("Reviewers : E& F");
> } else {
> reviewers.add("G");
> reviewers.add("H");
> System.out.println("Reviewers : G& H");
> }
> return reviewers;
> }
> }
>
> I created a rule as follows
>
> WHEN
> There is an OrderData with:
> propertyState[propertyState]* FL* --- This is a drop down which
> is being displayed correctly
>
> fulfillmentReviewerName [fulfillmentReviewerName] -- This should
> have been the drop down. Values are dependent on the state selected.
>
>
> When i try to create above rule the enumeration is loaded correctly for
> propertyState but the enumeration is not loaded for
> fulfillmentReviewerName
> field. When I saw the logs the correct method and condition is being
> invoked (as per Sys out)but drop down does not contain anything.
>
> ANy suggestions?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Dependency-enumeration-tp3245703p3245703.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110811/4d2c5447/attachment.html
More information about the rules-users
mailing list