DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • SRE vs. DevOps
  • Reactive Programming
  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide

Trending

  • SRE vs. DevOps
  • Reactive Programming
  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide

How to Include a Mule Call from Within a Camunda Process

Gabriel Dimech user avatar by
Gabriel Dimech
·
Oct. 29, 13 · Interview
Like (0)
Save
Tweet
Share
7.30K Views

Join the DZone community and get the full member experience.

Join For Free

Camunda is an open source BPM tool which has been forked from Activiti. Some of the differences between Activiti and Camunda, as well as advantages of using Camunda, may be found here and here.

After spending some time testing out Camunda, I decided to include a Mule call from within a Camunda process. This would be useful when designing processes which require information from external components, so as to be able to leverage Mule’s connectivity.

I decided to start with Camunda’s very good quick start guide, where you will be able to get a simple BPM process running in no time.

The following depicts the BPMN process for this example where a customer applies for a loan and this is to be approved. The service task points to the class “ProcessRequestDelegate” which is executed when processing the request:

camunda-1

Below is the processRequestdelegate class which makes an HTTP call to Mule via the Mule Client:

public class ProcessRequestDelegate implements JavaDelegate {

	private final static Logger LOGGER = Logger.getLogger("LOAN-REQUESTS");

	public void execute(DelegateExecution execution) throws Exception {
		LOGGER.info("Processing request by '"
				+ execution.getVariable("customerId"));

		// make rest call to mule	
		MuleClient client = new MuleClient(true);
		MuleMessage result = client.send("http://localhost:8082/mule/", "Message Payload", null);
		LOGGER.info("Result from mule is: " + result.getPayloadAsString());
	}
}

The following are two dependencies required in the Camunda application pom.xml file in order to make an HTTP Mule client call to Mule:

In Mule, a simple flow with an inbound HTTP endpoint has been created. This flow may be used to request any required information from external components.

 

Camunda

Published at DZone with permission of Gabriel Dimech, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • SRE vs. DevOps
  • Reactive Programming
  • How To Approach Java, Databases, and SQL [Video]
  • Building a Flask Web Application With Docker: A Step-by-Step Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: