I have two flows, Flow 1 and Flow 2.
Flow 1
flow 2
Question: flow 1 step 2 - groovy script can this is possible?
Yes it is possible as explained in this article: How To Stop Or Start Flows In Mule 4.x Programmatically
You will need to perform the following steps:
- Add the scripting module to your project if you haven't previously added it.
- Add a scripting with a script similar to below:
<scripting:execute engine="groovy" doc:name="Toggle flow"> <scripting:code> flow = registry.lookupByName("flowName").get(); if (flow.isStarted()) flow.stop() else flow.start() </scripting:code> </scripting:execute>
That Script will start the flow with name "flowName" if it is not started and stop it otherwise. Please replace "flowName" with the actual name of the flow you wish to start/stop or with a variable.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.