Documente Academic
Documente Profesional
Documente Cultură
Goal
Postman
Service
with APIs
API
Spec
(RAML)
Anypoint Studio
1
7/30/17
Objectives
2
7/30/17
Mule 3 applications
• Mule 4 applications are built using components that are Mule event
processors
• Mule 3 applications are built using elements that are Mule message
processors
– Accept and process messages through a series of message processors
plugged together in a flow
Flow
Mule message
Outbound properties
Added by message processor
Attachments
Ancillary info to the message
3
7/30/17
4
7/30/17
Message source
Message processors
Error handling
Error Handling
5
7/30/17
Mule
Package Palette
Canvas
Explorer
Console
All contents © MuleSoft Inc. 11
Running applications
6
7/30/17
• Some options
– A browser
– A cURL command-line utility
– A browser extension like Postman (for Google Chrome)
7
7/30/17
8
7/30/17
Connectors
Scopes
Components
Transformers
Filters
Flow Control
Anypoint Connectors
9
7/30/17
Global elements
10
7/30/17
Message processors
• Connectors
– Connect to an external resources
• Scopes
– Wrap snippets of code to define fine-grained behavior
within a flow
• Components
– Execute specific logic upon a message, including custom-
logic in Java, JavaScript, Groovy, Python or Ruby
• Transformers
– Modify the values of part of a message
Message processors
• Filters
– Limit processing of messages based on set criteria
• Flow control
– Direct messages through different pathways in an
application depending upon content or other criteria
• Error handling
– Handle any errors that occur during message processing
11
7/30/17
Connecting to data
12
7/30/17
13
7/30/17
Transforming data
14
7/30/17
Complex transformations
• Starting with Mule 3.7, DataWeave can be used for all your
transformations
– From simple to complex
– No longer need to use most other transformers unless you want to use specific
Java frameworks
• Like JAXB, Jackson, org.w3c.dom
• To integrate with existing code bases or leverage existing skill sets
15
7/30/17
16
7/30/17
• You can create the interface manually or have it generated from the
API definition
– We will do both
All contents © MuleSoft Inc. 34
17
7/30/17
18
7/30/17
Introducing APIkit
19
7/30/17
• In an existing project
– Add a RAML file to the project
• Anypoint Platform > Import from
Design Center
– Or later, right-click and select Mule >
Generate Flows from REST API
• In a new project
– Specify a RAML file when you create
the project
– Can be local or on Anypoint Platform
20
7/30/17
21
7/30/17
Connecting interfaces to
implementations
22
7/30/17
23
7/30/17
Summary
24
7/30/17
25