My gp has two inputs which are two feature sets. One is a selection of a feature in a feature layer and the other is all features of the same feature layer. A similar gp works fine in javascript so I know the gp is working. In the completion event, I get an alert, but I don't see the field that value that should have been calculated by the gp when I examine the layer. Any ideas why is it not updating the field with the calculated value but it is not throwing any errors? Thanks
private function jobCompleteHandler(e:GeoprocessorEvent):void
{
Alert.show("Plan ID created");
}
private function faultHandler2(f:FaultEvent):void
{
Alert.show("Unexpected fault:\n" + f.toString());
}
import com.esri.ags.tasks.supportClasses.ExecuteResult;
private function calculalteplanid():void
{
var SelectingFeature:FeatureSet = new FeatureSet();
SelectingFeature.features = myFeatureLayerstewardship.selectedFeatures
SelectingFeature.fields = myFeatureLayerstewardship.layerDetails.fields
var features:ArrayCollection = ArrayCollection(myFeatureLayerstewardship.graphicProvider);
var featureSet:FeatureSet = new FeatureSet(features.source);
featureSet.fields = myFeatureLayerstewardship.layerDetails.fields
var params:Object = {
"Selecting_Features": SelectingFeature,
"Stewardship": featureSet
}
var geoprocessTask:Geoprocessor = new Geoprocessor();
geoprocessTask.outSpatialReference = myMap.spatialReference;
geoprocessTask.url = "http://tfsgis-iisd01:6080/arcgis/rest/services/TwoParametersWithSelection2/GPServer/CalcFeaturesStewardshipOneParameterSelection";
geoprocessTask.submitJob(params, null, null);
geoprocessTask.addEventListener(GeoprocessorEvent.JOB_COMPLETE,jobCompleteHandler);
geoprocessTask.addEventListener(FaultEvent.FAULT, faultHandler2);
}
private function jobCompleteHandler(e:GeoprocessorEvent):void
{
Alert.show("Plan ID created");
}
private function faultHandler2(f:FaultEvent):void
{
Alert.show("Unexpected fault:\n" + f.toString());
}