Runtime editing in a disconnected mode

7367
28
07-25-2011 10:36 AM
Labels (1)
AngelGonzalez
Occasional Contributor II
OK, I read the Runtime SDK for WPK and I have a question. If you deploy a runtime app onto a laptop and download the data on the laptop from ArcSDE and have the app point to the local copy of the datasource (.mpk) can you do editing (in my case attribute editing only) if the laptop does not have any connectivity to the ArcSDE server? That is the laptop will not have any internet/intranet connections? 

I also read "Editing with the ArcGIS Runtime SDK for WPF requires a feature service" Does this mean editing can only be done in a connect mode?

I also saw something about "Managing ArcGIS Runtime local services" Does this mean we can create a local service for editing?

Thanks
0 Kudos
28 Replies
RobertZargarian
New Contributor III
I tried it again. Please see all steps in attached document with images. Could it be some security issue when creating virtual directory?
The strange thing was that I could see service.UrlMapService first time I ran the application and looked at it in Browser
and could see that layers where empty. But when I created mpk next time then Service object on ArcGISLocalDynamicMapServiceLayer was Null. 

private void ArcGISLocalDynamicMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
      ArcGISLocalDynamicMapServiceLayer l = MyMap.Layers[0] as ArcGISLocalDynamicMapServiceLayer;
}


Thanks!
Robert
0 Kudos
RobertZargarian
New Contributor III
Hi,
Any ideas on this? Have you seen attached document that describes what I am doing step by step?
Am I doing something wrong? Please help me to solve this problem; I have spent a lot of time on this without success.
Shall I test to use only C:\Users\user folders to avoid security problems?

Thanks!
Robert
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Ok, the next thing we can try is to enable logging. To enable logging you'll need to make a small change in a text file within the ArcGIS Runtime local server directory. At Beta 2 you need to do this manually, but we have since created a much more user/developer-friendly GUI app to do this.

