SlideShare a Scribd company logo
1 of 7
Start Stop Mule Flow Using Java
We will use the Java Mule Context and Collable
Interface to start and stop the mule flow. We
have control on flow life cycle using mule
context. We can check life cycle of mule flow
and its different state
Start Stop Mule Flow Using Java -
Flow
Start Stop Mule Flow Using Java –
Flow Contd…
• Use HTTP Connector to receive request
• VM is used as out bound and also using “<file-
queue-store/>” for payload persistence
• Java component is used to start the flow
• Another flow
“startstoomuleflowusing_javaFlow1” worked as
in-bound VM with initialState="stopped“. So
mule will not start this flow on application
deployment
• We will use java component to start this flow
Start Stop Mule Flow Using Java -
XML
Start Stop Mule Flow Using Java -
Java
Start Stop Mule Flow Using Java –
Java Contd..
• Using “@Inject”(javax.inject.Inject) Annotation to get
the MuleContext(org.mule.api.MuleContext) Object
• Implements Callable (org.mule.api.lifecycle.Callable)
Interface
• Use MuleContext to get the
Flow(org.mule.construct.Flow) Object
“muleContext.getRegistry().get("startstoomuleflowus
ing_javaFlow1")”
• Use Flow Object to start the flow “flow.start()”
Start Stop Mule Flow Using Java –
Java Contd..
• Using “@Inject”(javax.inject.Inject) Annotation to get
the MuleContext(org.mule.api.MuleContext) Object
• Implements Callable (org.mule.api.lifecycle.Callable)
Interface
• Use MuleContext to get the
Flow(org.mule.construct.Flow) Object
“muleContext.getRegistry().get("startstoomuleflowus
ing_javaFlow1")”
• Use Flow Object to start the flow “flow.start()”

More Related Content

What's hot

What's hot (15)

Basic example using message properties component
Basic example using message properties componentBasic example using message properties component
Basic example using message properties component
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in mule
 
Single thread interface in servlet
Single thread interface in servletSingle thread interface in servlet
Single thread interface in servlet
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
 
Simple Java component in Mule
Simple Java component in MuleSimple Java component in Mule
Simple Java component in Mule
 
Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Groovy example in mule
Groovy example in muleGroovy example in mule
Groovy example in mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Map in Mule
Map in MuleMap in Mule
Map in Mule
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 
Simple groovy example in mule
Simple groovy example in muleSimple groovy example in mule
Simple groovy example in mule
 

Similar to Start stop mule flow using java

Similar to Start stop mule flow using java (20)

Servlets & jsp Overview
Servlets & jsp OverviewServlets & jsp Overview
Servlets & jsp Overview
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
 
Vm component
Vm componentVm component
Vm component
 
Vm component
Vm componentVm component
Vm component
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Vm Component
Vm ComponentVm Component
Vm Component
 
How to use vm component
How to use vm componentHow to use vm component
How to use vm component
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Applet Vs Servlet
Applet Vs ServletApplet Vs Servlet
Applet Vs Servlet
 
Basic example using vm component
Basic example using vm componentBasic example using vm component
Basic example using vm component
 
Servletand sessiontracking
Servletand sessiontrackingServletand sessiontracking
Servletand sessiontracking
 
IP UNIT III PPT.pptx
 IP UNIT III PPT.pptx IP UNIT III PPT.pptx
IP UNIT III PPT.pptx
 
Java in mule part 1
Java in mule part 1Java in mule part 1
Java in mule part 1
 
Ejb3.1 for the starter
Ejb3.1 for the starterEjb3.1 for the starter
Ejb3.1 for the starter
 
Camel manual-2.11.0
Camel manual-2.11.0Camel manual-2.11.0
Camel manual-2.11.0
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
 
Liit tyit sem 5 enterprise java unit 1 notes 2018
Liit tyit sem 5 enterprise java  unit 1 notes 2018 Liit tyit sem 5 enterprise java  unit 1 notes 2018
Liit tyit sem 5 enterprise java unit 1 notes 2018
 
Wt unit 3 server side technology
Wt unit 3 server side technologyWt unit 3 server side technology
Wt unit 3 server side technology
 

More from Sunil Kumar

Distributed Locking in Mule
Distributed Locking in MuleDistributed Locking in Mule
Distributed Locking in MuleSunil Kumar
 
IP Based Security Filter in Mule
IP Based Security Filter in MuleIP Based Security Filter in Mule
IP Based Security Filter in MuleSunil Kumar
 
Time based Security Filter in Mule
Time based Security Filter in MuleTime based Security Filter in Mule
Time based Security Filter in MuleSunil Kumar
 
Parallel processing for splitter in mule esb
Parallel processing for splitter in mule esbParallel processing for splitter in mule esb
Parallel processing for splitter in mule esbSunil Kumar
 
Custom transformer and annotation
Custom transformer and annotationCustom transformer and annotation
Custom transformer and annotationSunil Kumar
 
Custom processor
Custom processorCustom processor
Custom processorSunil Kumar
 
Signature Security mule
Signature Security muleSignature Security mule
Signature Security muleSunil Kumar
 

More from Sunil Kumar (8)

Distributed Locking in Mule
Distributed Locking in MuleDistributed Locking in Mule
Distributed Locking in Mule
 
IP Based Security Filter in Mule
IP Based Security Filter in MuleIP Based Security Filter in Mule
IP Based Security Filter in Mule
 
Time based Security Filter in Mule
Time based Security Filter in MuleTime based Security Filter in Mule
Time based Security Filter in Mule
 
Parallel processing for splitter in mule esb
Parallel processing for splitter in mule esbParallel processing for splitter in mule esb
Parallel processing for splitter in mule esb
 
Vm file store
Vm file storeVm file store
Vm file store
 
Custom transformer and annotation
Custom transformer and annotationCustom transformer and annotation
Custom transformer and annotation
 
Custom processor
Custom processorCustom processor
Custom processor
 
Signature Security mule
Signature Security muleSignature Security mule
Signature Security mule
 

Recently uploaded

Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseWSO2
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Recently uploaded (20)

Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Start stop mule flow using java

  • 1. Start Stop Mule Flow Using Java We will use the Java Mule Context and Collable Interface to start and stop the mule flow. We have control on flow life cycle using mule context. We can check life cycle of mule flow and its different state
  • 2. Start Stop Mule Flow Using Java - Flow
  • 3. Start Stop Mule Flow Using Java – Flow Contd… • Use HTTP Connector to receive request • VM is used as out bound and also using “<file- queue-store/>” for payload persistence • Java component is used to start the flow • Another flow “startstoomuleflowusing_javaFlow1” worked as in-bound VM with initialState="stopped“. So mule will not start this flow on application deployment • We will use java component to start this flow
  • 4. Start Stop Mule Flow Using Java - XML
  • 5. Start Stop Mule Flow Using Java - Java
  • 6. Start Stop Mule Flow Using Java – Java Contd.. • Using “@Inject”(javax.inject.Inject) Annotation to get the MuleContext(org.mule.api.MuleContext) Object • Implements Callable (org.mule.api.lifecycle.Callable) Interface • Use MuleContext to get the Flow(org.mule.construct.Flow) Object “muleContext.getRegistry().get("startstoomuleflowus ing_javaFlow1")” • Use Flow Object to start the flow “flow.start()”
  • 7. Start Stop Mule Flow Using Java – Java Contd.. • Using “@Inject”(javax.inject.Inject) Annotation to get the MuleContext(org.mule.api.MuleContext) Object • Implements Callable (org.mule.api.lifecycle.Callable) Interface • Use MuleContext to get the Flow(org.mule.construct.Flow) Object “muleContext.getRegistry().get("startstoomuleflowus ing_javaFlow1")” • Use Flow Object to start the flow “flow.start()”