cancel
Showing results for 
Search instead for 
Did you mean: 

Properties

atanus
Champ in-the-making
Champ in-the-making
1. how do we make form fields read only?
2. how do we create properties that are not form fields?
14 REPLIES 14

atanus
Champ in-the-making
Champ in-the-making
any update?

atanus
Champ in-the-making
Champ in-the-making
how do we create properties that are not form fields?  properties= process variables

jonnyg
Confirmed Champ
Confirmed Champ
Another way of asking this, is how to define (or import) the data model, so that form & process designers can hew to it.

jbarrez
Star Contributor
Star Contributor
Thanks JonnyG, that clarifies it.

Currently, the way to do this is to define 'variables' for example on the root level. Note that you can't set the value of this. To do so, you need to use either a script / execution listener that sets default values. If those variables are set, they can be referenced later on in condition builders, etc.

atanus
Champ in-the-making
Champ in-the-making
Re: "Currently, the way to do this is to define 'variables' for example on the root level" - what exactly do we have to do to accomplish this?

vasile_dirla
Star Contributor
Star Contributor
Hi atanus,
did you check this documentation?
http://www.activiti.org/userguide/#apiVariables

in this documentation you'll find a lot of information about variables.

jbarrez
Star Contributor
Star Contributor
> what exactly do we have to do to accomplish this?

When you don't select anything, you can define 'variables' on the process level. That's what I'm talking about here.

atanus
Champ in-the-making
Champ in-the-making
Do form validation and some I want to report on. I have seen the link sent by Vasile, but looks like it talks about creating and setting variables at runtime. I want to know how to create variables which are not form fields at design time and use them for form validation. 
Please see this question as well - 1. how do we make form fields read only?

Thanks.

vasile_dirla
Star Contributor
Star Contributor
Hi atanus,
please import the application I attached here and have a look on it.

i used global variables ("varBool1" and "varString" created at process level)
then i used some script tasks to set the values of these variables,
and finally there is a userTask (with a form on it)
in this form you can find visibility conditions based on the "varBool1" variable value and also a read-only form field for displaying the content of the variable "varString" (for this read only i used a "display value" field which references the variable I want to display.)

Please let us know if if imported successfully this app. (please rename it to zip before importing)