Mule 3.5.0-如何按顺序运行流 [英] Mule 3.5.0 - How to run flows in sequence

查看:110
本文介绍了Mule 3.5.0-如何按顺序运行流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Mule应用程序中有两个流程,希望依次运行,以尝试实现以下目标:

I have two flows in my Mule application that I wish to run in sequence in order to try and achieve the following:

  1. 第一个流程从文件中读取信息并在数据库中创建行
  2. 第二个流程从另一个文件读取信息并更新同一数据库中的行

两个文件都同时放置在相同的位置.在Mule I中有没有一种简单的方法可以限制第二个流的运行直到第一个流完成?我对Mule非常陌生,所以请原谅潜在的新手问题!预先感谢.

Both files are dropped in the same location at the same time. Is there a simple way in Mule I can restrict the second flow from running until the first has completed? I'm very new to Mule so please excuse the potentially novice question! Thanks in advance.

推荐答案

  • 在第一个流的文件入站端点上使用过滤器,以便它仅选择针对其自身的文件,而不是第二个流的文件.
  • 在第一个流程结束时,请对第二个流程进行引用.
  • 确保第一个流同步执行,否则其中的JDBC操作可能在调用第二个流之后发生.
  • 在第二个流程中,使用请求者模块来检索第二个文件
  • 处理...
    • Use a filter on the file inbound endpoint of the first flow so it picks only the file intended for itself, not the files for the second flow.
    • At the end of the first flow, flow-ref the second flow.
    • Make sure the first flow executes synchronously otherwise the JDBC operation in it may happen after the call to the second flow.
    • In the second flow, use the requester module to retrieve the second file.
    • Process it...
    • 这篇关于Mule 3.5.0-如何按顺序运行流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