cancel
Showing results for 
Search instead for 
Did you mean: 

Complex objects as form variables

hbpost
Champ in-the-making
Champ in-the-making
Hi.   I tried to use a complex object as a User Task form variable, and it seemed to work fine until I tried to retrieve it with FormProperty.getValue and all it returned was the toString() value of the object.  Am I doing something wrong or is this not supported?   Being able to associate complex objects with a User Task is a pretty significant requirement for us. 

Thanks,

Herm
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Forms are String in, String out. Ie you need to do serialization in between.

The reason for this is that most webapps only allow for Strings to be passed.

hbpost
Champ in-the-making
Champ in-the-making
That makes sense for Forms.  However, there is no way to associate complex objects with a User Task, as per the BPMN Spec, at least through the current eclipse plugin and services.   Forms work fine for simple applications, but we are hoping to use Activiti for more complex applications where our client needs to interact with complex structured data.  If the FormService would simply pass through an object reference, it would meet our needs I believe.  Or if there we another properties page where one could associate DataInput and DataOutput.  Has anyone else ever expressed an interest in this functionality?

Thanks very much,

Herm

jbarrez
Star Contributor
Star Contributor
Most people that have complex forms, use the formKey way and pass the data as process variables in.
Eg in Alfresco that's the way it's done and any complex item can be attached this way to the process.