You are viewing limited content. For full access, please sign in.

Question

Question

Workflow HTTP Web Request GET - Data Loss?

asked on September 17, 2019

Hi

I'm retrieving data from an API. (The result when using Swagger attached - SwaggerResult.txt)

As you can see in the txt file, the result response is large, containing everything the endpoint consists of.

When using Laserfiche Workflow to do this; 

With the result as a txt file attached. (WorkflowResult.txt)

So I've noted when manually clicking "Test Request" it returns everything properly.

The result is the same as when using swagger or even Postman.

But when I run the Workflow the result in the txt file is what I have. Which appears to me like data loss.

The result is way smaller and the JSON isn't even closed off properly.

When I try to configure a Read JSON tool on this result, it keeps coming back empty, because the result from the GET is incomplete.

Any help would be awesome. 

Thanks

0 0

Answer

SELECTED ANSWER
replied on September 18, 2019

My manager seems to have solved the issue for me.

I do not know why Workflow would simply break when trying to return a single value in a JSON object/array.

But the fix was just to iterate through the results of my jpath expression result (Which seemed to be empty...):

0 0

Replies

replied on September 17, 2019

The Tokens tab in the instance details is not a good indicator for this. Tokens are truncated to 3700 characters for display. The full value is available to the runtime.

Something else must be going on with your Read JSON activity.

2 0
replied on September 17, 2019 Show version history

Fair enough to that, but why does it seem to work 150% in the Read JSON tool would you say? - See attached, MyJSONInput is what I am feeding the tool when the GET executes, and MyJSONOutput is the result when testing.

Here is what I see when testing:

My Xpath seems to be fine according to the doc I'm using. (https://goessner.net/articles/JsonPath/)
Am I doing the xpath wrong or something?

I mean here it returns a result for me. Trying to do only one result just to get it working. In this example it returns the status of the first invoice nicely from the API.

Yet..

Thanks.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.