Edit Geometric Network Feature Class?

1908
7
06-03-2011 11:26 AM
AaronDrake
New Contributor
Is it possible to edit a specific feature class that is contained in a geometric network via the AGS JSAPI?  I am attempting to edit a point feature class (Lift Stations) that are part of our Sewer Network.  I have all of the layers loaded into the .mxd, and can edit this layer inside of ArcMap; however, when I publish this layer to ArcGIS Server and attempt to edit this layer I get an error (via Firebug):

{"error":{"code":400,"message":"Unable to complete  operation.","details":["Unable to apply edits"]}}


I did a test, and exported this layer to a stand alone feature class outside of the geometric network, and the same code works. I can edit just fine...

I have it set up so that the users can only edit the attributes, and can not move the points.

Any help is greatly appreciated!
0 Kudos
7 Replies
HemingZhu
Occasional Contributor III
Is it possible to edit a specific feature class that is contained in a geometric network via the AGS JSAPI?  I am attempting to edit a point feature class (Lift Stations) that are part of our Sewer Network.  I have all of the layers loaded into the .mxd, and can edit this layer inside of ArcMap; however, when I publish this layer to ArcGIS Server and attempt to edit this layer I get an error (via Firebug):

{"error":{"code":400,"message":"Unable to complete  operation.","details":["Unable to apply edits"]}}


I did a test, and exported this layer to a stand alone feature class outside of the geometric network, and the same code works. I can edit just fine...

I have it set up so that the users can only edit the attributes, and can not move the points.

Any help is greatly appreciated!


In ArcObjects, if you edit a feature class inside of the geometric network, you have to explicitly define a edit session. Editing a featurelayer in JSAPI bypass the edit session. So i think that has something to do with your not being able to edit your feature class. By the way you can use FeatureLayer.isEditable() method to find out whether it is editable or not.
0 Kudos
AaronDrake
New Contributor
By the way you can use FeatureLayer.isEditable() method to find out whether it is editable or not.


I will give this a try, and see how it turns out...
0 Kudos
AaronDrake
New Contributor
I ran FL.isEditable(), and it is returning that it is editable.  However, I still get the:

{"error":{"code":400,"message":"Unable to complete  operation.","details":["Unable to apply edits"]}}


when I attempt the save.  Pointing the FL to a feature class outside of a geometric network allows me to save the edits. 😞
0 Kudos
HemingZhu
Occasional Contributor III
I ran FL.isEditable(), and it is returning that it is editable.  However, I still get the:

{"error":{"code":400,"message":"Unable to complete  operation.","details":["Unable to apply edits"]}}


when I attempt the save.  Pointing the FL to a feature class outside of a geometric network allows me to save the edits. 😞


Not sure why. I expect FL.isEditable() returns false. Anyway editing a feature classs outside of a geometric network need specify an editing session environment which is not used by feature layer. That is why it works once you pull it out of the geometric network.
0 Kudos
AaronDrake
New Contributor
I deleted the geometric network in the feature dataset, and can edit the FC. 

So it looks like editing attributes of a feature class that participates in a geometric network is a no go with the JSAPI.
0 Kudos
nicogis
MVP Frequent Contributor
...The ArcGIS Web APIs provide simple feature editing. The features must come from an ArcSDE geodatabase. This geodatabase can be licensed for either workgroup or enterprise use and does not have to be versioned...

for not versioned data: ...You cannot edit feature classes in a topology or geometric network. This is because when you edit a feature in a network or topology, not all the features in the network or topology lock, which means other editors can edit another part of the network or topology in a way that conflicts with your edits...
0 Kudos
BertrandLAURANCIN
Esri Contributor

Hello,

Bug NIM-088473 : Unable to edit reprojected data that participaties in a geometric network in a feature service ?!!?

Bertrand L.

0 Kudos