I've been struggling with setting global variables and substitution parameters for my batch job submitted through the Web Service. I have a simple job with a script that refers to one global variable and one substitution parameter.
Job_param_typeSubstitutionParametersParameter[] parms =
new Job_param_typeSubstitutionParametersParameter[1];
parms[0] = new Job_param_typeSubstitutionParametersParameter();
parms[0].setName("$XXX");
parms[0].set_value("Test");
jobParameters.setSubstitutionParameters(parms);
request.setJobParameters(jobParameters);
RunBatchJobRequestGlobalVariablesVariable[] globals =
new RunBatchJobRequestGlobalVariablesVariable[1];
globals[0] = new RunBatchJobRequestGlobalVariablesVariable();
globals[0].setName("$$YYY");
globals[0].set_value("Test2");
request.setGlobalVariables(globals);
When I pass this request to run_Batch_Job, that call times out after about 5 minutes with a socket read timeout. If I don't set the globals or substitution parameters, the call completes, and the job runs fine.
The script in the job looks like the following:
print('Global: ' || $XXX);
print('SubParm: ' || [$$YYY]);
What might I be doing wrong?