Sorry for the late reply.
I have changed submit parameters like this:
var param1 = {
"Input_Layer": dijit.byId('spreadmodel1layers').value,
"Start_locations": featureSet,
"Default_break_values": box0.attr("value")
};
esri.show(loading);
gp.submitJob([param1], completeCallback, statusCallback, function(error){
alert(error);
esri.hide(loading);
});
But result is pity much same.
I have also tried
var features= [];
features.push(f1Graphic);
var f1featureSet = new FeatureSet();
var f2featureSet = new FeatureSet();
f1featureSet.features = features;
features = [];
features.push(f2Graphic);
f2featureSet.features = features;
var featureSetParam = [];
featureSetParam.push({"f1s":f1featureSet,"f2s":f2featureSet});
featureSetParam.push({"f1s":f1featureSet,"f2s":f2featureSet});
gp.submitJob(featureSetParam, completeCallback, statusCallback);
with same result.
According to API docs
<Object > inputParameters | Required | The inputParameters argument specifies the input parameters accepted by the task and their corresponding values. These input parameters are listed in the parameters field of the associated GP Task resource. For example, assume that a GP Task resource has the following input parameters:- < GPFeatureRecordSetLayer > Input_Points
- < GPDouble > Distance
The parameters argument for the above inputs is a data object of the form: { Input_Points: <FeatureSet>, Distance: <Number> } |
It does not clearly says that inputParameters can be an Array.
Please guide how I can pass any array of params in submitJob function.