Pool variable can not be assigned in form text field (read only) initial data groovy script

1
+1
-1

Hi everybody,

I can not assign value to pool variable (global) , inside the groovy script of the form text field initial value, if this field set to read only. The field display the correct value, but the pool variable still contain null !!

Can anyone help me.

I am using version 6.2 community edition

Thanks for your support

Comments

Submitted by haris.subasic on Tue, 06/17/2014 - 09:55

Are you using process initialization form (start process form) or a form on a task in the process?

Submitted by nasser on Tue, 06/17/2014 - 11:25

Hi haris,

I am using form on a human task in the process, some fields are read only (ID, Department, User) others are input fields (cost center & work needed). I need to assigen the field values to Pool varibles, to be inserted in my DB. while doing in the groovy script for the read only fields, the varibles still hold the null value.

Thanks for your reply

Submitted by nasser on Wed, 06/18/2014 - 12:12

Thank you haris for your help, I used the form actions ti get the value from the text fields directly, and avoid rereuning the scripts again.

again your support will be always appriciated.

Submitted by nasser on Wed, 06/18/2014 - 12:12

Thank you haris for your help, I used the form actions ti get the value from the text fields directly, and avoid rereuning the scripts again.

again your support will be always appriciated.

1 answer

1
0
-1
This one is the BEST answer!

If you are using a read-only data, it makes sense not to be able to save the data to a variable. You cannot assign a value to a variable from within a Groovy script. To do so, you can create an operation on a task level. You can also give an initial value to your process data, that would be the same as the initial value of your read-only field. Hope this helps, Haris

Notifications