cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Forms, initial value for form property

zarezadeh
Champ in-the-making
Champ in-the-making
I'm using activiti 5.9 and I want to be able to set initial value for an specific form property.
this initial value should be used when variable with given id does not exist in process, and might be overwritten when user task gets completed by user and new value will stored in process variable.
I thought that Expression is for this purpose but I couldn't do that.
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

You can't configure a form field with an initial value that should only be used when a specific variable does not exist.
What you can do is set a process variable before executing the user task and use another process variable value or an initial value and use this for the form field.

Best regards,

zarezadeh
Champ in-the-making
Champ in-the-making
Thanks for your reply
But what I means was exactly what default property of a form property does. I was unaware about that because Activiti designer does not support it.
My problem now is, when I manually set default for form property in xml representation of my bpmn file, next time I use Activiti Designer to edit it, Designer will remove default property.

trademak
Star Contributor
Star Contributor
Hi,

Thanks for replying, I think I misunderstood the question and you are absolutely right about that.
I'll fix this now and add the default property to a form field in the Activiti Designer.

Best regards,

zarezadeh
Champ in-the-making
Champ in-the-making
thanks, fixing this would be great.
I have another question that I think is related to this, form property has a property called value, I can't completely get its purpose, the documentation is not so complete yet. what't the difference between value and default?
Also I was skimming through activiti engine java code, and I think value property never used in the code. Am I right?

ptrepag
Champ in-the-making
Champ in-the-making
I have the same question about value.  In DefaultFormHandler, it looks like it is not parsed.  Is this field designed for some other form handler to use?