使用 GetQueue Item 时遇到错误

  • 原因:Get Queue Item 引发错误。错误代码为 502,错误消息为 job.faulted for job: AsyncCodeActivity.BeginExecute must return an IAsyncResult where IAsyncResult.AsyncState is the state object provided by the runtime. in Main.xaml at Throw “Throw” at Sequence “Body” at TryCatch “Try Catch” at Sequence “Main Sequence” at Main “Main” System.Exception: AsyncCodeActivity.BeginExecute must return an IAsyncResult where IAsyncResult.AsyncState is the state object provided by the runtime. at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

使用 getQueueItem 时遇到这个错误,该怎么解决?有人之前遇到过这个问题吗?

嗨,@Buvi_R 请使用 Get Transaction Item,而不是 Get Queue Items,并始终在处理前检查该项是否为 Nothing。这样可以避免大多数队列错误,让机器人更加可靠。

抱歉,是我弄错了,我只使用 Get Transaction Item。我们只有在这里才遇到这个问题。

嗨,@Buvi_R

你的 System 活动包版本是多少?

检查队列名称、文件夹和机器人权限。大多数错误都是由拼写错误、文件夹不正确、权限缺失或队列为空造成的。

如果能看到导致问题的工作流部分,也会有一点帮助。