简体   繁体   English

我正在尝试从 Autodesk Forge workflow.transition 事件接收 webhook,但它们没有触发

[英]I'm trying to receive a webhook from an Autodesk Forge workflow.transition event but they aren't firing

I've been experimenting with the Fusion Lifecycle webhooks in Forge and have been successful using the item created/updated events but the workflow transition webhooks aren't firing.我一直在 Forge 中试验 Fusion Lifecycle webhooks,并成功使用项目创建/更新事件,但工作流转换 webhooks 没有触发。

The webhooks are created in Forge according to the Docs , as you can see below, but none of the transitions performed in the workspace will trigger the call. webhook 是根据Docs在 Forge 中创建的,如下所示,但在工作区中执行的任何转换都不会触发调用。

They were created using a three-legged token associated with a Fusion Lifecycle user that has the proper workflow permissions on the workspace.它们是使用与 Fusion Lifecycle 用户关联的三足令牌创建的,该用户对工作区具有适当的工作流权限。

The following JSON excerpt is the workflow.以下 JSON 摘录是工作流程。 transition webhook as returned from developer.api.autodesk.com/webhooks/v1/hooks endpoint on Forge showing it was indeed created.从 Forge 上的 developer.api.autodesk.com/webhooks/v1/hooks 端点返回的转换 webhook 显示它确实已创建。

{ "hookId": "909fd040-4e34-11ea-a842-651c9013b5e8", "tenant": "TENANTNAMEREMOVED4SO", "callbackUrl": "callbackurl removed for SO", "createdBy": "46FGNL6DBN6D", "event": "workflow.transition", "createdDate": "2020-02-13T07:43:45.988+0000", "system": "adsk.flc.production", "creatorType": "O2User", "status": "active", "scope": { "workflow.transition": "urn:adsk.plm:tenant.workspace.workflow.transition:TENANTNAMEREMOVED4SO.119.1.765" }, "hookAttribute": { "creator": "D3 Forge Playground", "notification": { "class": "alert-danger", "system": "flc" } }, "urn": "urn:adsk.webhooks:events.hook:909fd040-4e34-11ea-a842-651c9013b5e8", "__self__": "/systems/adsk.flc.production/events/workflow.transition/hooks/909fd040-4e34-11ea-a842-651c9013b5e8" } { "hookId": "909fd040-4e34-11ea-a842-651c9013b5e8", "tenant": "TENANTNAMEREMOVED4SO", "callbackUrl": "callbackurl removed for SO", "createdBy": "46FGNL6DBN6D", "event": "workflow.transition", "createdDate": "2020-02-13T07:43:45.988+0000", "system": "adsk.flc.production", "creatorType": "O2User", "status": "active", "scope": { "workflow.transition": "urn:adsk.plm:tenant.workspace.workflow.transition:TENANTNAMEREMOVED4SO.119.1.765" }, "hookAttribute": { "creator": "D3 Forge Playground", "notification": { "class": "alert-danger", "system": "flc" } }, "urn": "urn:adsk.webhooks:events.hook:909fd040-4e34-11ea-a842-651c9013b5e8", "__self__": "/systems/adsk.flc.production/events/workflow.transition/hooks/909fd040-4e34-11ea-a842-651c9013b5e8" }

I've pushed the workflow through the transition events numerous times and no webhook is being fired and no failed requests on our webhook receiving server either.我已经多次通过转换事件推动工作流程,并且没有触发 webhook,我们的 webhook 接收服务器上也没有失败的请求。 if I mimic the payload for the workflow.如果我模仿工作流的有效负载。 transition event and post it to our endpoint, it is received as expected.转换事件并将其发布到我们的端点,它按预期接收。

I have yet to see a live example of the workflow.我还没有看到工作流程的现场示例。 transition webhook being fired and can't find any sample code from Autodesk using them.转换 webhook 被触发,并且无法从 Autodesk 找到任何使用它们的示例代码。 Not sure the service is even working as expected at this point even though the item.created and item.updated webhook events seem to work fine.尽管 item.created 和 item.updated webhook 事件似乎工作正常,但此时仍不确定该服务是否按预期工作。

Has anyone successfully received a workflow.有没有人成功收到工作流。 transition webhook from Autodesk Forge?从 Autodesk Forge 过渡 webhook? If yes, could you provide some guidance on how?如果是,您能否提供一些指导?

Seems to be working fine on my end in a Production tenant.在我的生产租户中似乎工作正常。 This is the payload I used to create the webhook:这是我用来创建 webhook 的负载:

{
    "callbackUrl": "https://webhook.site/SOME_ID",
    "scope": {
        "workflow.transition": "urn:adsk.plm:tenant.workspace.workflow.transition:TENANT.107.1.421"
    }
}

Does it look like the payload you used when creating the hook?它看起来像您在创建钩子时使用的有效负载吗?

Greg, any chance you can try to trigger it again, and send me the date/time stamp with tenant name via a private message?格雷格,你有没有机会尝试再次触发它,并通过私人消息向我发送带有租户姓名的日期/时间戳? I just tried it again in my Production tenant, and it seems to be working just fine when I perform the operation from both a v3 API call, and the UI.我刚刚在我的生产租户中再次尝试了它,当我从 v3 API 调用和 UI 执行操作时,它似乎工作得很好。 Feel free to file a support case if you want, too, and let me know the case number.如果您愿意,也可以随时提交支持案例,并告诉我案例编号。 I'd like to help you out here in understanding what's going on, because overall it looks OK from your side.我想在这里帮助您了解正在发生的事情,因为从您的角度来看总体上看起来不错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM