使用 groovy 以编程方式启动 mule 流程 [英] Starting a mule flow programmatically using groovy

查看:21
本文介绍了使用 groovy 以编程方式启动 mule 流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过 HTTP 调用手动控制流的执行.

I need to control the execution of a flow manually through a HTTP call.

有人告诉我,我可以使用流上的 initialState="stopped" 属性禁止在启动期间执行流.(如何在启动后停止运行骡子流)

I have been told I can disable the flow from executing during startup using the initialState="stopped" attribute on the flow. (How to stop a mule flow from running after startup)

我需要知道如何使用 groovy 脚本启动回流.

I need to know how to start the flow back using a groovy script.

使用 mule 3.2.2.

Using mule 3.2.2.

推荐答案

应该这样做:

<scripting:component>
    <scripting:script engine="groovy">
        muleContext.registry.lookupFlowConstruct('targetFlow').start()
    </scripting:script>
</scripting:component>

这篇关于使用 groovy 以编程方式启动 mule 流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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