简体   繁体   English

如何在node-red中串行处理数组的元素?

[英]How to process elements of an array serially in node-red?

Here is the scenario - 这是场景-

  1. In flow1 we run a sql query to retrieve some rows ordered by timestamp 在flow1中,我们运行sql查询以检索按时间戳排序的一些行
  2. Flow2 defines a sequence of API calls , so this flow executes asynchronously Flow2定义了一系列API调用,因此该流异步执行
  3. For each result in flow1 , we need to invoke flow2 "synchronously" , ie next element should be processed only when execution of flow2 has comepleted for previous element 对于flow1中的每个结果,我们需要“同步”调用flow2,即,仅当flow2的执行已完成前一个元素的处理时才应处理下一个元素

With the split and join solution, the order can not be guaranteed. 使用拆分和合并解决方案,不能保证顺序。

What could be the simplest way to handle this scenario ? 处理这种情况的最简单方法是什么?

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

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