cancel
Showing results for 
Search instead for 
Did you mean: 

User task with form property having default value is not settting

ganeshr
Champ in-the-making
Champ in-the-making
Hi,

  I have created user task with one of the form property defined with default value, but this value is not setting for user task.

<userTask id="HumanTask" name="HumanTask" activiti:candidateGroups="User">
    <extensionElements>
   <activiti:formProperty id="State" name="CurrentState" type="string" expression="${CurrentState}" default="ACTIVE">  </activiti:formProperty>
  <activiti:taskListener event="all" expression="#{customTaskListner.notify(task)}"></activiti:taskListener>
</<extensionElements>
</userTask >

But when I use the following print statement in user task listener , the value is getting as null

   system.out.println( delegateTask.getVariableLocal("CurrentState"));

  is it not possible to set the user task form property with default value, so that local variable is created automatically for the user task?


3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
I'm not sure default values are supported … can you paste your xml again? It's not showing

ganeshr
Champ in-the-making
Champ in-the-making
Here is the bpm xml file..

trademak
Star Contributor
Star Contributor
No we don't have support for that. You should fill the default value yourself before the user task.
It would a good addition though, so could you create a JIRA issue?

Best regards,