ExtractChanges on Assignments Layer Generates Replica Sync Errors

1384
9
Jump to solution
08-17-2021 12:30 PM
TylerBragg2
Occasional Contributor II

I have a Workforce Project (newly created) for which I'm using Integromat to set up an automated process that is triggered by a completed Workforce Assignment.  In order to facilitate this process, I need to extract the attributes for the assignment that was just completed.  The process for creating the Integromat scenario to do this is outlined in a blog post entitled: Create a hosted feature service webhook

I've tested this process out on other layers and it works just fine; however, when attempting to set this up on the "assignments" layer for this workforce project, I keep encountering replica sync errors.  Specifically, my error is coming in when making a request to the StatusURL in an attempt to ExtractChanges, and my error reads as follows: "Unable to synchronize replica...Error in processing replica sync request."  

I can't seem to get past this problem in order to extract the needed attributes for my process.  Is this a known problem, or is there some setting that needs to be adjusted in order to allow the ExtractChanges function to execute properly on this assignment layer?  I'm assuming this has something to do with the layer being "sync enabled", but I wouldn't think this would be an issue. 

I've also noticed that when I go to the REST services directory for the workforce layer, click on "ExtractChanges" at the bottom, then view the StatusURL at the bottom of that page, it's showing that the status is "Failed" and there is an Error that says "Error in processing replica sync request."  

Any help or advice would be appreciated.  Thanks!

Tyler

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @TylerBragg2 

I am able to reproduce this using a new WF Project. I'll log an internal issue for this and get back to you. The feature service that Workforce creates, uses a special property related to how it syncs. I'm guessing this is related to that.

View solution in original post

9 Replies
by Anonymous User
Not applicable

Hi @TylerBragg2 

I am able to reproduce this using a new WF Project. I'll log an internal issue for this and get back to you. The feature service that Workforce creates, uses a special property related to how it syncs. I'm guessing this is related to that.

TylerBragg2
Occasional Contributor II

Thanks @Anonymous User!  I assume an "internal issue" could take quite some time to resolve?  Or does it depend?  

0 Kudos
by Anonymous User
Not applicable

It depends. This issue is with hosted feature services so it depends on that teams current priorities. The next update is planned for mid-to-late September. At this time, I don't know if the fix will be included in that update or not.

0 Kudos
TylerBragg2
Occasional Contributor II

Thanks for the info Aaron.  Sounds like it will be a waiting game then.  Do you have any recommendations for a workaround to extract the attributes from a feature in a Workforce assignments layer?  It would be so easy if the payload of the webhook would include, at a minimum, the objectid of the feature that was updated, but it doesn't give any specifics.  

I was just looking at the payload information as I'm typing this, and I see that it does give the "lastupdatedTime." Now I'm wondering if it would be feasible or reliable to use the HTTP module in Integromat to query the assignments layer for features with the same "lastupdatedTime."  There should only be one feature with that updated time, right?  Am I thinking correctly?  If I could query using that, then I could extract attributes for the feature with that exact updated time.   

0 Kudos
by Anonymous User
Not applicable

I don't have any good recommendations.

I don't think relying on the lastupdateTime will be reliable. The hosted service webhooks can return multiple edits so say a feature was added at 5:00:00 pm then another feature was added at 5:00:01pm. It's highly likely both feature will be returned in a single webhook event (based on the serverGens in the changesURL). So if you relied on the last update time, you likely would miss one of the features.

0 Kudos
TylerBragg2
Occasional Contributor II

That's exactly what I needed to know.  Thank you!

0 Kudos
TylerBragg2
Occasional Contributor II

@Anonymous User  I just wanted to follow up with you to let you know that I found a workaround for the problems I was having with Workforce.  It's a long story, but there were several issues with Workforce preventing me from doing all the specific things we want/need to do.  As a result, I ended up designing with an entire work order system from "scratch."  This system is based on one feature layer for "work orders."  I have three surveys built off that feature layer in Survey123, with each geared towards the specific user group that is involved (dispatchers, field workers, admins).  I built a "Dispatch Console" in Dashboards that functions as the primary access to work orders from the office (similar to the Workforce web app).  This console contains the dispatch survey, as well as an "edit mode" version of a different survey to allow editing of the data.  The field workers access the work orders from Field Maps with a simple map that shows new or in-progress work orders.  I configured the pop-up of this map to contain a link to the "edit version" of a third survey that allows them to collect all the data we need for that work order.  In addition to all this, I used Integromat to automate three different processes - First is to send a text to the field supervisors whenever a new work order is created, second is to automatically look for a certain "flag" field (yes or no) in the data and if "yes" it will create a specialized work order report (feature report) that we are required to submit to another agency, and third, you can manually trigger a report for any work order by selecting a different flag field in the dispatch console, then the report is created and is automatically uploaded to our Sharefile server (and a confirmation email is sent to certain staff).  One additional advantage this system provides is the ability to be able to dispatch a new work order from the field.  The same survey that the dispatchers use from the console can be used by the field supervisors right from their phones.  Very simple.  Our staff seems to be thrilled with it so far.  

 

I just wanted to pass this development along to you as some closure to the issues we had discussed and to let you know that this is possible to achieve a work order system similar to, but separate from Workforce, in the event you run into anyone else with a similar need.  I'd be happy to show you the system if you ever felt the need to see what I'm talking about.  

 

Thanks again for all your help previously.  

 

Tyler

by Anonymous User
Not applicable

Thanks Tyler, that sounds very interesting. We might reach out for more details in the future.

Coincidentally, I just verified the fix for the original issue you reported in our dev environment - features can now be successfully extracted from the feature services that Workforce creates. The fix will be available in a couple weeks with the next update of ArcGIS Online. For previously created Workforce feature services, you will need to toggle Change Tracking off/on to pick up the fix. For newly created feature services, it will just work.

0 Kudos
TylerBragg2
Occasional Contributor II

Ha! That's great!  That was much quicker than I expected, but that's a good thing.  Appreciate it Aaron.  

0 Kudos