在 v3 上无需轮询即可完成通知工作项
Notification workitem completing without polling on v3
似乎有一种方法可以实现非轮询机制来完成本页所述的工作项:https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/basics/
但是我找不到使用 api 指定它的方法。我应该在工作项中定义什么以在特定端点上进行回调?
这是我已有的:
var workITem = new WorkItem
{
ActivityId = Services.ForgeService.CleanActivityId,
Arguments = new Dictionary<string, IArgument>
{
{
"dwg",
new XrefTreeArgument
{
Url = inputUrl,
Verb = Verb.Get
}
},
{
"results",
new XrefTreeArgument
{
Verb = Verb.Put,
Headers = new Dictionary<string, string>
{
{"Authorization", $"Bearer {token}"}
},
Url = outputUrl
}
}
}
};
谢谢。
罗曼,
请完成 LearnForge 教程
string callbackUrl = "Your Callback Url";
WorkItem workItemSpec = new WorkItem()
{
ActivityId = activityName,
Arguments = new Dictionary<string, IArgument>()
{
{ "inputFile", inputFileArgument },
{ "inputJson", inputJsonArgument },
{ "outputFile", outputFileArgument },
{ "onComplete", new XrefTreeArgument { Verb = Verb.Post, Url = callbackUrl } }
}
};
似乎有一种方法可以实现非轮询机制来完成本页所述的工作项:https://forge.autodesk.com/en/docs/design-automation/v3/developers_guide/basics/ 但是我找不到使用 api 指定它的方法。我应该在工作项中定义什么以在特定端点上进行回调?
这是我已有的:
var workITem = new WorkItem
{
ActivityId = Services.ForgeService.CleanActivityId,
Arguments = new Dictionary<string, IArgument>
{
{
"dwg",
new XrefTreeArgument
{
Url = inputUrl,
Verb = Verb.Get
}
},
{
"results",
new XrefTreeArgument
{
Verb = Verb.Put,
Headers = new Dictionary<string, string>
{
{"Authorization", $"Bearer {token}"}
},
Url = outputUrl
}
}
}
};
谢谢。
罗曼,
请完成 LearnForge 教程
string callbackUrl = "Your Callback Url";
WorkItem workItemSpec = new WorkItem()
{
ActivityId = activityName,
Arguments = new Dictionary<string, IArgument>()
{
{ "inputFile", inputFileArgument },
{ "inputJson", inputJsonArgument },
{ "outputFile", outputFileArgument },
{ "onComplete", new XrefTreeArgument { Verb = Verb.Post, Url = callbackUrl } }
}
};