Large JSON response for workflow for a Query task
Hi ,
I ran into an error while running a query task in my workflow. Below is the error from the log,
<Event Timestamp="2015-05-16T14:21:16.2452504+01:00" Level="WARN" Identity="Guest">
<Message>
Large JSON response for workflow 'test' (3003758 characters). Consider optimizing this workflow.
</Message>
</Event>
In the query task, I am trying to retrieve feature results from the published map service layer.
I am querying based on the results of a previous query task which gives a count of 1800+ results.
But when I hardcode the where clause with few values of same kind the workflow is working fine.
Please help me out here.
-
Hi,
I've been working on this issue. From what I understand, because of the large amount of query data that is being sent from and to server from workflow may be the problem.
Please tell me whether dividing a single workflow into multiple can solve the problem!
0 -
Hi Srikanth
I would suggest that it is more than may be the problem but rather is the problem as stated in the Warning message from the log.
You need to look at things like:
- do you need all of the fields returned by the query?
- do you need the geometry?
- do you need to pass it to the client at all? Remember every time that you switch from a server based activity to a client based activity ALL variables etc need to be bundled up and passed between environments.
- can you make use of a geoprocessing service to achieve what you need? ie pass some of the work off to a separate system
What is your workflow trying to achieve?
Regards
Ralph Price
0 -
Hi Ralph, thankyou for the reply.
Wat I am trying to achieve:
I am writing a custom workflow to acheieve tracing fuctionality over a water pipeline network. I will give a start point and a barrier point on the map using capture geometry. After this I will send this inputs as a GP REST service URL. I will get the featureset data as output. Converted all results into JSON string and using substring method I will get the objectIDs of the trace results. Using this data I will query on the map service and get respective featuresets to render them on map and display on a table.
Based on your reply, I reduced the number of fields returned based on requirement. But if I do not return the Geometry, result is not getting displayed on map (I am using UpdateGraphicsLayer activity and adding the results as a graphic layer).
Every other layer seems to work fine except the Addresses layer. When I tried to query this layer with 600 IDs using Query of map service in browser it returned results but the same is not working through Query task in workflow.
0 -
Hi Srikanth
I assume that you are doing the query against the address so that you can report the addresses that will be shut of if you turn off the water of something along those lines?
As far as drawing on the map the extent of the shutoff area could you make do with using the geometry of the featureset returned from the GP REST service as markup? rather than using the Graphics returned by the next query?
Would you like to post your workflow code?
Regards
Ralph
0 -
Hi Ralph,
I got the issue sorted out.
The problem is with the map query service which I am performing the query task on. All other query urls are querying on versioned databases which allowed me to query more tha 100 ObjectIDs at a time. The address query url is pointed to a non versioned data base because of which it is not allowing more than 1000 record searches at a time.
I have looped throuh the IDs which I am feeding to the query and it worked perfectly.
Thank you for your help. Your replies were a lot of help to me as I am still in learning stage in geocortex.
0 -
I guess you know you can change the MaxRecordCount property of the mapservice in ArcGIS Server?
0 -
Hi Srikanth
good to hear that you got it sorted.
Enjoy the learning
Regards
Ralph Price
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare