【问题标题】:Azure Logic App error ActionResultsSizeLimitExceeded for filter array筛选器数组的 Azure 逻辑应用错误 ActionResultsSizeLimitExceeded
【发布时间】:2020-11-20 07:10:33
【问题描述】:

我们创建了一个逻辑应用,在其中我们使用通用数据服务(即列表记录)从 CRM 获取记录。

这将使用 For each 循环中的过滤器数组记录进一步的过滤器。 for-each 循环在 SQL Server 存储过程的结果上运行,结果返回 9000 多条记录。 List Record 操作返回来自 CRM 的所有记录,在 foreach 循环中我们通过添加条件过滤记录并返回结果。

对于为每条记录成功执行的每个循环,但在运行详细信息中,它显示过滤条件错误和逻辑应用程序失败并给出以下错误消息

{"code":"ActionResultsSizeLimitExceeded","message":"The action 'Filter_GSL_Status_by_Code' was executed for '9069' iterations resulting in an aggregated result size that exceeded the maximum value '209715200' bytes allowed. Please reduce the number of iterations to ensure that the aggregated results size is less than '209715200' bytes."}

【问题讨论】:

  • 过滤器似乎执行了太多次。过滤器的数据是什么?
  • 是的,为每个循环的每个记录执行的过滤器数组和每个循环执行多次,即目前我们从 Store 过程中获取超过 9000 条记录的 ResultSets
  • 我不明白...我们达到了哪个限制?聚合结果大小是多少?
  • 您的错误信息中已经说明了聚合结果大小的最大值,其大小为209715200字节。
  • Aggregated result size 好像是过滤操作后的结果大小

标签: azure-logic-apps common-data-service


【解决方案1】:

根据您的错误提示,过滤器无法突破自身的限制,所以您无法使用过滤器来解决您的问题。

也许您可以在逻辑应用中使用Inline Code 来过滤数组。在Inline Code内,需要使用javascript。

例如

数组:

[
  {
    "testKey1": "testValue1",
    "testKey2": "testValue2",
    "testKey3": 1
  },
  {
    "testKey1": "testValue11",
    "testKey2": "testValue22",
    "testKey3": 2
  },
  {
    "testKey1": "testValue3",
    "testKey2": "testValue3",
    "testKey3": 3
  },
  {
    "testKey1": "testValue4",
    "testKey2": "testValue4",
    "testKey3": 4
  }
]

Azure 逻辑应用工作流:

js代码:

var arr = <your-array>;
var resultArr = [];

for(var i=0; i<arr.length; i++){
    var item = arr[i];
    var key3 = item.testKey3;
    if(key3 > 2){
        resultArr.push(item);
    }
}

return resultArr;

顺便说一句,您需要将integration account 添加到您的逻辑应用中。

【讨论】:

    猜你喜欢
    • 2017-06-27
    • 2021-06-14
    • 2022-11-14
    • 2021-10-13
    • 1970-01-01
    • 1970-01-01
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多