Array types are not supported for the fields of types declared in DRL.
A java.util.ArrayList (no generic parameters) should work.
-W
On 26 April 2011 23:59, fulton <fulton.gee(a)lmco.com> wrote:
I am currently using Drools Server to accept JSON-formatted
insertion
messages from a PHP application. Within the DRL file, I am currently
declaring the insertion object (let's use Person, for example) using
"Declare", e.g.,
declare Person
name: String
address: AddressType
end
declare AddressType
...
end
My question is, how do you declare an array object (e.g., "Hobbies") that
can be nested within Person. I have scanned the Internet (once again!) for
longer than I care to admit and have found no examples for this simple
usage. I have unsuccessfully tried multiple variations in defining an
array, but have given up. My current intention is to avoid using
externally
defined Java, if possible, and I would like to be able to define the
insertion object within the DRL to enable quick changes in the incoming
JSON
format, if necessary (I know this might not be "best practice"!). Could
someone please provide me with a quick example.
Thanks! Fulton
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-declare-an-array-attribute-withi...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users