AnsweredAssumed Answered

Need something like activiti:formProperty for ServiceTask. Why is it not available?

Question asked by vtsurkan on Jun 13, 2014
Latest reply on Jun 16, 2014 by trademak
I am thinking of using ServiceTask with arbitrary properties that would be great to have in process definition.

Unfortunately ServiceTask only allows "activiti:field" and that forces your ServiceTask Java class to have only predefined "fields" - properties, basically you can't handle arbitrary number and named "properties" with that layout. You need "activiti:formProperties" or something like it for that.

You can do it with the "pseudo" lists like:

<activiti:field name="propNames" stringValue="name1, name2, …"></activiti:field>
<activiti:field name="propValues" expression="${val1}, ${val2}, …" ></activiti:field>

Then split the lists in the code and assign: name1=val1; name2=val2, …

But this looks real ugly :( (it's OK actually, but feels somewhat unprofessional and "hacky")

Is there a way to get that functionality.

I am new to Activiti, so maybe missing some simple thing. Hoping someone already solved that problem.