Select to view content in your preferred language

Edits do not reflect in Data in ArcMap

3260
7
02-17-2010 08:58 AM
JoseSousa
Esri Contributor
Hello all,

I'm lost here 🙂

I've tried editing in "snapping" and "ondemand" mode in Flex 2.0 but I cannot see in ArcMap the changes.

I've published an ArcMap document with layers from a FeatureDataset. When I edit in these modes in flex everything on the map seems ok (besides the simbology which is far from the desired one). When I clear the cache from REST even in ArcGIS Javascript API I can see the changes. But when I go to ArcMap or ArcCatalog the data haven't changed.

Am I missing something here? I definetely think so since I was expecting that everytime I edit a feature it would be stored in the database (A and D tables from versioned geodatabase). What is happenning? What is applyEdits method doing?

Thanks a lot,

José Sousa
ESRI Portugal
Tags (2)
0 Kudos
7 Replies
BjornSvensson
Esri Regular Contributor
Calling applyEdits on the FeatureLayer will send the request to the REST endpoint which will try to apply these edits on the server.  If you can see the changes in a Javascript application, then the change has definitely been made on the server.

Are you using versioned data?  And if so, are you sure everything is looking at the same version?
0 Kudos
JoseSousa
Esri Contributor
Hello Bjorn,

I'll try to explain it better since I was watching the database while editing.

I've registered the database as versioned (I did not check up the option Move Edits to Base since I have a topology layer inside the feature dataset).

I am expecting that all changes goes to A and D tables in SDE.

I've tried to create a feature in ArcMap and the Flex application and other (like Javascript API) can see it on the viewer (after refresh obviously).

But when I edit or create a feature using the Flex API I cannot see the data applied in ArcMap. I've tried opening with Javascript API and the changes appeared.

When I compress the database the changes continue not to be applied in ArcMap. If I execute the Post command using my workspace and the default version (the only one I have) ArcMap applies the changes.

This means that ArcMap cannot read the changes I'm making in Flex. But the other applications can. Maybe something changed in the sde model ... and arcmap is not using ...

I'm using the sample EditorWithToolbar and I only changed the address of the GeometryServer, and the 3 FeatureServices to my owns. Everything is the same. Maybe Flex is writing in another version ... 😞

Hope you can explain me this Bjorn,

José Sousa
ESRI Portugal
0 Kudos
JoseSousa
Esri Contributor
Bjorn,

I've created a new FeatureDataset and registered it with the option to Move Edits to base.

It works 50% :).

When I move (from your sample) a coloured vertex (orange color) the edits appear in ArcMap. When I move the other vertexes nothing appears and in Flex it changes the modified vertex to orange and creates 2 new vertexes (whitout color). If I move again the previous vertex the changes are applied in ArcMap.

Strange behaviour. Nevertheless the problem with registered geodatabases without the option to move to base still persist.

Hope this helps you in something to understand my problem.

José Sousa
0 Kudos
BjornSvensson
Esri Regular Contributor
Have you tried the refresh version command in ArcMap?

For example, if you and I are editing the default version in ArcMap and I make a change and then save edits, you will not see the change until you refresh the version. The easiest way to do this is to click the refresh version command on the versioning toolbar.
JoseSousa
Esri Contributor
Hello Bjorn,

Thanks again for your patience.

1 - Your approach to update the features in ArcMap for Versioned Geodatabases (without the option to Move Edits to Base) works but I am very frustrated with this methodology.
   1.1 - ArcMap allways (using the same default version) were able to see data edited for instance in WebADF. It does not make any sense that know I need this workaround. I cannot understand why Flex and JavaScript API (maybe also Silverlight) can understand the logic behind SDE and ArcMap cannot (in ArcGIS 10).
   1.2 - I was considering using AMF Services to expose some ArcObjects routines to work in some advanced modelling but I will be forced now to execute this routine in ArcObjects and execute the RefreshVersion by code previously to run any code of mine;

2 - Using the Sample EditorWithToolbar and for both cases (Move Edits to Base or not) when creating new vertexes ArcMap do not update the features on the map (even with RefreshVersion). When moving existing vertexs (the orange ones) I can see the changes even with a simple refresh.

Thanks again for your help Bjorn,

José Sousa
ESRI Portugal
0 Kudos
BjornSvensson
Esri Regular Contributor
Hi José,

On 1.1:
I'm not sure I understand the reference to it working better in ArcMap when using WebADF on the client.  When you start ArcMap (or "refresh version"), it gets (or should get) the latest data and allows you to work with this data in a session.  When you save that or does anything else to refresh the data in ArcMap, ArcMap should have the latest data.  This behavior should not be impacted if you have a second editor using Flex, JavaScript, ArcMap, or WebADF. It should only be a question about whether ArcMap has "asked" for the latest data.

On 1.2:
Sorry, I'm not sure what you mean here. Probably because I'm missing the underlying purpose or use case.  Are you trying to add functionality to ArcMap or to your web client?

On 2:
There might be some bug hiding here but I'm not sure.  Do you mean that after creating new vertices (to an existing feature) in your Flex application, then it doesn't show up in ArcMap?  Is it reproducible (happening every time)?  Has the changes been made to the server (i.e. check the Flex application in a different browser, like IE instead of Firefox just to make sure there is no browser cache issues)?  If you restart ArcMap does it have the changes, or does ArcMap never see the changes?
0 Kudos
JoseSousa
Esri Contributor
Hello Bjorn,

Thanks a lot for answering to these questions. It was indeed important.

By looking to your answers I believe I haven't explained well by questions which is normal since my English is not very good 🙂

I will add new functionalities to my Flex Application by exposing new methods using AMF. These AMF services will access the fined grained objects known as ArcObjects to add advanced capabilities to my website.

When I insert features using this own services I ensure that when the client clicks the traditional refresh button in ArcMap the data edited on the website is available. ArcMap allways could read data edited on the web even when registered as versionized without the option to move edits to base and this is what I must ensure its done.  

When clicking the refresh version in ArcMap everything is fine.

About the last point (2), I believe its a bug from this beta version of ArcGIS API for Flex 2.0.

I you test your own sample of EditorWithToolbar you will notice that, after you select a line for instance, it becomes available two types of vertexs (one orange and one without a fill color).

Error:

1 - Select a feature;
2 - Take a orange vertex and move it (it becomes updated on the screen);
3 - Take the other type of vertex (without the fill color) and move it (it becomes updated on the screen);
4 - Open ArcMap;
5 - Click the Refresh Version;
6 - Note that only step 2 worked;

Hope I've explained better my questions.

Thanks for your help Bjorn,

José Sousa
ESRI Portugal
0 Kudos