mule basics

28
1

Transcript of mule basics

1

2

3

•  Note that a flow must have a message source, to provide message contents. Subsequently, a Mule message will get passed from its message source and through other message processors (mention this while the animation of messages and message processors plays).

•  Note that while a message source is often an inbound endpoint for a transport, this is not necessarily so. Instead, a message source can be a reference by a flow ref in a superflow, etc. In the case of a flow ref, the referenced flow can begin with any message processor.

•  Similarly, an outbound endpoint for a transport can end a flow – but for a subflow, this is not necessary – the message will be passed to the next message processor following a reference to this flow in its superflow. Typically, a flow with an outbound endpoint has a corresponding inbound endpoint as its message source.

4

Note as needed that the payload shown here contains XML representing an order and including an order id (<id>, here a truncated UUID), a customer id (<custId>, also a truncated UUID), and a total for line items in the order. The line items or other information would follow, where the ellipse is placed.

5

6

7

8

9

10

•  Basic use case involves: •  user inputs price request, with origin (e.g. SFO) and

destination (e.g. JFK) pair •  airline service outputs price if origin/destination pair is served,

error message otherwise •  in first lab, only one airline •  for subsequent labs, many airlines, and aggregation of price

information in message •  possibly different types of integration for different airlines •  airlines modeled in Mule just for lab

•  NB: labs are progressive! So please make sure to finish with a working lab, and don’t hesitate to ask for help.

11

12

•  All boxes are Message Processors (MPs) •  Endpoints are special type of message processor

13

14

15

7- CLICK > LAUNCH ARROW AND MULE STUDIO APPLICATION LOGO DOUBLE CLICK ON THE MULE STUDIO ICON . THIS WILL LAUNCH THE MULE STUDIO APPLICATION. CLICK> WORKSPACE SCREEN LAUNCH WITH HIGHLIGHT BOX AFTER THIS “WORKSPACE” CONFIGURATION TOOL WILL LAUNCH. THIS IS USED TO

7- CLICK > HIGHLIGHT BOX AROUND “NEW PROJECT ” Create your new project. CLICK > ARROW WITH LAUNCH OF THE “NEW MULE PROJECT” WINDOW. Name it whatever you would like, perhaps CloudHubProject1

7- MULE STUDIO WORK BENCH IS LAUNCHED. KEY SECTIONS OF Studio THAT WILL USED TODAY ARE “PACKAGE EXPLORER”, “OUTLINE”, “THE CONSOLE AREA”, “PALETTE” AND “THE CANVAS”. CLICK > HIGHLIGHT BOX AROUND “PACKAGE EXPLORER” You'll see all your files here it he project. Displays project folders and files in a tree format CLICK > ARROW AND HIGHLIGHT BOX AROUND “CONSOLE AREA” The console area will highlight problems in this view, other views will show you the running status and log of you application CLICK > ARROW AND HIGHLIGHT BOX AROUND “PALETTE” The palette is where all of our standard elements can be dragged from

7- Take a moment and find this on your screen You’ll see three elements

Note re Animations: •  Text sections and workflow diagram boxes appear together, as

instructor clicks (first click for Model, second click for Configure, etc.)

•  Note that project files can be copied by dragging and dropping, or imported using File > Import

21

Easy way to find HTTP is to type HTTP into the filter Box Drag the HTTP Endpoint Onto the Canvas The Defaults for the HTTP Endpoint are OK

22

Make sure to select the Java component not the Java transformer… These are different elements. Type Java into the Filter Box

23

•  Note that the … button can be used to browse packages to select the class

24

Easy way is again to type append into the Filter box

25

26

Notes to Trainer 1)  Some participants have things/firewalls/applications already running

on their computer on port 8081, they may need to change the port of their HTTP Endpoint

2)  Let THEM figure out how to use the application by pointing them towards the Java Component, do not just tell them the answer, we need to immediately establish a precedent for them thinking instead of asking questions

27

28