I have make a Groovy script to set the default data for the widgets in the form. The code is as below:
package com.company.setting
public class DefaultValue {
public static String mail = ""
public static String phone = ""
public DefaultValue (){
}
public static Initiate() {this.mail = "abc@def.com"
this.phone = "123456789"}
}
Then I make a process variable with the below script:
def setting = new com.company.setting.DefaultValue ()
setting.Initiate()
return setting.mail
When I start the process, and submit the initiate form, I have an error:
BScript9.groovy: 1: unable to resolve class com.company.setting.SettingValue
@ line 1, column 15.
def setting = new com.company.setting.SettingValue();
Then, in one of my form, I setup a form variabe to get this value:
../API/bpm/caseVariable/{{task.caseId}}/defaultMail
What did I do wrong?