Here,How to define Form Field Variables as Process Variables and Task Local Variables using Script(Javascript) in modeler.
im trying like this in Create Task Listener.
task.setVariableLocal(“Name”, “”);
task.setVariableLocal(“Email”, “”);
task.setVariableLocal(“DOB”, “”);
task.setVariableLocal(“PWD”, “”);
and created Task Listener on complete.
var name= task.getVariable(“Name”);
if (name!= null){
task.setVariableLocal(“Name”, name);
}
var dob= task.getVariable(“DOB”);
if (dob != null){
task.setVariableLocal(“DOB”, dob);
}
var email = task.getVariable(“Email”);
if (email != null){
task.setVariableLocal(“Email”, email);
}
var pwd = task.getVariable(“PWD”);
if (pwd != null){
task.setVariableLocal(“PWD”, pwd );
}
The Form Fileds(Process variables ) are
But here when im trying above approach i can not see the Form Field(Process Varibles) in process scope after complete task on cockpit.
I want to define the all Form Field Varibales for Both Scopes Process Scope and Task Local Scope. please suggest