Unable to see the JSON output when tried to fetch through Web Activity GET method (Connected to Form Recognizer API through Web Activity POST method initially)

Tej 146 Reputation points
2022-09-26T15:02:23.9+00:00

Hi,

I was able to connect to the Form Recognizer API successfully but when tried to fetch the JSON output through the Web Activity GET method (through dynamic URL the output was not reflecting even though the web activity was successful.

The URL am using in the WEB activity (third one from the picture below) is as below

@activity('ConnectToFormRecognizerAPI').output.ADFWebActivityResponseHeaders['operation-location']

The status was showing as running instead of succeeded. Please refer the sample screenshots below.

244872-image.png

244799-image.png

But when I use the hard coded URL which is coming from the second web activity, its showing the output as below.

244808-image.png

I want to generate the output dynamically using the expression, I do not want to hard code the value.

Could someone please assist on this?

@romungi-MSFT ,@ShaikMaheer-MSFT

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,437 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 42,761 Reputation points Microsoft Employee
    2022-09-27T08:13:07.72+00:00

    I don't think the issue is with the operation location. Analyze operation is an async API. If you run a GET request on the operation-location immediately then the analyze operation is submitted, it would still be running. You will have to define a retry logic to run GET until the request succeeds or use a wait activity in between the last two tasks and wait for 60 seconds and then call the GET activity. If analyze operation takes longer, you can always increase the wait time. Thanks!!

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful