cancel
Showing results for 
Search instead for 
Did you mean: 

how can we get back list of objects from processVariable?

sherlock
Champ in-the-making
Champ in-the-making
Hi,

I am working on activiti-cdi,jsf.
While using selectManyCheckbox for multiple value selection the list of strings assigned to a processvariable.
How to get it back from the processVariable to list of strings.

Thanks
Sherlock
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
How is the list of process-variables stored? If it's an array-list of String, activiti will store it as a serializable. Afterwards, when calling getVariable() you can just cast to List<Stirng> and use it I guess…

sherlock
Champ in-the-making
Champ in-the-making
Hi,

I got below Exception

[Faces Servlet]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet Faces Servlet threw exception: java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.util.List

how to cast Serializable object to List<String>.

frederikherema1
Star Contributor
Star Contributor
Please check the exception before posting it blindly to the forum. I was just "guessing" it was a list. Clearly, it's not a list but an array of strings (hence the "Ljava.lang.String" in the CCException)

sherlock
Champ in-the-making
Champ in-the-making
Thanks Frederik,it's my mistake.