Dear All,
I am working on geometric network trace and taking help from Geometric Network SOE Utility - Test .It is running fine.My question is we are now working on web app builder developer edition and i want to use this SOE in my application to trace geometric network How i can use this SOE in WAB?
Sibshat,
The a developer you will have to create a custom widget that allows the user to add junction or edge flags and or barriers (likely using the DrawBox dijit) and then present the html select element for them to choose the parameter options like "FindPath" "Find Connected", etc and the from those inputs build your url request using the esriRequest so that it looks something like this example:
http:// sit2.sistemigis.it/sit/rest/services/Demo/GeometricNetworkStream/MapServer/exts/GeometricNetworkUtility/GeometricNetworks/1/TraceNetwork?f=json&outFields=OBJECTID&maxTracedFeatures=10000&tolerance=10&flowElements=esriFEJunctionsAndEdges&edgeFlags=[{"x":421709.64645703085,"y":5085891.334625113,"spatialReference":{"wkid":32632}},{"x":420453.2768722459,"y":5085753.698631274,"spatialReference":{"wkid":32632}}]&traceIndeterminateFlow=false&traceSolverType=FindPath&flowMethod=esriFMConnected&shortestPathObjFn=esriSPObjFnMinMax&fromToEdgeWeight=Length&toFromEdgeWeight=Length
Then finally you will have to do something with the response like add the graphics to the map.
{"segmentCosts":[2952.5300148907204],"edges":[{"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID"},"geometryType":"esriGeometryPolyline","spatialReference":{"wkid":32632,"latestWkid":32632},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"}],"features":[{"attributes":{"OBJECTID":584},"geometry":{"paths":[[[420494.31799999997,5086500.0399999991],[420374.31799999997,5086540.0399999991]]]}},{"attributes":{"OBJECTID":585},"geometry":{"paths":[[[420294.31799999997,5086460.0399999991],[420374.31799999997,5086540.0399999991]]]}},{"attributes":{"OBJECTID":593},"geometry":{"paths":[[[420814.31799999997,5086300.0399999991],[420654.31799999997,5086460.0399999991],[420494.31799999997,5086500.0399999991]]]}},{"attributes":{"OBJECTID":596},"geometry":{"paths":[[[421054.31799999997,5086180.0399999991],[420974.31799999997,5086260.0399999991],[420814.31799999997,5086300.0399999991]]]}},{"attributes":{"OBJECTID":597},"geometry":{"paths":[[[421094.31799999997,5086140.0399999991],[421054.31799999997,5086180.0399999991]]]}},{"attributes":{"OBJECTID":607},"geometry":{"paths":[[[421794.31799999997,5085900.0399999991],[421334.31799999997,5085900.0399999991],[421094.31799999997,5086140.0399999991]]]}},{"attributes":{"OBJECTID":617},"geometry":{"paths":[[[420714.31799999997,5085480.0399999991],[420494.31799999997,5085660.0399999991],[420414.31799999997,5085860.0399999991],[420254.31799999997,5086020.0399999991],[420214.31799999997,5086300.0399999991],[420294.31799999997,5086460.0399999991]]]}}]}],"junctions":[{"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID"},"geometryType":"esriGeometryPoint","spatialReference":{"wkid":32632,"latestWkid":32632},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"}],"features":[{"attributes":{"OBJECTID":248},"geometry":{"x":420294.31799999997,"y":5086460.0399999991}},{"attributes":{"OBJECTID":252},"geometry":{"x":420374.31799999997,"y":5086540.0399999991}},{"attributes":{"OBJECTID":256},"geometry":{"x":420494.31799999997,"y":5086500.0399999991}},{"attributes":{"OBJECTID":272},"geometry":{"x":420814.31799999997,"y":5086300.0399999991}},{"attributes":{"OBJECTID":290},"geometry":{"x":421054.31799999997,"y":5086180.0399999991}},{"attributes":{"OBJECTID":293},"geometry":{"x":421094.31799999997,"y":5086140.0399999991}}]}],"flagsNotFound":[],"barriersNotFound":[]}
This not something that someone is going to be able to just send you a couple of lines of code for. Developing this widget would involve a fair level of effort. If you are not a developer I would suggest you contact esri professional services or hire a GIS consulting company.
Looks to me like your very close.
The core js code you need is in your js files and just need to be inserted into the Widget framework. There are some great docs on how to create your own custom widget. It does require some JS knowledge. Naming conventions—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers - Naming convention is the start of the build your own custom widget section.
Geometric Network SOE Utility - Test when i am running trace its only shows OID of the highlighted network. I want rest of the attribute also.can you please guide?