This section describes how to create a report or map binding using a geoprocessing service.
Step 1
Create a reference to the geoprocessing REST endpoint in the mapservice node using type="geoprocess", as shown in the following sample syntax:
<mapservice id="mapservice3" servertype="REST"
url="http://ibigis10.ibi.com:8399/arcgis/rest/services/GP/HotSpotAnalysismsp/GPServer" type="geoprocess"label="HotSpotAnalysismsp" visible="true" alpha="1"
icon="com/esri/solutions/flexviewer/assets/images/icons/i_shuttle.png"></mapservice>
This geoprocessing map service is referred to by the serverid attribute of the <geoprocess> element.
Step 2
The <geoprocess> element is a child element of an inbound or outbound layer.
To create a report FOCEXEC, nest the <geoprocess> element as a subelement of the inbound layer.
To create a map FOCEXEC, nest the <geoprocess> element as a subelement of the outbound layer.
Report FOCEXEC:
Add an inbound layer to select features from, then refer to the attributes required by the Input_Features parameter.
The Input_Features parameter requires the following attributes:
Add these attributes to the inbound layer and to the layer definition under <mapservice>, as shown in the following sample syntax:
<mapservice id="mapservice4" servertype="REST"
url="http://ibigis10.ibi.com:8399/arcgis/rest/services/MSP_incidents/MapServer" type="dynamic"
label="MSP_incidents" visible="false" alpha="1"
icon="com/esri/solutions/flexviewer/assets/images/icons/i_shuttle.png">
<defaultextent minx="-87.4115815188558" miny="44.3020857207546" maxx="-82.1167145134819" maxy="46.3098708603763"></defaultextent>
<fullextent minx="-102.6449" miny="0" maxx="0" maxy="47.3957"></fullextent>
<defaultextentwidth></defaultextentwidth>
<layer layerid="0" name="incidents" url="http://ibigis10.ibi.com:8399/arcgis/rest/services/MSP_incidents/MapServer/0" shape="point"
allowselect="false">
<attribute id="attribute7" attributename="FID" focusfieldformat="A20" esri_size="20" esri_quote="'"></attribute>
<attribute id="attribute8" attributename="INCIDENTID" focusfieldformat="D10.4" esri_size="10" esri_quote=""></attribute> </layer>
</mapservice>
Note: INCIDENTID will be mapped to the attribute ID.
<layer attributename="FID,SHAPE,INCIDENTID" calloutsymbolid="" layerid="0" symbolid="selectMapPoint"
mapservice="mapservice4" bufferSymbols="" filename="INCIDENTLIST" focuswhereformat="file" selectiontype="respectall">
</layer>
Map FOCEXEC:
For outbound layers, repeat the same configuration steps as for a report FOCEXEC. Map outbound layer attributes to act as geoprocessing Input_Features fields.
For example:
<layer attributename="FID,SHAPE,INCIDENTID" calloutsymbolid="" layerid="synlyr0"
symbolid="SimpleMarkerSymbol1" mapservice="mapservice2" colname="INCIDENTID" image="" labelfield=""
othersymbolid="" rollover="false" color="" shape="" size="" text="" textsymbolid="" textpolysymbolid="" title="" griddisplayfields="" colortable="">
</layer>
Step 3
Add a second layer to act as a placeholder for the geoprocessing task. This is where the output for the geoprocessing result is located.
Report FOCEXEC (inbound layer):
<layer attributename="Id" esri_precision="0" esri_quote="'" esri_size="8" esri_type="12" filename="GRIDLIST" focusfieldformat="A8" focuswhereformat="file" layerid="3" selectiontype="respectall">
Map FOCEXEC (outbound layer):
<layer attributename="Id" calloutsymbolid="" layerid="3" symbolid="" mapservice="mapservice0" colname="GRIDID" image="" labelfield="" othersymbolid="" rollover="false" color="" shape="" size="" text="" textsymbolid="" textpolysymbolid="" title="" griddisplayfields="" colortable="">
Step 4
You can start your geoprocess node at this point. Refer to it using the mapservice ID created in Step 1.
The following list describes the required attributes:
For example:
<geoprocess serverid="mapservice3" task="Hot_Spot_With_Rendering" async="true">
Step 5
Nest your parameters in the <geoprocess> element. Refer to the parameters required on the REST endpoint. For each required parameter in the geoprocessing task, map it to the source type.
The following list describes the required attributes:
For example:
<parm name="Input_Features" source="outbound" field="featureset" type="featureset">0</parm>
This refers to the first outbound layer of the map FOCEXEC shown below:
<layer attributename="FID,SHAPE,INCIDENTID" calloutsymbolid="" layerid="synlyr0" symbolid="SimpleMarkerSymbol1" mapservice="mapservice2" colname="INCIDENTID" image="" labelfield="" othersymbolid="" rollover="false" color="" shape="" size="" text="" textsymbolid="" textpolysymbolid="" title="" griddisplayfields="" colortable=""> </layer>
Step 6
Declare how the result will be handled using the <result> element.
The following list describes the required attributes:
For example:
<result name="rasteroutput_tif" target="display" type="GPRasterDataLayer"></result>
Note: For additional values, see Child Element <geoprocess>.
WebFOCUS |