Bug Geometric Network and FeatureService?

2080
6
02-17-2010 07:20 AM
JoseSousa
Esri Contributor
Hello,

I've tried to start a service with FeatureService enabled for a map document with layers from Geometric Network and it throws an error.

If I disable the FeatureService option it starts the service.
Is this a bug or a limitation?

Thanks advanced,

José Sousa
Tags (2)
0 Kudos
6 Replies
BjornSvensson
Esri Regular Contributor
For editing non-simple types (for example geometric network) your data needs to be versioned.  Is it?

http://help.esri.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Authoring_featu...
- This page also have some other good information 🙂
0 Kudos
JoseSousa
Esri Contributor
Hello Bjorn,

Thanks for the document. Indeed Geometric Network is working 🙂

I spent one entire day testing this and everything seems to work just fine except the refresh of the map. I'm using the selection mode in the FeatureLayers and an ArcGISDynamicLayer as a base map mapservice.

When I select the feature on the map service as resutl I get the feature selected as graphic. When I move the graphic obviously get's updated and there is a call to applyEdits REST method.

After that the map on screen does not refresh. So I caught the event editsComplete to manually refresh the map.

Is this needed? Is this the proper approach?

Thanks,

José Sousa
ESRI Portugal
0 Kudos
BjornSvensson
Esri Regular Contributor
Yes, this is the right approach. (Note that technically you only need to refresh when the applyEdits was successful.)

If you're using the Editor we might make that easier in the future.
0 Kudos
JoseSousa
Esri Contributor
Hello Bjorn,

Thanks a lot for your guidance. Everything seems to work fine regarding the selection mode of the toolbar. When I select an element and modify it everything goes fine.

But there is allways an error when I select an element of the template picker and create a new element for instance a point. The applyEdits is called and the feature is inserted. I even catch the editsComplete method without errors but after it leaves this method (client side) it throws an exception (please check the error below).

Hope this means anything to you.

Thanks again for your help,

José Sousa

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.esri.ags.components::Editor/featureLayer_editsCompleteHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at <anonymous>()
at mx.rpc::Responder/result()
at com.esri.ags.tasks::FeatureServiceTask/handleApplyEdits()
at Function/http://adobe.com/AS3/2006/builtin::call()
at com.esri.ags.tasks::BaseTask/handleResult()
at <anonymous>()
at mx.rpc::Responder/result()
at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()
at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()
at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at DirectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
0 Kudos
BjornSvensson
Esri Regular Contributor
Hmmm.... Is this specific to one layer with Geometric Networks?
Or does it happen all layers with Geometric Networks?
Or does it happen to all your Feature Service layers (even those without geometric networks)?
0 Kudos
JoseSousa
Esri Contributor
Hello Bjorn,

I've tested only against Geometric Network but I've tested your sample EditorWithToolbar and it seems to edit fine simple features.

I've changed my current mode from selection to onDemand and it seems to work even the creation of new features. So I guess this only happens when the selection mode is defined.

I do not want to use the onDemand mode because after the edits I need to refresh the graphic features that where affected by the movement of one single feature. Since I cannot determine which are I need to refresh the entire FeatureLayer (and others related) which is not very elegant 🙂

For instance, by moving a valve it means that all lines related to this feature must move also (ensured in sde database by Geometric Network). It would be very usefull to have some option of getting all features (graphics) from FeatureLayer that intersects some geometry (graphic) without going from server since the data is already downloaded.

If I use a mapservice and a FeatureLayer in selection mode the refresh of the mapservice is much more soft (gaves the impression that only the features related where refresh since its an image).

The most impressive thing about this issue is that it happens client side after the succesfull applyEdits has been done.

Hope you find the answer for this.

I've created and published 2 websites for you to check this out. It's more easy this way:

1 - Selection Mode: http://195.23.241.219:8090/FlexEditor1/editor.html
     ViewSource: http://195.23.241.219:8090/FlexEditor1/srcview/index.html
2 - OnDemandMode: http://195.23.241.219:8090/FlexEditor2/editor.html

Note: I will remove the links after you check this.

Thanks a lot,

José Sousa
0 Kudos