06_Events Flashcards

1
Q

What is the structure of the Mule 4 event?

A

Mule Message - data that passes through the flows in the app, contains Attributes and Payload. Mule Variables - metadata that is defined and reference in the app processing the event

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where is each of the data from the HTTP request populated in a Mule 4 Event?
HTTP request: Headers, Data.

A

Headers -> Attributes
Data -> Payload
(both in the MuleSoft Message)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is DataSense?

A

The ability to proactively discover metadata from internal and external resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

At design time in Anypoint Studio, what uses datasense?

A

Transform message component, DataSense explorer, when writing expressions using auto-completion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In Anypoint Studio where are the loffed values displayed?

A

Console View.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In apps that are deploted to CloudHub or customer-hosted runtimes where are the logged values displayed?

A

Log Files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What component creates logged values?

A

Logger component.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What can you add tto processors to step through the application when debugging?

A

Adding breakpoints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What port does the debugger listen for incoming TCP connections? Where can you change this?

A

localhost port 6666

in a project’s run configuration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 2 different types of DataWeave expressions?

A
Standalong scripts (Transform Megssage) and Inline expresssions (use #[] 
 - used to dynamically set the value of properties in an event processor or global configuration element) .
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What syntax is used to reference the Mule event payload?

A

[message.payload]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What syntax is used to reference the query parameter ‘frenchFries’?

A

[message.attributes.queryParams.frenchFries]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What syntax is used to reference the variable ‘hairyBikers’?

A

[vars.hairyBikers]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the 2 different syntaxs for referencing the ‘id’ which is in the Mule Event payload?

A
#[message.payload.id] OR 
#[message.payload['id']]

(you don’t always need the message.payload you can have it withou the message so you just have e.g. payload.id)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Syntax for a key:value pair (single value selector)?

A

[payload.key]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to reference a value of a selected array index?

A

[payload.value[index# e.g. 1]

17
Q

How to reference multi value selector of key:value pairs?

A
#[payload.*key] 
(will return all the key:value pairs of that specific key.
18
Q

What are each of the operators used in DW and examples?

A
Arithmetic (+,-,/,*), 
Equality ( ==, != ), 
Relational (>, >=. is),
Conditional (and, or, not), 
Type (as),
Default value (default)
19
Q

How are functions packaged in DataWeave?

A

Modules.

20
Q

A function that has 2 parameters can have alternative syntax, what are they?

A
#[contains(payload,max)]. 
#[payload contains "max"]
21
Q

What component do you need to set a variable in the Mule Event?

A

Set Variable.

22
Q

What view do you use when setting response data and request data for a HTTP Listener?

A

properties view