<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting results from submitJob in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-results-from-submitjob/m-p/394427#M9208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Francesco,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; It does not have anything to go with the flex portion of the code. You need to look at the model or script that you are publishing that is where the output is determined.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Jul 2011 10:17:11 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2011-07-09T10:17:11Z</dc:date>
    <item>
      <title>Getting results from submitJob</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-results-from-submitjob/m-p/394426#M9207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hy guys &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i have to help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have more problems to get results from submitJob for my Asynchronous GP that i configured in a custom widget of FlexViewer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I post here a code with URL of my GP Service so if you want to see and try it&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; import com.esri.ags.FeatureSet;
&amp;nbsp;&amp;nbsp; import com.esri.ags.Graphic;
&amp;nbsp;&amp;nbsp; import com.esri.ags.SpatialReference;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.GeoprocessorEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.GraphicsLayerEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.MapMouseEvent;
&amp;nbsp;&amp;nbsp; import com.esri.ags.geometry.Geometry;
&amp;nbsp;&amp;nbsp; import com.esri.ags.symbols.SimpleFillSymbol;
&amp;nbsp;&amp;nbsp; import com.esri.ags.symbols.SimpleLineSymbol;
&amp;nbsp;&amp;nbsp; import com.esri.ags.symbols.SimpleMarkerSymbol;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.Geoprocessor;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tasks.supportClasses.ParameterValue;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; import mx.controls.Alert;
&amp;nbsp;&amp;nbsp; import mx.rpc.AsyncResponder;
&amp;nbsp;&amp;nbsp; import mx.rpc.events.FaultEvent;

&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function startGeoProcess(event:MouseEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var parms:Object = new Object();
&amp;nbsp;&amp;nbsp;&amp;nbsp; parms.valore = String(numberOfDays.text);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var geoprocessTask:Geoprocessor = new Geoprocessor();
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.outSpatialReference = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.showBusyCursor = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.url = "http://193.204.163.134/ArcGIS/rest/services/ENEA_Sondaggi_iniziali/Ricerca_Lito_Carg/GPServer/RicercaCarg";
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.useAMF = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.submitJob(parms);
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.addEventListener(GeoprocessorEvent.JOB_COMPLETE, onJobComplete);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onFault(fe:FaultEvent, token:Object = null):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(fe.toString());
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onJobComplete(event:GeoprocessorEvent):void
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var geoprocessTask:Geoprocessor = new Geoprocessor();
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.addEventListener(GeoprocessorEvent.GET_RESULT_DATA_COMPLETE, onGetResult);
&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessTask.getResultData(event.jobInfo.jobId, "jd26fbe9c6f97470592e698b05067865e");
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onGetResult(event:GeoprocessorEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var myGraphicsLayer:GraphicsLayer = new GraphicsLayer();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var myPointSymbol:SimpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 10, 0x1AA1D3, 0.2);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pv:ParameterValue = event.parameterValue;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var fs:FeatureSet = pv.value as FeatureSet;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each(var graphic:Graphic in fs.features)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGraphicsLayer.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol = myPointSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(graphicsLayer);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;
 
 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;esri:GraphicsLayer id="graphicsLayer"/&amp;gt;
 &amp;lt;/fx:Declarations&amp;gt;
 
 
 &amp;lt;viewer:WidgetTemplate id="helloWorld"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="351" height="170"&amp;gt;
&amp;nbsp; 
&amp;nbsp; &amp;lt;s:Label text="RICERCA LITOLOGIA INTERPRETATA SECONDO VDI" y="10" horizontalCenter="0"/&amp;gt;
&amp;nbsp; 
&amp;nbsp; &amp;lt;s:TextInput id="numberOfDays"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="228"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paddingLeft="0"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paddingRight="0"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text="'SABBIA SATURA'" horizontalCenter="0" textAlign="center" y="50"/&amp;gt;
&amp;nbsp; &amp;lt;s:Label text="inserisci litologia" y="30" horizontalCenter="0"/&amp;gt;
&amp;nbsp; &amp;lt;s:Button 
&amp;nbsp;&amp;nbsp; label="Ricerca" 
&amp;nbsp;&amp;nbsp; click="startGeoProcess(event)"
&amp;nbsp;&amp;nbsp; bottom="5" left="10" cornerRadius="7"/&amp;gt;
&amp;nbsp; &amp;lt;s:Button 
&amp;nbsp;&amp;nbsp; label="Clear" 
&amp;nbsp;&amp;nbsp; click="graphicsLayer.clear()"
&amp;nbsp;&amp;nbsp; bottom="5" right="9" cornerRadius="7"/&amp;gt;
&amp;nbsp; 
 &amp;lt;/viewer:WidgetTemplate&amp;gt;
&amp;lt;/viewer:BaseWidget&amp;gt;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Robert Scheitlin say me that my result is a Image but i don't try to configure the script for the result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me it's very important&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jul 2011 09:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-results-from-submitjob/m-p/394426#M9207</guid>
      <dc:creator>francescodi_vito</dc:creator>
      <dc:date>2011-07-09T09:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting results from submitJob</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-results-from-submitjob/m-p/394427#M9208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Francesco,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; It does not have anything to go with the flex portion of the code. You need to look at the model or script that you are publishing that is where the output is determined.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jul 2011 10:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-results-from-submitjob/m-p/394427#M9208</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-07-09T10:17:11Z</dc:date>
    </item>
  </channel>
</rss>

