I have am connected to our company portal and I have a serviceFeatureTable (onlineFeatureTable) that I set to one of my maps operationallayers and then regularly query and get results from it
onlineQueryID = serviceFeatureTableX.queryFeaturesWithFieldOptions(fieldsQueryParameters, Enums.QueryFeatureFieldsLoadAll);
This query normally returns results when its feature status is updated and Does Something with it
Connections {
target: onlineFeatureTable
onQueryFeaturesStatusChanged: {
if (onlineFeatureTable.queryFeaturesStatus === Enums.TaskStatusCompleted) {
Do Something
}
else if (onlineFeatureTable.queryFeaturesStatus === Enums.TaskStatusErrored){
ERROR
}
else
{
Enums.TaskStatusInProgress
}
}
}
This above normally works. But it seems that after about a half hour or so, my table never returns any results, I get the TaskStatusInProgress back from the Tables FeaturesStatusChanged Property, but never anything else. The only way I can get this to reset is to run the logic to rebuild my ServiceFeatureTable, but I never know when to do this. Is there a timeout or something on the ServiceFeatureTable that I can catch or monitor, or some status that I can get on the table to know if it is "Stagnant" in some way.
I am still working on this issue. It seems to happen that when I go offline (airplane mode) on my app, and then come back online, my servicefeaturetable seems to lose the connection and is unable to reestablish that connection. I know this because I can use the same definition query on that table and it works, but if I change the query no results are returned. I can also clear the cache on the table and no results are returned. I need a quick way to reestablish this connection or know that the connection or the table is not updating or syncing up any longer?
Is there someway in which I can tell the ServiceFeatureTable to "Reestablish connection"?
There's no way in the API to force reestablishing connection - once online again, the layer should work as expected automatically. Are you able to share a reproducer app that showcases the issue? If you have Esri Support, I suggest you contact them and they can help you work through the issue and get a bug logged in our system if there indeed is an issue - https://support.esri.com/en/contact-tech-support
It is simple to reproduce on our end. I just have a map with a number of layers. I set up a ServiceFeatureTable based on the .table of one of those layers. I use that layer to do a queryExpression and get some results. But if I take my phone to AirPlane mode and then back to nonAirPlane mode. I am no longer able to query that ServiceFeatrueTable with anything other than its cached values.
I think this might be more of a portal related issue? I am trying to reconnect to the portal and get a new token. I just set up a button to do this, so after I turn airplane mode off then on, i hit the button. I keep getting this error in the messages and i can't reconnect unless I shut down the app and reopen. Which is not an option for me. This is using the NetworkRequest functionality
void __cdecl NetworkAccessManagerAuth::invokeNetworkError(const class QUrl &,int,const class QString &) QUrl("https://cccccccccccxxxxx/arcgis/sharing/rest/generateToken") 99 "Network access is disabled."
QIODevice::read (QDisabledNetworkReply): device not open
ArcGIS.AppFramework.Network: void __cdecl NetworkRequest::setErrorCode(int) 99