This content has been marked as final.
Show 4 replies
-
1. Re: Jbpm generics support on process variable definitions
salaboy21 Mar 6, 2014 11:51 AM (in response to d.bramati)Hi Diego,
If you do the following in java it will also fail:
import java.util.List<Something>;
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
so :
List<Something> somethings = (List<Something>)listOfSomething;
And then your method will be found.
-
2. Re: Jbpm generics support on process variable definitions
jcataluna Mar 8, 2014 6:39 PM (in response to salaboy21)Hi!
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?
Regards.
-
3. Re: Jbpm generics support on process variable definitions
salaboy21 Mar 8, 2014 6:45 PM (in response to jcataluna)yeah, did you have any problems using that approach? let us know if it doesn't work or something is broken.
Regards
-
4. Re: Jbpm generics support on process variable definitions
jcataluna Mar 8, 2014 9:08 PM (in response to salaboy21)No problem at all.
Thanks