本文介绍了为什么在创建模型衍生作业时不考虑 webhook 工作流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建作业时,使用 webhook 完成https://developer.api.autodesk.com/modelderivative/v2/designdata/job 不考虑 misc.workflow 部分.

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

这是我与邮递员一起使用的 POST(标题仅包含授权密钥):

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.

当我第二次触发这个作业 POST 时,我现在在 POST 响应中考虑了工作流,但是,为时已晚,文件已经转换:

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"
 }
}

并且可以在现有的钩子中看到:(https://developer.api.autodesk.com/webhooks/v1/systems/derivative/hooks)

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?

注意事项:

谢谢,

推荐答案

在使用相同的 postman 或 node.js 代码挂钩几天后回到这个问题上,效果很好.也许我错过了我这边的错误设置,或者 ngrok-webhook 在这个特定时间遇到了一些问题(因为在我提出问题的几天前它也有效).我认为这个问题可以解决.

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:如果我们可以在伪造方面拥有钩子触发历史,那就太好了.这样,我们就可以知道触发了哪个钩子,这有助于我们在没有钩子触发但期望有一个钩子时进行调查.

@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.

这篇关于为什么在创建模型衍生作业时不考虑 webhook 工作流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 07:12