#. Open Windows Explorer
[the following steps assume you're on a 64-bit machine - for 32-bit drop the x86, etc]
#. Browse to "C:\Program Files (x86)\ArcGIS SDKs\WPF10.1\ArcGISRuntime10.1\LocalServer64\bin"
#. Find the arcgisruntime.json file and open in a text editor.
#. Change the following:
     "logging"         : false,
#. To:
     "logging"         : true,
#. Save and exit.
#. Now when you run your application the local server will be creating log files in %temp%\ArcGISRuntimeLogs (e.g. C:\Users\mbranscomb\AppData\Local\Temp\ArcGISRuntimeLogs).
#. you can open the log file in a text editor to see if there are any clues to the problem.


If there's nothing useful in the logs, then to confirm that the MPK is definitely pointing to the correct we'll need to dive a little deeper. So I'd like you to check the following please:

#. Browse to the exploded packages in my documents (e.g. C:\Users\mbranscomb\Documents\ArcGIS\Packages).
#. Find the directory with the same name as your MPK (e.g. ch_test5)
#. Browse to ...\ch_test5\v101
#. Use 7-zip to extract the files from the MSD file (e.g. extract ch_test5.msd to a new folder ch_test5.msd)
#. Browse to ...\ch_test5\layers
#. Open the xml file for one of the layers of your data in a text editor (e.g. myFeatureLayer.xml)
#. Look for the <WorkspaceConnectionString> tag.
#. This should contain a path like "DATABASE=V:\Data\..\ch5\ch_test5.gdb".
#. This will confirm that the packaging process is correctly using the virtual / mapped drive for the externally referenced drive.

If the path in the msd file looks ok then it should be behaving fine. If none of that helps - can you put together a reproducer app with data? I could test this by simply creating the same virtual /mapped drive here.

Cheers

Mike
0 Kudos
RobertZargarian
New Contributor III
Hi Mike,
Thank you for responding to this thread!
I followed steps that you described.  Please see the attached files (Log file, layer file, mpk, mxd file-gdb).
The  WorkspaceConnectionString was pointing to my gdb-file <WorkspaceConnectionString>DATABASE=V:\ch_test10.gdb</WorkspaceConnectionString> 
this was right.

As I understand error have something to do with topology rules present in gdb.
I tested to remove topology rules from the ch_test10.gdb and it works. Is it a BUG?


My Runtime application with a single layer
<esri:ArcGISLocalDynamicMapServiceLayer Path="V:\ch_test10.mpk" />

Error from client:

Failed to create service ch_test10 MapServer. Worker process 'ch_test10_host' exited while attempting to service request (attempt 1 of 1): endpoint='admin' headers={} params={filePath=v:\ch_test10.mpk, maxRecords=1000, name=ch_test10, outputDir=C:\Users\xroza03\AppData\Local\Temp\arcgisruntime_7556\ch_test10, type=MapServer, virtualDir=http://127.0.0.1:50001/FbthLk/outputdir/ch_test10} res='create' post=0 Crash dump path=C:\Users\xroza03\AppData\Local\Temp\ArcGISRuntimeErrorReports\arcgisruntime_10.1.0.2923_service_20120203_155617.dmp Error code: 500.




Thanks!
Robert
0 Kudos
RobertZargarian
New Contributor III
Hi,
I tried following without success.

Checked out data to a file gdb.

Deleted topology layers from the file gdb in ArcCatalog.

Got warning that topology is part of the replica and continued. Topology was deleted successfully.

Then I started an edit session to the file gdb and did some geoediting in ArcMap.Then I checked in file gdb. Success!

I did the same steps (checked out new data etc.)
Then I created mpk file to my file gdb which was without topology layers now.

Tied to do an easy editing with Runtime (my editing code worked well with file gdb and .mpk without option �??reference all data�?�) 

I could save edits (new point features).

Then I checked in my file gdb and my edits did not appear in my SDE version.

I can see edits I my file gdb and file gdb is checked in. But there are no any changes in my SDE geodatabese. (checkout version).

Please help me to solve this problem.
Can I use checkout->edit with Runtime->checkin workflow if I have topology layers in SDE geodatabase?
We have to use Topology layers for users that edit data with ArcMap.

If we can´t edit data when topology layers are present in file-gdb. Could we use
Checkout->remove topology layers(rules)-> edit with Runtime->checkin
(Last works with ArcMap but not with Runtime)  
Edits on featureclasses, that participate in topology rules I could not save edits at all.

Thanks!
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Apologies for the delay in replying - we're still investigating this issue as a high priority.


Regards

Mike
0 Kudos
RobertZargarian
New Contributor III
Hi,
Thank you for reply.
The main problem for us just now is that our main workflow (checkout->edit->check in) has not been verified working with ArcGIS Runtime correctly.
Could you say today that if we choose ArcGIS Runtime as platform for our new application then this workflow is going to work correctly in the release
version of ArcGIS Runtime?

Regards

Robert
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

We still have some more testing to do in relation to the topology and other GDB behaviours in order to be able to confirm that this is a fully supported workflow. We hope to be able to update you shortly, sorry for the delay.


Cheers

Mike
0 Kudos
RobertZargarian
New Contributor III
Hi,

I created a new thread for this question but it has to do with disconnected
editing that�??s why i copy it here too.
====================

When I create a map package in ArcMap there is a choice I can make
to �??Reference all data�?� even if you make a map package from a file geodatabase.
But in the �??Data management tools->Package-> package map�?� tool there is not this option.
My question is. Is it possible to create map package from a file geodatabase
with �??Reference all data�?� option without using ArcMap GUI?

We want to use the file gdb and package (.mpk) file further in disconnected editing.

If it is not possible to create map package with �??Reference all data�?� option
with �??package map�?� tool could it be done with ArcObjects programing and run from
ArcGIS server 10.1 as Server Object Extension (SOE)?

Thanks!
0 Kudos