cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti expression in formproperty not working

araghuraman
Champ in-the-making
Champ in-the-making
The following mapping from form property variable to expression does not seem to work:
<userTask id="task">
  <extensionElements>
    <activiti:formProperty id="street" expression="#{address.street}" required="true" />
  </extensionElements>
</userTask>
My address POJO 's fields are all public and also has getters/setters for these fields.
I complete the usertask in Java thus:
          
HashMap<String,Object> taskParams = new HashMap<String,Object>();
taskParams.put("street","Main Street");
formService.submitTaskFormData(task.getId(), taskParams);   
taskService.complete(task.getId());
but address.street does not have the value "Main Street"
Is something wrong with my code or can you please suggest an alternative?
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

I couldn't immediately find a unit test that proofs that this should work, so I quickly created one:

https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/test/java/org/activiti/...

See the testFormPropertyExpression method.

Best regards,