1

I've created a workitem to get information from some Revit files using Design Automation.

I'm using ngrok to get the callback request, sending it to localhost and process the information. The problem is every 2-5 minutes I'm getting the same information. The WorkItem status after getting that requests is not "Succeed", it's "InProgress".

To be clear, I'm not creating multiples WorkItems, just once. Do I missing a step?

Eduardo
  • 687
  • 1
  • 6
  • 24

1 Answers1

1

Could you share workitem id for one case that this may have happened? Could you also share your server's implementation of onComplete callback?

One of the common mistakes in implementing on Complete callback is not sending a correct status code back to caller 200 Success. If no code or incorrect code is sent DA has no way of knowing whether the callback succeeded and it will retry three times.

Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32
  • I think I'm doing something wrong not sending from (ngrok?) the corresponding status code 200 to the caller. About my server implementation, I'm just tunneling the request to my localhost and handling the information there, without responding anything to the caller. I need to figured out how to send that information back to the caller from ngrok. – Eduardo Jul 05 '23 at 18:40
  • Is that nodejs implementation or something else? Typically need to do `res.sendStatus(200);`. You can also test your callback by calling directly from `curl` or `Postman`. – Rahul Bhobe Jul 05 '23 at 18:44
  • 1
    Will try to do it from grok and will post the answer here if I have success. Thanks! – Eduardo Jul 05 '23 at 18:55
  • The problem was that I wasn't returning any status code to the caller. To handle the request I'm using Watson Server internally among with ngrok. So, from Watson Server I can just grand the http context and using it to send the response. – Eduardo Jul 05 '23 at 19:24
  • 1
    Yes thanks - the usual mistake! – Rahul Bhobe Jul 05 '23 at 19:25