Workflow Error When Clearing Table Results From Default Collection
Hi Everyone,
My situation is that I am querying a table at an Arc server endpoint and adding the results to the default collection using the "SelectFeatures" workflow task. The results are not spatial and are only used to look at values. That works fine the first time that the workflow runs. It also runs correctly every time I run it in the Workflow Designer.
My problem is that when ANY "SelectFeatures" task runs again and the "Clear Collection First" option is set to "True" then I get an error saying "WorkFlow Error: Object reference no set to an instance of an object.".
To me it looks like it is attempting to remove the non-spatial result from the default collection and in the process it is looking to remove something spatial from the feature like the graphic and it doesn't exist. I can run the workflow fine if I only let it add lines and points to the collection and run the same process.
Does anyone have any answers for what is going on here and how I can fix it?
-
Does it work if instead of the "Clear Collection First", you add a RunExternalCommand activity and use "ClearSelection" as the Command Name? I throw that in at the top of my workflow. I think in all cases I am clearing spatial data but thought I'd mention it in case it helps.
0 -
Hi Matt,
while I'm not sure exactly what's going on with your workflow, i can say that it sounds like you are passing an undefined object to the select features activity. This activity does have a debug property which you can turn on and see what's being passed in the viewer. That would be my first step to debug the issue.
The simulator tries to emulate the client as closely as possible, but there are times where an activity's ececution will be different. For example, the Get Map Service Info doesn't simulate well since the simulator has no concept of a site at all.
If the debug property on client side activites fail, I'd move onward to using Fiddler to examine what's being sent back and forth.
regards,
Edmond
0 -
Edmond, Using the debug it looks to be correct then after I click ok it proceeds to give me that error. Note that it isn't what I'm passing to the workflow activity which is causing the error since I can see every single entry in the collection and the data associated with it. It is definitely something going wrong when there is no spatial data on an entry in the default collection and "Clear Collection First" is True...if it is false then I don't get an error and the next feature set is appended to the collection. What ever function is called by "Clear Collection First" on the default collection is definitely the problem point here. I'm going to call bug on this one since it looks like the method is trying to clear a property on an object without checking if it is null or not first.
Steph, I tried your suggestion (although the external command to call was "RemoveCollectionById") and it works in the case that I use a named collection and not the default collection. So now my spatial and non-spatial data is added to the collection and displayed. I can view it and then when I run the workflow again it works as I would expect it to work. Thanks for the help.
0 -
I can verify this is a defect on GVS 1.10, and will file up to resolve, and will add your name as the stakeholder so that you will be notified when it is resolved.
When an error happens, check the GVS logging file (SHIFT -ESC-ESC), there is an null reference error on FeatureSetManager - FeaturSetCollectionChanged(), and I am verifying it is from a line 'if (fs.ID.Equals(this._activeFeatureSetId))'
0
Please sign in to leave a comment.
Comments
4 comments