Why is webhook workflow not taken into considerati

2019-08-16 00:58发布

When I create a job, with a webhook for completion on https://developer.api.autodesk.com/modelderivative/v2/designdata/job the misc.workflow part is not taken into consideration.

This is the POST I use with postman (header only contains Authorization key):

{
 "input": {
     "urn": "{{Urn}}"
 },
 "output": {
    "formats": [
     {
         "type": "svf",
         "views": ["3d", "2d"]
     }]
 },
 "misc" : {
    "workflow" : "my-workflow-id"
 }
}

In the response, I have nothing related to the workflow, but job is trigerred, coming to an end with no activation of the hook.

When I trigger this job POST a second time, I now have the workflow taken into account in the POST response, but, too late, file is already converted:

...
    "misc": {
        "workflow": "my-workflow-id"
    }
...

My hook has been created like this:

{
 "callbackUrl": "https://9756f648.ngrok.io/callback",
 "scope": {
   "workflow": "my-workflow-id"
 }
}

and can be seen in the existing hooks :(https://developer.api.autodesk.com/webhooks/v1/systems/derivative/hooks)

{
"links": {
    "next": null
},
"data": [
    {
        "hookId": "d36ab2b0-5777-11e8-8097-eb863aa080ce",
        "tenant": "my-workflow-id",
        "callbackUrl": "http://9756f648.ngrok.io/callback",
        "createdBy": "tMfppWcTipLoLJtkqkGBNhA6Ot40yti5",
        "event": "extraction.finished",
        "createdDate": "2018-05-14T13:07:59.451+0000",
        "system": "derivative",
        "creatorType": "Application",
        "status": "active",
        "scope": {
            "workflow": "my-workflow-id"
        },
        "urn": "urn:adsk.webhooks:events.hook:d36ab2b0-5777-11e8-8097-eb863aa080ce",
        "__self__": "/systems/derivative/events/extraction.finished/hooks/d36ab2b0-5777-11e8-8097-eb863aa080ce"
    }
]
}

My question is: Why my hook is not taken for granted at job creation, and then never triggered?

Notes:

Thank you,

1条回答
可以哭但决不认输i
2楼-- · 2019-08-16 01:35

Coming back to the issue a few days after with same postman or node.js code hook is working pretty well. Maybe a bad setup from my side I miss, or ngrok-webhook got some issues at this particular time (since a few days before my question it was also working). I consider this question solve.

@Forge-team: that would be nice if we could have hook-trigger-history on forge side. This way, we would know which hook has been triggered, which could help investigation when we have no hook triggered, but expect one.

查看更多
登录 后发表回答