If you do the following in java it will also fail:
Remember that generics are only for giving some hints to the compiler of the type of objects contained inside the collection.
Inside the process definition you cannot use generics. Inside the Script Tasks you can cast to the specific type
List<Something> somethings = (List<Something>)listOfSomething;
And then your method will be found.
just to get things clear. If I want to have a list of "Products" in my process, what I need to do is:
- Create an Object process variable "productList"
- Use it with a cast: List<Products> plist = (List<Products>)productList;
should lists must be managed that way in jBPM?
yeah, did you have any problems using that approach? let us know if it doesn't work or something is broken.
No problem at all.