MULESOFT INTEGRATION ARCHITECT SESSION 03

01:17:03
https://www.youtube.com/watch?v=N1mf7HwsLcw

摘要

TLDRThe video serves as an introductory session on MuleSoft, focusing on essential concepts like Mule events, Mule message structure, attributes, and event processors. It explains the creation and composition of a Mule event, covering elements like headers, payloads, and variables. The session also discusses syntax for accessing data from these elements and differentiates between user-defined and predefined variables. Additionally, the video provides insight into best practices for organizing MuleSoft projects, detailing folder structures and the purpose of different directories such as SRC main mule, Java, and resources for configurations and data storage. It highlights key features of Anypoint Studio, the development environment for MuleSoft, and important components like Global Elements and Mule Palette. Discussion extends to error handling through the Mule error object, providing a breakdown of error attributes for issue identification. The video wraps up by discussing Mule Domain projects for shared resources in on-premise deployments and contrasts this with cloud deployments like CloudHub, detailing pros and cons about shared and isolated resources.

心得

  • 🧑‍🏫 Understand basic concepts of MuleSoft before diving into architecture.
  • 📝 Mule events are composed of messages and variables, with detailed breakdowns.
  • 🎯 URI parameters are used for unique identifiers in APIs.
  • 📂 Proper folder structure and best practices enhance project clarity.
  • 🛠️ Key tools in Anypoint Studio include Global Elements and Mule Palette.
  • 🔍 Syntax for accessing data from payloads, headers, and variables.
  • ⚠️ Error handling involves Mule error objects with descriptive details.
  • 🔗 Mule Domain projects are useful for shared resources, mainly in on-prem setups.
  • 💡 Importance of differentiating predefined and user-defined variables.
  • 🔧 Explore flexible error identification using description attributes.

时间轴

  • 00:00:00 - 00:05:00

    The video discusses the process of learning Mulesoft, starting with basic concepts and progressively moving to advanced topics, emphasizing the importance of understanding the basics for a deep understanding of Mulesoft architecture. The initial focus is on Mule events and their structure, including mule messages, variables, attributes, headers, query parameters, and URL parameters.

  • 00:05:00 - 00:10:00

    Explanation of the creation and processing of Mule events begins with an event source or listener, which triggers the creation of a Mule event. This event contains attributes like headers, query parameters, and URL parameters, and a payload containing the request body. Variable creation during processing is also discussed, along with syntax for retrieving data from payloads and headers.

  • 00:10:00 - 00:15:00

    Further elaboration on retrieving data using correct syntax is provided, emphasizing the structure of mule message accessing parts like attributes and payload, including their direct access and through messages. Additionally, the retrieval of variables using specific syntax is clarified, explaining that variables are not a part of the mule message.

  • 00:15:00 - 00:20:00

    Discussion moves to processing of Mule events across components, illustrating how an event moves through a Mule application, starting with creation, and being passed to various event processors that may update its contents. A scenario with scatter-gather and choice router components is used to explain how the same Mule event is processed across different paths.

  • 00:20:00 - 00:25:00

    The use of scatter-gather is clarified where the same Mule event is passed to all branches without splitting, unlike choice router which sends the event to a single branch based on conditions. This segment ensures an understanding of event propagation in different processing components.

  • 00:25:00 - 00:30:00

    The video transitions to discussing Mule message contents, describing the attributes and payload components, and explains how different data types should be placed in each part adhering to API governance principles, such as unique identifiers in URI parameters and filter conditions in query parameters.

  • 00:30:00 - 00:35:00

    The next section delves into detailing the types of data meant for different components of a Mule message, including use of header for metadata like tokens and security codes. Mule message structures for conveying data about API requests and responses are explored, highlighting best practices for data organization in payloads, headers, and attributes.

  • 00:35:00 - 00:40:00

    Variable handling in Mule events is detailed further, distinguishing between user-defined variables created in set components and predefined variables like flow and mule that provide information about the environment and runtime. Real-world examples in Anypoint Studio are used to illustrate setting and retrieving these variables.

  • 00:40:00 - 00:45:00

    Attention is shifted to predefined variables and their practical uses, primarily in logging. Variables like flow.name and mule.version are mentioned, elucidating their role in capturing runtime and application details beneficial for debugging and monitoring applications.

  • 00:45:00 - 00:50:00

    A concise segment explains that predefined error objects are created during application errors, detailing available child elements like description and type for capturing error information. Variables specific to on-premises deployments are also discussed regarding shared resources and domain projects.

  • 00:50:00 - 00:55:00

    The necessity of using a Mule domain is explained, albeit only applicable to on-premises deployments, highlighting its suitability for shared resources setup. The differences between cloud and on-premises Mule deployments are also drawn, explaining resource usage and impacts on application scaling and management.

  • 00:55:00 - 01:00:00

    The video diverges into understanding the structure of Anypoint Studio, its various tabs, and their functions like Mule message flow, configuration XML, and the Global Elements tab for setting component configurations. Also included are tabs for properties, logging, and debugging, crucial for a developer's workflow.

  • 01:00:00 - 01:05:00

    AnyPoint Studio features a breakdown of different views like package explorer, console, and problems tab that developers use to manage projects and troubleshoot. The utility of the Mule palette for accessing components and the essential run configurations for testing are also addressed.

  • 01:05:00 - 01:10:00

    Discussion advances into a detailed look at the project's folder structure within Anypoint Studio, emphasizing best practices for naming conventions, versioning of APIs, and organizing different parts like the main, resources, and configuration files for efficiency in development and maintenance of Mule applications.

  • 01:10:00 - 01:17:03

    The closing segment covers additional files like pom.xml, outlining its role in managing dependencies for Mavenized Mule projects and elucidates how project structures align with best practices for maintaining organized, efficient, and scalable MuleSoft applications.

显示更多

思维导图

Mind Map

常见问题

  • What are the basic components of a Mule event?

    A Mule event consists of a Mule message and variables, where the Mule message is further divided into attributes and payload.

  • How is a Mule event created?

    A Mule event is created when an event source, like a listener, triggers an API call.

  • What is the purpose of URI parameters?

    URI parameters are used to pass unique identifiers to the API, such as customer ID for retrieving customer information.

  • What data is contained in a payload?

    A payload contains the actual processing data required for the API operation, such as customer details for creation or update.

  • What are the types of variables in MuleSoft?

    There are user-defined variables created using the set variable component and predefined variables like flow.name or mule.version.

  • How does MuleSoft handle errors?

    MuleSoft generates a Mule error object containing details like error description, detailed description, type, cause, and message.

  • What are the key tabs in Anypoint Studio?

    Key tabs include Mule Message Flow tab, Global Elements for configurations, Configuration XML for source code, Package Explorer, Mule Palette, Property Tab, Console Tab, Problem Tab, and Debugger.

  • What information is stored in the log4j file in MuleSoft?

    It contains logging details, such as where logs are stored and what level of logs (info, debug, etc.) to display.

查看更多视频摘要

即时访问由人工智能支持的免费 YouTube 视频摘要!
字幕
en
自动滚动:
  • 00:00:02
    so initial like maybe two three class we
  • 00:00:05
    will have discussion of basic concepts
  • 00:00:07
    in mulesoft
  • 00:00:09
    okay and then
  • 00:00:12
    slowly we will move for advanced concept
  • 00:00:15
    okay
  • 00:00:16
    since if you want to get uh
  • 00:00:18
    uh deep understanding of mulesoft to
  • 00:00:22
    understand mulesoft architect
  • 00:00:24
    like first you need to have good
  • 00:00:26
    understanding of basic things also okay
  • 00:00:30
    so today like uh
  • 00:00:33
    we will discuss about mule event okay
  • 00:00:37
    so whenever we start any mule processing
  • 00:00:48
    okay whenever we start an email
  • 00:00:50
    processing
  • 00:00:51
    so first thing
  • 00:00:54
    what it will do it will create new event
  • 00:00:57
    okay and mule event contains
  • 00:01:02
    multiple uh things
  • 00:01:07
    first mule message and then variable
  • 00:01:11
    okay
  • 00:01:13
    inside mule message again it's uh like
  • 00:01:16
    divided into two part one each attribute
  • 00:01:19
    and another one is payload
  • 00:01:21
    okay and this attribute is further
  • 00:01:23
    divided into three part one is header
  • 00:01:26
    another one is query parameter and then
  • 00:01:29
    URL parameter
  • 00:01:32
    okay
  • 00:01:33
    so how how and when exactly this mule
  • 00:01:37
    event will be created so let's say this
  • 00:01:39
    is your mule application okay here you
  • 00:01:42
    have Event Source or you can say
  • 00:01:45
    listener
  • 00:01:47
    and then you have mule processor event
  • 00:01:50
    processor it can be anything it can be
  • 00:01:53
    Choice router it can be set variable it
  • 00:01:56
    can be
  • 00:01:57
    blogger
  • 00:02:04
    all of these are knowledge event
  • 00:02:06
    processor it can be HTTP requester also
  • 00:02:09
    okay
  • 00:02:11
    so
  • 00:02:12
    what happened like whenever request will
  • 00:02:15
    come someone will trigger your API
  • 00:02:19
    so who will listen that request
  • 00:02:22
    so request will be listened by event
  • 00:02:25
    suits
  • 00:02:26
    okay
  • 00:02:28
    now
  • 00:02:29
    once this event Source will be triggered
  • 00:02:32
    one mule event will be created
  • 00:02:35
    okay and he will capture all this
  • 00:02:37
    information here inside this mule event
  • 00:02:40
    so whatever as a input whatever header
  • 00:02:44
    query parameter you are a parameter this
  • 00:02:48
    event Source will receive
  • 00:02:50
    it will be
  • 00:02:52
    stored inside attributes
  • 00:02:54
    and whatever
  • 00:02:55
    request body
  • 00:02:57
    this event Source will receive that will
  • 00:03:00
    be stored inside payload
  • 00:03:03
    okay and during this processing whatever
  • 00:03:07
    variables will be created that will be
  • 00:03:09
    stored inside this variable
  • 00:03:13
    okay now can anyone tell me like uh what
  • 00:03:17
    all possible syntax we have to reach to
  • 00:03:21
    retrieve data from this payload
  • 00:03:28
    foreign
  • 00:03:37
    data from header any header so what all
  • 00:03:41
    possible syntax we can have okay let me
  • 00:03:44
    open notepad also
  • 00:03:49
    [Music]
  • 00:03:52
    if you want to get a payload we can get
  • 00:03:54
    hash payload we can mention it that is
  • 00:03:56
    the volume one option to get a payload
  • 00:03:59
    okay okay so you are saying for payload
  • 00:04:04
    yeah we have
  • 00:04:07
    s
  • 00:04:10
    payload okay
  • 00:04:13
    what about headers
  • 00:04:15
    if
  • 00:04:18
    if I want to retrieve any particular
  • 00:04:20
    header
  • 00:04:22
    and what will be syntax
  • 00:04:26
    Curry pants
  • 00:04:29
    let's go require parameters
  • 00:04:32
    yeah no I I want to retrieve any
  • 00:04:34
    particular header so what will be syntax
  • 00:04:36
    it reads that it bits that
  • 00:04:40
    attributes Dot
  • 00:04:44
    a does
  • 00:04:47
    yeah
  • 00:04:50
    so any other syntax I want to retrieve
  • 00:04:53
    this payload is there any other way I
  • 00:04:55
    can retrieve and for header also is
  • 00:04:58
    there any any other syntax we can use to
  • 00:05:00
    retrieve yeah message Dot
  • 00:05:04
    messages
  • 00:05:06
    for payload message that like whole
  • 00:05:09
    message we need to take I mean that we
  • 00:05:11
    can get payload
  • 00:05:13
    message dot preload
  • 00:05:16
    yes since
  • 00:05:19
    this payload is child of message okay
  • 00:05:24
    so and then you can write sing simple
  • 00:05:28
    payload or you can write payload message
  • 00:05:31
    dot period okay both are correct syntax
  • 00:05:34
    only
  • 00:05:37
    both syntax
  • 00:05:39
    since this payload is part of message
  • 00:05:41
    same way
  • 00:05:42
    just activate
  • 00:05:47
    this attribute is also part of message
  • 00:05:50
    so either you can write the syntax or
  • 00:05:53
    you can write
  • 00:06:02
    message dot attributes dot header dot
  • 00:06:05
    hidden
  • 00:06:06
    same way we you can write for query
  • 00:06:09
    parameter URL
  • 00:06:12
    okay
  • 00:06:13
    but if I want to retrieve data from
  • 00:06:15
    variable
  • 00:06:19
    so in that case what will be our syntax
  • 00:06:25
    where's
  • 00:06:28
    dot variable name
  • 00:06:32
    is there any other Syntax for this
  • 00:06:39
    can we put message dot verse dot
  • 00:06:42
    variable name
  • 00:06:44
    I don't think so because of message uh
  • 00:06:46
    block contains only attributes and
  • 00:06:49
    payload only variable
  • 00:06:52
    yes correct
  • 00:06:54
    so here you can see inside mule event we
  • 00:06:57
    have mule message and variable
  • 00:06:59
    variable is not part of mule message
  • 00:07:02
    it's accepted component
  • 00:07:04
    Okay so
  • 00:07:06
    mule message content attributes and
  • 00:07:08
    payload so whenever you want to retrieve
  • 00:07:11
    attribute or preload either you can
  • 00:07:13
    start directly from attributes
  • 00:07:16
    power directly from payload or you can
  • 00:07:19
    put message dot attributes or
  • 00:07:22
    message.payloots of message dot payload
  • 00:07:28
    okay hope everyone is clear and when
  • 00:07:31
    this new event will be created whenever
  • 00:07:33
    your mule
  • 00:07:35
    application processing like neural
  • 00:07:38
    processing mule application processing
  • 00:07:40
    will start
  • 00:07:42
    okay whenever it will trigger your Event
  • 00:07:44
    Source Event Source will create this new
  • 00:07:46
    event and this mule event will move from
  • 00:07:49
    one component to another component so
  • 00:07:51
    here you can see
  • 00:07:53
    in this event source
  • 00:07:55
    just after this mule event got created
  • 00:07:57
    and now this mule event is passing like
  • 00:08:00
    it will go to this event processor here
  • 00:08:04
    this event processor may or may not
  • 00:08:06
    update this mule event and then it will
  • 00:08:09
    go for same new event like
  • 00:08:12
    updated or if if you are updating then
  • 00:08:15
    updated mule event will be
  • 00:08:17
    moved to this next event processor
  • 00:08:24
    okay
  • 00:08:25
    Now can anyone tell me like if we have
  • 00:08:28
    batch processing here let's let's create
  • 00:08:30
    one diagram
  • 00:09:16
    okay let's say
  • 00:09:18
    this this one is our
  • 00:09:23
    event
  • 00:09:25
    source
  • 00:09:31
    before that like let's say
  • 00:09:37
    this is our new application
  • 00:09:43
    this is our Event Source
  • 00:09:53
    event
  • 00:09:55
    processor
  • 00:10:01
    and after this
  • 00:10:46
    okay we have scatter together component
  • 00:10:49
    we have three event processor
  • 00:10:51
    okay
  • 00:10:53
    so here we have one mule event
  • 00:10:58
    okay
  • 00:11:00
    let's say one new event got created here
  • 00:11:10
    okay now what will happen with this okay
  • 00:11:14
    let's say here
  • 00:11:16
    we have new event one okay
  • 00:11:19
    we live in one means mule event having
  • 00:11:21
    some data and this set of data got
  • 00:11:25
    updated here and now at this place we
  • 00:11:28
    have
  • 00:11:30
    mule event 2.
  • 00:11:33
    this same mule event is there but data
  • 00:11:36
    got updated now what will be like a mule
  • 00:11:40
    event value here it will be merely going
  • 00:11:42
    to 1 or mule event 2 on this place
  • 00:11:52
    it will split it right the event will be
  • 00:11:55
    splited
  • 00:11:56
    event will be splitted into it this
  • 00:11:59
    three
  • 00:12:00
    yes
  • 00:12:01
    anyone else want to answer this
  • 00:12:04
    [Music]
  • 00:12:11
    I think the same new event will be all
  • 00:12:14
    in three yeah and the response will be
  • 00:12:16
    an array of linked lists something
  • 00:12:19
    now this same mule event will be passed
  • 00:12:22
    to all three branch
  • 00:12:28
    okay
  • 00:12:29
    so whenever we have scatter gather
  • 00:12:33
    okay so same mule event will be
  • 00:12:35
    transferred for each branch okay it will
  • 00:12:37
    not be splitted
  • 00:12:39
    same copy of mule event will be sent to
  • 00:12:41
    each branch
  • 00:12:44
    okay and if it will be Choice router
  • 00:12:47
    then what will happen
  • 00:12:53
    let's say instead of this it would be
  • 00:12:56
    either A or B right based on the choice
  • 00:12:59
    like whichever condition is satisfied
  • 00:13:03
    yes so what will happen let's say this
  • 00:13:06
    condition satisfied so same copy of mule
  • 00:13:09
    event will be sent to this
  • 00:13:19
    [Music]
  • 00:13:43
    and if it will satisfy default one then
  • 00:13:46
    same copy of mule event will go to
  • 00:13:48
    default one
  • 00:13:50
    okay
  • 00:13:52
    so hope everyone clear with this new
  • 00:13:54
    element anyone has any doubt quickly let
  • 00:13:56
    me know
  • 00:14:17
    yeah we are okay
  • 00:14:19
    okay let me save this
  • 00:14:24
    reference it will be helpful
  • 00:14:51
    okay
  • 00:14:57
    so we discussed like mule message so
  • 00:15:00
    mule message contain two part attribute
  • 00:15:02
    and payload and inside attributes we
  • 00:15:05
    have query parameter URI parameter and
  • 00:15:07
    sorry and header
  • 00:15:09
    okay to access query parameter it will
  • 00:15:13
    be attributes dot query params to access
  • 00:15:16
    URI parameter attributes dot URI params
  • 00:15:20
    and to access header syntax will be
  • 00:15:23
    attributes dot heater
  • 00:15:26
    okay and inside payload you will pass
  • 00:15:29
    actual payload body message okay now can
  • 00:15:33
    anyone tell me like what kind of data we
  • 00:15:35
    will pass inside payload what kind of
  • 00:15:37
    data we will pass inside at URI
  • 00:15:40
    parameter what kind of data we will pass
  • 00:15:42
    in query parameter and what kind of data
  • 00:15:44
    we will pass inside here
  • 00:15:47
    okay you can pass any data to anyone but
  • 00:15:50
    there are some API governance we should
  • 00:15:53
    follow based on that specific data only
  • 00:15:56
    we should pass into specific component
  • 00:16:00
    okay so anyone has idea what what like
  • 00:16:03
    uh
  • 00:16:05
    as per API governance what kind of data
  • 00:16:07
    we should pass in which
  • 00:16:09
    part of our mule message
  • 00:16:15
    okay let's discuss about URI parameter
  • 00:16:18
    so what kind of data we should pass
  • 00:16:19
    inside URL parameter
  • 00:16:25
    foreign
  • 00:16:31
    [Music]
  • 00:16:33
    will have get request then only we will
  • 00:16:36
    pass URI parameter URI parameter we can
  • 00:16:39
    pass in get also put also paths also
  • 00:16:42
    delete also
  • 00:16:56
    maybe in the URL if you have a URL in
  • 00:16:59
    which there is a constant
  • 00:17:02
    with the value of which is always going
  • 00:17:04
    to change so you can put that as a URI
  • 00:17:06
    parameter be it any request
  • 00:17:10
    for example you're retrieving
  • 00:17:12
    information for student ID this print ID
  • 00:17:15
    one two three four
  • 00:17:17
    so it one two three four can always be
  • 00:17:19
    changing so you will put it in the URI
  • 00:17:21
    parameter and that will be nice other
  • 00:17:23
    things also like header data can also be
  • 00:17:25
    changed very parameter data also can
  • 00:17:28
    change
  • 00:17:30
    all right
  • 00:17:34
    so first URI parameter whenever we want
  • 00:17:38
    to pass unique identifiers to our API
  • 00:17:41
    okay what will be unique identifier
  • 00:17:44
    let's say I want to retrieve customer
  • 00:17:45
    information so customer ID is unique
  • 00:17:48
    here
  • 00:17:49
    okay for each customer there will be one
  • 00:17:52
    unique customer ID so that will be
  • 00:17:54
    unique identified to retrieve any
  • 00:17:56
    customer or if I want to update any
  • 00:17:58
    customer information to update customer
  • 00:18:00
    information also we need to pass unique
  • 00:18:03
    identifier that is URI parameter
  • 00:18:06
    okay so whenever you will think
  • 00:18:10
    you are calling your API based on some
  • 00:18:13
    unique identifier to perform some
  • 00:18:15
    operation it can be retrieved also it
  • 00:18:17
    can be
  • 00:18:18
    update also it can be delete also then
  • 00:18:21
    we should pass that kind of data inside
  • 00:18:24
    URI parameter and as I mentioned like uh
  • 00:18:28
    one of the best example will be you are
  • 00:18:31
    either retrieving updating or deleting
  • 00:18:33
    customer information based on customer
  • 00:18:36
    ID
  • 00:18:37
    is it clear to everyone
  • 00:18:44
    [Music]
  • 00:18:49
    so let me put like this
  • 00:18:52
    let me put like this
  • 00:18:56
    so here my requirement is I want to
  • 00:19:01
    retrieve
  • 00:19:04
    customer
  • 00:19:07
    information
  • 00:19:08
    based on
  • 00:19:17
    okay so let's let me
  • 00:19:20
    create five six scenario
  • 00:21:27
    okay so first requirement
  • 00:21:30
    here we are retrieving customer informs
  • 00:21:33
    information based on customer ID
  • 00:21:36
    okay
  • 00:21:38
    so
  • 00:21:40
    in this particular case we are
  • 00:21:42
    retrieving any customer information
  • 00:21:44
    based on one unique identifier this
  • 00:21:46
    customer ID is unique identifier so if
  • 00:21:49
    we have this kind of data in our request
  • 00:21:52
    period we must need to pass inside URI
  • 00:21:55
    parameter so what will be our resource
  • 00:21:57
    here slash
  • 00:22:06
    Plus customer slash
  • 00:22:09
    early basis
  • 00:22:16
    customer ID so we will pass this
  • 00:22:19
    customer ID inside uni URI parameter
  • 00:22:22
    since this is the unique identifier for
  • 00:22:24
    our API
  • 00:22:27
    okay same in case of
  • 00:22:31
    this update also
  • 00:22:34
    in the this delete also now in case of
  • 00:22:39
    this
  • 00:22:41
    here we are retrieving customer
  • 00:22:43
    information having age more than 60
  • 00:22:46
    years
  • 00:22:48
    okay so this age more than 60 years is a
  • 00:22:53
    filter condition here okay it's not
  • 00:22:55
    unique value based on this is there will
  • 00:22:58
    be like a thousand of customer also
  • 00:23:02
    so we are not uniquely identifying
  • 00:23:04
    customer we are doing filtering in our
  • 00:23:07
    customer
  • 00:23:08
    so whatever customer information we have
  • 00:23:10
    based on this condition we are doing
  • 00:23:13
    filtering so here our
  • 00:23:16
    this force will be only customers
  • 00:23:20
    okay but we need to pass one query
  • 00:23:23
    parameter
  • 00:23:28
    what will be our query parameters for
  • 00:23:30
    the parameter will be h
  • 00:23:37
    So based on this age we are doing
  • 00:23:39
    filtering so in this kind of
  • 00:23:42
    input field input data we should pass
  • 00:23:45
    inside query parameter okay same what
  • 00:23:49
    about this one
  • 00:23:53
    here what we are saying
  • 00:23:55
    like that we want to retrieve customer
  • 00:23:58
    information where their age is in
  • 00:24:02
    between this range okay so what will be
  • 00:24:06
    here query parameter two query parameter
  • 00:24:08
    will be there from date
  • 00:24:10
    and
  • 00:24:23
    okay there will be two query parameter
  • 00:24:25
    from date and to date
  • 00:24:29
    okay same way
  • 00:24:32
    here we have
  • 00:24:35
    we want to retrieve customer information
  • 00:24:37
    having City a b and c
  • 00:24:40
    again this will be our
  • 00:24:44
    query parameter only
  • 00:24:56
    okay where we will pass what we will
  • 00:24:58
    pass
  • 00:24:59
    City
  • 00:25:01
    okay and this city value will be comma
  • 00:25:04
    separated value it can be a b c p q r
  • 00:25:07
    whatever
  • 00:25:09
    so
  • 00:25:10
    first thing we understood query
  • 00:25:12
    parameter URI parameter that will be
  • 00:25:15
    unique identifier second query parameter
  • 00:25:17
    that will be filter condition now what
  • 00:25:19
    about header can anyone tell me what
  • 00:25:22
    kind of data we will pass inside here
  • 00:25:31
    token IDs
  • 00:25:32
    security codes yes so whatever metadata
  • 00:25:37
    okay
  • 00:25:38
    so those data is not required for
  • 00:25:41
    manipulation of our API
  • 00:25:44
    okay our API response will not depend on
  • 00:25:46
    those parameters
  • 00:25:48
    okay so those kind of data we should
  • 00:25:50
    pass inside header it can be security
  • 00:25:52
    policy things like client ID client
  • 00:25:55
    Secret
  • 00:25:56
    basic authentication detail
  • 00:25:59
    okay it can be our metadata like uh what
  • 00:26:03
    will be a type of data okay like accept
  • 00:26:09
    okay then we have few more like uh
  • 00:26:13
    see
  • 00:26:23
    so metadata transaction ID if you want
  • 00:26:26
    to pass any transaction ID for our API
  • 00:26:28
    then again that will be also passed
  • 00:26:31
    inside header
  • 00:26:33
    content type what will be a content type
  • 00:26:36
    of our API
  • 00:26:38
    so all this kind of metadata we should
  • 00:26:40
    pass inside header
  • 00:26:47
    next what kind of data we will pass
  • 00:26:51
    inside payload
  • 00:26:56
    so payload will contain any processing
  • 00:26:58
    data for example I want to create one
  • 00:27:01
    record okay or I want to update a record
  • 00:27:04
    where we are passing for which customer
  • 00:27:07
    we want to update but we want to update
  • 00:27:09
    some data so that data we need to pass
  • 00:27:11
    inside period
  • 00:27:13
    what data we want to update that we need
  • 00:27:16
    to pass inside preload or if we want to
  • 00:27:19
    create new record
  • 00:27:21
    then also we need processing data okay
  • 00:27:24
    that data will be part of payload
  • 00:27:27
    like I want to
  • 00:27:30
    create customer information
  • 00:27:38
    create customer
  • 00:27:39
    zip code
  • 00:27:40
    so here we will pass
  • 00:27:44
    so resource will be
  • 00:27:51
    again slash customer
  • 00:27:55
    okay and you will pass here payload
  • 00:28:00
    inside payload you will pass processing
  • 00:28:02
    data
  • 00:28:03
    like customer name age date of birth
  • 00:28:06
    gender
  • 00:28:09
    okay that kind of detail you will pass
  • 00:28:11
    here
  • 00:28:16
    so that can be name
  • 00:28:19
    is
  • 00:28:20
    date of birth like that
  • 00:28:26
    okay and here we discuss we will pass
  • 00:28:28
    metadata okay so all this will be part
  • 00:28:32
    of our
  • 00:28:33
    new message
  • 00:28:35
    okay
  • 00:28:37
    and variable okay so there there will be
  • 00:28:40
    two type of variable okay one is
  • 00:28:42
    predefined variable and another one is
  • 00:28:45
    usually defined variable
  • 00:28:47
    okay
  • 00:28:48
    so whatever variable you are creating
  • 00:28:50
    using
  • 00:28:52
    set variable component those are user
  • 00:28:56
    defined variable okay so that variable
  • 00:28:58
    name will be defined by U
  • 00:29:01
    okay
  • 00:29:02
    value will be defined by U only
  • 00:29:05
    it's as a developer we give variable
  • 00:29:07
    name okay let me open Studio
  • 00:31:35
    so here inside code we have this set
  • 00:31:38
    variable component
  • 00:31:40
    so using this component here you can see
  • 00:31:42
    you are defining variable name and you
  • 00:31:45
    are assigning the value
  • 00:31:46
    okay so everything will be done by user
  • 00:31:49
    only
  • 00:31:49
    so this kind of variable is known as
  • 00:31:51
    user defined value but a part of that
  • 00:31:54
    also we have some predefined variable
  • 00:31:57
    okay
  • 00:31:59
    so what all predefined variable we have
  • 00:32:01
    first one is flow
  • 00:32:03
    okay using this predefined variable you
  • 00:32:06
    will able to retrieve floating okay
  • 00:32:08
    let's say I want to get flow name at any
  • 00:32:10
    place of our mule application
  • 00:32:13
    mostly we use this flow name variable
  • 00:32:16
    when we want to log our
  • 00:32:19
    data
  • 00:32:21
    okay so we want to capture in which flow
  • 00:32:25
    we got error
  • 00:32:26
    okay or in like what is the current
  • 00:32:29
    execution of our fruit in those places
  • 00:32:31
    we use this flow name variable
  • 00:32:34
    okay so syntax will be flow dot name
  • 00:32:38
    okay let's say here
  • 00:32:47
    I am creating one predefined variable
  • 00:32:49
    and I am capturing
  • 00:32:51
    sorry I am creating one user defined
  • 00:32:53
    variable
  • 00:32:56
    or let me simply put the logger
  • 00:33:10
    and here
  • 00:33:11
    2 Dot
  • 00:33:15
    and here I am defining one predefined
  • 00:33:17
    variable
  • 00:33:21
    list
  • 00:33:22
    value is also
  • 00:33:25
    just
  • 00:34:31
    it gets deployed
  • 00:34:54
    so we have
  • 00:34:56
    request at this point so far you can see
  • 00:34:59
    there is no variable but we have created
  • 00:35:01
    one user defined variable so one
  • 00:35:03
    variable will be created
  • 00:35:08
    okay and here we are using this
  • 00:35:12
    predefined variable in our logger
  • 00:35:13
    component Okay so
  • 00:35:16
    after this
  • 00:35:17
    if you are defined if you are using any
  • 00:35:20
    predefined variable
  • 00:35:21
    one of the variable will be created here
  • 00:35:23
    so predefined variable will you will not
  • 00:35:26
    able to see inside words
  • 00:35:28
    okay only user defined variable you'll
  • 00:35:30
    be able to see here but we have kept in
  • 00:35:32
    the logger even we have kept inside
  • 00:35:35
    logger so you will able to see that
  • 00:35:37
    particular in our log
  • 00:35:39
    okay here you will able to see
  • 00:35:46
    so what we did inside log we kept
  • 00:35:49
    uh flow.name and what is the full name
  • 00:35:52
    here demo flow so that's why we are
  • 00:35:54
    getting here demo form
  • 00:35:56
    is it clear for everyone for this
  • 00:35:58
    predefined variable and user defined
  • 00:36:00
    variable
  • 00:36:08
    if if everything put everything is good
  • 00:36:11
    just put in yes in our chat so I will
  • 00:36:14
    keep getting like everything is clear
  • 00:36:18
    a good point now
  • 00:36:21
    we have few more predefined variable
  • 00:36:24
    another one is mute okay so inside this
  • 00:36:28
    mule we have clustered ID we have home
  • 00:36:32
    we have node ID we have version
  • 00:36:34
    okay so all of this will give you some
  • 00:36:37
    detail like where your mule application
  • 00:36:40
    is running
  • 00:36:42
    which in which cluster node it's running
  • 00:36:44
    what is the version of your mule runtime
  • 00:36:47
    okay so let's say we'll use this one
  • 00:36:50
    mule dot origin
  • 00:36:57
    so in this mule application I will put
  • 00:36:59
    one more logger some Echo coming someone
  • 00:37:03
    is calling to you maybe
  • 00:37:05
    that was ringing it's not it's not on my
  • 00:37:08
    side
  • 00:37:09
    it's not on my side I'm not getting any
  • 00:37:12
    info so anyone else is getting equal
  • 00:37:16
    someone calling getting calling sir
  • 00:37:19
    we are enabled here
  • 00:37:21
    classroom let me check with other anyone
  • 00:37:24
    else facing this kind of problem any
  • 00:37:26
    kind of ego
  • 00:37:28
    not really
  • 00:37:32
    we are not getting any
  • 00:37:36
    okay I can relock in very quickly
  • 00:37:39
    Jackson I will realize
  • 00:37:43
    you wait for two minutes yeah you can
  • 00:37:44
    join quickly we I mean while I'm
  • 00:37:46
    deploying this application
  • 00:37:54
    so if you will do small change in our
  • 00:37:56
    mule application and you are running in
  • 00:37:58
    debug mode no need to redeploy it will
  • 00:38:00
    automatically deploy your new
  • 00:38:01
    applications
  • 00:38:04
    okay so and then you will get this kind
  • 00:38:06
    of message
  • 00:38:09
    so deployment is done
  • 00:38:12
    let's wait for Jala and then we will
  • 00:38:14
    start letting him join back
  • 00:39:26
    okay now is it good
  • 00:39:30
    so this time what we did we are
  • 00:39:34
    capturing this predefined variable that
  • 00:39:36
    is mule dot version so we already is
  • 00:39:40
    redeployed this application let's
  • 00:39:43
    see what is the value of this
  • 00:39:46
    so after this and you can see here this
  • 00:39:48
    variable executed but still there is
  • 00:39:51
    only one variable so inside this
  • 00:39:53
    variable you will able to see only user
  • 00:39:56
    defined variable
  • 00:40:01
    okay and then here you can see flow name
  • 00:40:06
    and here you will able to see mule
  • 00:40:08
    version
  • 00:40:11
    okay so this another valuable mule dot
  • 00:40:14
    version will give you detail of your
  • 00:40:16
    mule runtime version
  • 00:40:18
    okay so this is the another set of
  • 00:40:20
    predefined variable so generally like we
  • 00:40:22
    use this kind of predefined variable for
  • 00:40:25
    our logging purpose
  • 00:40:27
    and this verse this is user defined okay
  • 00:40:30
    so we already discussed about this one
  • 00:40:32
    and then we have application like one
  • 00:40:35
    variable is there app which will give
  • 00:40:38
    you application detail like what
  • 00:40:39
    encoding you are using what is
  • 00:40:41
    application name
  • 00:40:43
    okay then
  • 00:40:45
    is your application is Standalone or
  • 00:40:48
    clustered or what kind of application is
  • 00:40:51
    that then we what is the working
  • 00:40:53
    directory of your mule application in
  • 00:40:55
    which registry it's running okay so
  • 00:40:58
    those kind of detail you will get using
  • 00:41:00
    this application variable
  • 00:41:02
    okay generally like uh we very rarely
  • 00:41:04
    use this predefined variable but mostly
  • 00:41:08
    for logging purpose we have to use
  • 00:41:10
    then correlation ID is another variable
  • 00:41:12
    which will give you correlation ID of
  • 00:41:15
    that particular transaction
  • 00:41:17
    okay
  • 00:41:18
    so they these all are our
  • 00:41:24
    variables or you can say
  • 00:41:27
    predefined variable except this weirds
  • 00:41:30
    okay this this we use for user defined
  • 00:41:32
    variable
  • 00:41:34
    let me
  • 00:41:35
    remove this
  • 00:41:38
    and put it here
  • 00:41:45
    this will be inserted
  • 00:41:53
    foreign
  • 00:42:03
    [Music]
  • 00:42:05
    application will start
  • 00:42:07
    what qualitation id will be generated
  • 00:42:09
    automatically
  • 00:42:11
    okay okay to get that for deletion ID we
  • 00:42:14
    will use this
  • 00:42:15
    okay okay
  • 00:42:20
    okay similar to mule message
  • 00:42:24
    similar to predefined variables
  • 00:42:26
    one mule error object will be created
  • 00:42:30
    Whenever there will be error okay if
  • 00:42:33
    your mule application is running
  • 00:42:35
    and whenever your mule application will
  • 00:42:37
    get error it will create one mule error
  • 00:42:41
    object
  • 00:42:43
    okay and that error object will have
  • 00:42:46
    again
  • 00:42:47
    multiple child element which contains
  • 00:42:51
    detailed information about the error
  • 00:42:54
    okay so what all child element it has
  • 00:42:57
    so one is description
  • 00:42:59
    so what it will be syntax to get the
  • 00:43:01
    value of description error dot
  • 00:43:04
    description so what it will give it will
  • 00:43:06
    give you description of your error like
  • 00:43:09
    what is the problem and what is
  • 00:43:11
    the region of that problem
  • 00:43:13
    in detail description syntax will be
  • 00:43:16
    error dot detail description it will
  • 00:43:18
    give you detailed description of your
  • 00:43:20
    error okay but most of the case you will
  • 00:43:23
    see description and detailed description
  • 00:43:24
    have same set of data but sometime it
  • 00:43:27
    may be different also
  • 00:43:29
    so in description you will get short
  • 00:43:31
    description and in detail description
  • 00:43:33
    you will get complete message why
  • 00:43:35
    exactly it's failing
  • 00:43:37
    okay then type so in mulesoft we have
  • 00:43:44
    different type of Errors okay it can be
  • 00:43:47
    expression error it can be
  • 00:43:50
    connected error it can be
  • 00:43:53
    like
  • 00:43:55
    connectivity error so we have multiple
  • 00:43:58
    type okay based on the type
  • 00:44:01
    like you will get one prefix and you
  • 00:44:04
    will get suffix like our error type is
  • 00:44:06
    divided into two part
  • 00:44:08
    so one will be prefix that will tell you
  • 00:44:11
    type about tie and then
  • 00:44:14
    inside suffix you will able to see what
  • 00:44:17
    particular type okay if it is
  • 00:44:19
    connectivity error then what is the
  • 00:44:21
    detail of that connectivity means not
  • 00:44:23
    detail
  • 00:44:24
    uh like uh
  • 00:44:26
    further heading of that particular error
  • 00:44:30
    okay
  • 00:44:32
    so
  • 00:44:34
    next we have
  • 00:44:36
    approach Okay so
  • 00:44:39
    it will give us the like
  • 00:44:43
    underlying Java throw well that result
  • 00:44:46
    means it like you know mu sort is based
  • 00:44:49
    on Java so it will give you
  • 00:44:54
    like what is the region like what is
  • 00:44:57
    Java component throwing error now so
  • 00:44:59
    that that will be captured inside this
  • 00:45:03
    okay then message so
  • 00:45:09
    here similar to like mule message in in
  • 00:45:12
    this error object also adds this message
  • 00:45:15
    which will
  • 00:45:19
    like uh which will tell you about the
  • 00:45:22
    this this particular error okay this is
  • 00:45:25
    not related to our
  • 00:45:28
    new event message okay this is the error
  • 00:45:31
    message
  • 00:45:32
    okay
  • 00:45:34
    and if we will have any child error then
  • 00:45:38
    this will be populated like this data
  • 00:45:41
    will be populated inside error.child
  • 00:45:43
    error
  • 00:45:44
    okay mostly like these three
  • 00:45:47
    description detail description and type
  • 00:45:49
    we use very frequently whenever we want
  • 00:45:52
    to have error so you need to do some
  • 00:45:55
    processing so those time we use these
  • 00:45:57
    three component description detailed
  • 00:46:00
    description and type
  • 00:46:05
    okay and a part of this like we have one
  • 00:46:10
    another component that is mule domain
  • 00:46:13
    okay so first thing the key point is
  • 00:46:17
    that
  • 00:46:18
    this mule domain Works only on on-premes
  • 00:46:22
    deployment model okay
  • 00:46:24
    like if you have
  • 00:46:26
    on pimps deployment like your runtime
  • 00:46:30
    plane is hosted on customers
  • 00:46:33
    infrastructure then only this domain
  • 00:46:36
    will work
  • 00:46:37
    this domain doesn't work on Cloud app or
  • 00:46:40
    RTF since in cloudhub and rdf
  • 00:46:44
    okay each worker where we deploy our
  • 00:46:48
    Google application
  • 00:46:50
    will be treated as separate entity
  • 00:46:53
    okay since that is inside one
  • 00:46:57
    uh what I can say container
  • 00:46:59
    okay which is completely isolated from
  • 00:47:02
    another container means another worker
  • 00:47:05
    so we we can't
  • 00:47:09
    create any reusable component among
  • 00:47:12
    those workers and this mural domain
  • 00:47:16
    contains the usable component okay
  • 00:47:21
    let me explain in this way then you will
  • 00:47:23
    get more clear picture
  • 00:47:30
    let's say we have
  • 00:47:36
    this mule runtime
  • 00:47:38
    new server where we have
  • 00:47:43
    two application or two or three
  • 00:47:45
    application is running
  • 00:47:52
    these three mule application is running
  • 00:47:54
    here
  • 00:47:55
    and at the same time this is our
  • 00:47:58
    on-pream Zone
  • 00:48:14
    okay and another we have
  • 00:48:39
    let's say this is our Cloud open
  • 00:49:04
    in on-premes what happens like all this
  • 00:49:08
    will be part of
  • 00:49:11
    foreign
  • 00:49:13
    let me create one more layer
  • 00:49:22
    so in on-premes what happened all this
  • 00:49:25
    application will use here resource
  • 00:49:28
    okay so all this will be deployed and it
  • 00:49:32
    will be running Within
  • 00:49:36
    uh like you can say share resources only
  • 00:49:39
    there will be one
  • 00:49:41
    uh machine where we will deploy our
  • 00:49:45
    on-prem server and on same on-prem sub
  • 00:49:49
    server we have three new application all
  • 00:49:51
    are running and they are using crd
  • 00:49:53
    sources
  • 00:49:54
    shared resources like
  • 00:49:57
    vcore and memory and everything
  • 00:49:59
    in this case what happened if we have
  • 00:50:02
    any reusable component that is domain
  • 00:50:04
    project so that can be used by all three
  • 00:50:06
    mule application but in case of this
  • 00:50:09
    Cloud Hub
  • 00:50:10
    in case of this Cloud up
  • 00:50:13
    all this mule application has their own
  • 00:50:17
    virtual machine
  • 00:50:18
    okay they are not using shared resources
  • 00:50:21
    they don't have shared memory they don't
  • 00:50:22
    have shared vehicle so all are running
  • 00:50:25
    in there shared in in their dedicated
  • 00:50:29
    vcore and dedicated memory so we can't
  • 00:50:33
    create any shared discourse among them
  • 00:50:38
    okay we can't create any domain project
  • 00:50:41
    for this Cloud on same for RTF okay
  • 00:50:51
    okay let me resume
  • 00:50:55
    thank you
  • 00:50:58
    let me know if he if it is visible
  • 00:51:02
    yes now we can say thank you
  • 00:51:05
    okay
  • 00:51:06
    so here you can see
  • 00:51:08
    this first one is on pimps where we have
  • 00:51:11
    one shared resource
  • 00:51:13
    like let's say we have 2v code and 4GB
  • 00:51:17
    memory okay
  • 00:51:19
    this this is like our Shear resource we
  • 00:51:22
    are we are running our mule runtime and
  • 00:51:24
    we deployed three mule application okay
  • 00:51:27
    so this three mule application is using
  • 00:51:29
    crb course shared memory so here we can
  • 00:51:32
    create domain project and that can be
  • 00:51:34
    used by all three new applications
  • 00:51:38
    but in case of cloud up each worker will
  • 00:51:41
    be treated as
  • 00:51:42
    single machine like they are running
  • 00:51:45
    on their own vcode and they are on
  • 00:51:49
    like there will be separate CPU and
  • 00:51:52
    separate memory okay they are not having
  • 00:51:55
    any kind of
  • 00:51:56
    shared resource so domain project we
  • 00:51:58
    can't use in our cloud of deployment
  • 00:52:02
    okay since they don't have crd sources
  • 00:52:05
    even if you will create domain project
  • 00:52:07
    that will be used by only one new
  • 00:52:09
    application so there is no advantage of
  • 00:52:11
    creating domain project
  • 00:52:15
    okay so this is the main region
  • 00:52:17
    like
  • 00:52:19
    why domain project is supported only on
  • 00:52:22
    on-premes the main reason is on teams
  • 00:52:25
    has shared sources and this cloud of
  • 00:52:28
    don't have shared resources now in
  • 00:52:30
    on-premes also nowadays like many
  • 00:52:33
    organizations are deploying based on
  • 00:52:37
    this uh Docker and kubernetes like if we
  • 00:52:40
    are using openshift then it supports
  • 00:52:43
    automatic Docker concept so where also
  • 00:52:47
    we have content containerized
  • 00:52:50
    deployment there also you will not able
  • 00:52:52
    to see domain project okay
  • 00:52:59
    foreign
  • 00:53:06
    we kept all the reusable components what
  • 00:53:10
    all the usual component it can has it
  • 00:53:12
    can has schema it can have like uh
  • 00:53:16
    requester configuration it can have
  • 00:53:20
    any any other properties environment
  • 00:53:23
    properties all those kind of things we
  • 00:53:25
    can store inside domain project
  • 00:53:29
    a question
  • 00:53:31
    yes
  • 00:53:34
    we have the shared research we have
  • 00:53:36
    right in the cloud we don't have shared
  • 00:53:38
    features right like cheerleaders is also
  • 00:53:42
    is one of the benefit rate why uh if
  • 00:53:44
    you're not using the same memory same
  • 00:53:47
    ecosystem
  • 00:53:48
    uh like uh what is the use of in the
  • 00:53:51
    cloud of benefit if you use the common
  • 00:53:53
    thing it will more benefit right it is
  • 00:53:56
    not providing the shield resource in the
  • 00:53:58
    cloud
  • 00:54:00
    like for every things we have many
  • 00:54:03
    advantage and disadvantage okay so if
  • 00:54:06
    you are using shared resource if
  • 00:54:07
    something will went wrong with one
  • 00:54:09
    application
  • 00:54:10
    it will create problem for other
  • 00:54:13
    application Also let's say one
  • 00:54:15
    application start using too many RAM
  • 00:54:18
    too much RAM and uh like more V codes
  • 00:54:22
    for other application that then
  • 00:54:25
    resources will be very less and it will
  • 00:54:27
    impact the other application
  • 00:54:31
    perfect
  • 00:54:32
    okay
  • 00:54:34
    if there will be any any crash then all
  • 00:54:37
    application will stop working in shared
  • 00:54:40
    resources due to any reason if your
  • 00:54:42
    server will crash then your all
  • 00:54:44
    application will stop working but in
  • 00:54:47
    case of dedicated one if any any problem
  • 00:54:50
    will come with any one worker then only
  • 00:54:53
    one worker will be impacted
  • 00:54:55
    other worker will keep active and keep
  • 00:54:58
    running
  • 00:55:02
    okay okay
  • 00:55:04
    clear tear
  • 00:55:24
    so we'll move for next topic so if
  • 00:55:26
    anyone has any talk in these things okay
  • 00:55:30
    these all are very basic thing and you
  • 00:55:32
    should have very in-depth understanding
  • 00:55:34
    otherwise you will not able to
  • 00:55:36
    understand complex concept
  • 00:55:37
    so let me know if any doubt otherwise
  • 00:55:39
    I'm moving for next component
  • 00:55:46
    fine then
  • 00:55:51
    so let's discuss so our last question um
  • 00:55:56
    Ravi yes so the main difference of the
  • 00:55:59
    cloud Hub and PC the memory allocations
  • 00:56:03
    and the shared resource in on top of the
  • 00:56:05
    any other
  • 00:56:07
    differentiation of these two PC and uh
  • 00:56:11
    clouder
  • 00:56:13
    see there are many difference between
  • 00:56:15
    Cloud app and on-premes one okay
  • 00:56:18
    so in cloud of deployment model
  • 00:56:20
    everything will be provided by mulesoft
  • 00:56:22
    runtime plane management plane
  • 00:56:24
    everything will be provided by mulesoft
  • 00:56:26
    but in on peeps you need to have your
  • 00:56:29
    own in infrastructure
  • 00:56:32
    okay and then muesoft will provide you
  • 00:56:35
    on pimp server you can deploy on your
  • 00:56:38
    infrastructure
  • 00:56:40
    the pricing wise also on primps should
  • 00:56:43
    be a bit cheaper compared to Cloud up
  • 00:56:46
    since you are managing everything
  • 00:56:48
    hey
  • 00:56:50
    so pricing why also there will be
  • 00:56:52
    difference
  • 00:56:54
    and there are many things related to
  • 00:56:56
    security also okay many organizations
  • 00:57:00
    who have more data security concerned
  • 00:57:04
    they don't go for clogged up since Cloud
  • 00:57:06
    up is
  • 00:57:08
    unlike uh in cloud of deployment model
  • 00:57:10
    itself
  • 00:57:12
    like mulesoft has purchased very big
  • 00:57:14
    space in AWS cloud and they have created
  • 00:57:17
    workers in shared Cloud okay so for
  • 00:57:21
    security data and security purpose many
  • 00:57:23
    organization like Insurance domain
  • 00:57:26
    banking domain they don't refer This
  • 00:57:28
    Cloud up they they use their on-pins
  • 00:57:31
    deployment
  • 00:57:35
    look is it clear
  • 00:57:37
    clear
  • 00:57:40
    now moving to next part here uh like we
  • 00:57:44
    will have small recap of our endpoint
  • 00:57:46
    Studio
  • 00:57:47
    okay so in any point Studio like this is
  • 00:57:51
    the view of our any point Studio this
  • 00:57:55
    okay so here we have multiple things
  • 00:57:58
    what you should know okay
  • 00:58:01
    like that you will use
  • 00:58:03
    whenever you are like working with any
  • 00:58:06
    developer you want to review the process
  • 00:58:08
    so first is mule message flow tab so
  • 00:58:12
    this is you can say new message flow
  • 00:58:14
    here we create our mule message okay
  • 00:58:17
    then we have Global element okay this is
  • 00:58:21
    the tab for Global element where we
  • 00:58:23
    Define all the properties file
  • 00:58:26
    okay not property configuration property
  • 00:58:29
    file okay
  • 00:58:30
    like for HTTP listener we need HTTP
  • 00:58:33
    listener configuration for database we
  • 00:58:35
    need database configuration so all this
  • 00:58:38
    configuration we create inside Global
  • 00:58:40
    property
  • 00:58:42
    and inside configuration XML you will
  • 00:58:44
    able to see your XML code
  • 00:58:47
    and you can update from here also
  • 00:58:51
    yep
  • 00:58:54
    so mule message flow we have Global
  • 00:58:57
    element tab we have and configuration
  • 00:59:00
    XML we have
  • 00:59:01
    okay view wise we have package Explorer
  • 00:59:04
    so here you can see this part okay where
  • 00:59:08
    you have project name project folder
  • 00:59:10
    structure
  • 00:59:12
    all those things we have inside package
  • 00:59:14
    Explorer okay here you can have
  • 00:59:17
    one application also and more than one
  • 00:59:20
    application also based on the
  • 00:59:22
    requirement you can close or open the
  • 00:59:24
    mule application
  • 00:59:28
    and then we have mule palette okay so
  • 00:59:32
    inside this mule palette you will able
  • 00:59:34
    to see all the mulesoft component
  • 00:59:39
    okay so we you will able to see core
  • 00:59:41
    components you will able to see
  • 00:59:44
    connectors and you will able to see
  • 00:59:47
    exchange module you can include many
  • 00:59:49
    other connector using this vaccine
  • 00:59:51
    module
  • 00:59:53
    okay a part of this we have one fabric
  • 00:59:57
    tab also where you can drag and like you
  • 01:00:00
    can add mule component which you use
  • 01:00:04
    very frequently
  • 01:00:09
    okay
  • 01:00:11
    and then whatever connector you will
  • 01:00:13
    include your in your mule application
  • 01:00:15
    those connectors will be visible here so
  • 01:00:17
    at this moment we have HTTP and socket
  • 01:00:20
    so I can see only HTTP and socket
  • 01:00:26
    okay
  • 01:00:27
    then uh
  • 01:00:32
    we have property tab so if you will
  • 01:00:34
    select any mule component then property
  • 01:00:36
    tab you will able to see here set
  • 01:00:39
    variable property tab here you can
  • 01:00:40
    configure this variable
  • 01:00:42
    this particular mule component whatever
  • 01:00:44
    required configuration you have you can
  • 01:00:46
    put here we have console tab here you
  • 01:00:49
    will able to see console log
  • 01:00:51
    okay you have problem tab where you will
  • 01:00:54
    able to see all the warnings and problem
  • 01:00:56
    in your mule application
  • 01:01:01
    okay then we have this mural debugger
  • 01:01:05
    when you will start your mule
  • 01:01:06
    application in debug mode then you will
  • 01:01:09
    able to see all the debug component or
  • 01:01:11
    debug result here
  • 01:01:13
    inside view
  • 01:01:15
    okay a part of that we have here
  • 01:01:19
    like munit things okay when you will run
  • 01:01:22
    your mule application with munit then
  • 01:01:26
    you will able to see code coverage what
  • 01:01:29
    is the uh like how many flow have like
  • 01:01:32
    once a minute detail like how many flows
  • 01:01:35
    are there how many are successfully run
  • 01:01:38
    and how many having error while running
  • 01:01:40
    the ammunate
  • 01:01:43
    another thing you will able to see code
  • 01:01:45
    coverage and all you will able to
  • 01:01:46
    generate reports so all those things
  • 01:01:48
    will come here
  • 01:01:54
    okay now here you can see if you want to
  • 01:01:57
    run your mule application in debug mode
  • 01:01:59
    then you need to select this one this
  • 01:02:02
    will be in normal run mode and this is
  • 01:02:05
    for
  • 01:02:06
    API design okay
  • 01:02:09
    this is the another mode we have
  • 01:02:12
    so here you can see this Primal detail
  • 01:02:15
    atom
  • 01:02:17
    okay
  • 01:02:19
    so all this uh basic thing you should
  • 01:02:21
    know about this
  • 01:02:23
    any quantity so here I am not going to
  • 01:02:26
    spend more time since this is very big
  • 01:02:29
    like basic thing and you should know
  • 01:02:31
    about this this time doing small recap
  • 01:02:42
    okay now this part may be many of you
  • 01:02:45
    know and many of you don't know so this
  • 01:02:47
    part you need to understand
  • 01:02:49
    okay so mulesoft folder structure and
  • 01:02:52
    best practices
  • 01:02:53
    okay
  • 01:02:54
    when you go for this
  • 01:02:56
    okay
  • 01:02:57
    like any project then we have multiple
  • 01:03:00
    folders here
  • 01:03:02
    what exactly we like we do in each
  • 01:03:06
    folder
  • 01:03:07
    and what all best practice we should
  • 01:03:09
    follow that we will discuss okay
  • 01:03:12
    so
  • 01:03:13
    here you can see
  • 01:03:15
    this is your project name okay so there
  • 01:03:17
    like your project name should be very
  • 01:03:21
    specific
  • 01:03:22
    okay by which you can identify what kind
  • 01:03:25
    of API you have developed in which
  • 01:03:28
    application
  • 01:03:30
    okay so here you can see
  • 01:03:32
    I have given name as a payment Papi app
  • 01:03:35
    V1
  • 01:03:36
    okay miss all the payment related
  • 01:03:39
    process API Papi means process API all
  • 01:03:42
    the payment related process API I have
  • 01:03:45
    within this new application
  • 01:03:48
    okay I kept Azure version one since this
  • 01:03:51
    is the initial version
  • 01:03:53
    if in future make this
  • 01:03:56
    process API
  • 01:03:57
    we will have another version like there
  • 01:04:00
    will be uh we want to create new set of
  • 01:04:03
    version then I will make it V2
  • 01:04:05
    but at this moment
  • 01:04:08
    this is the initial version
  • 01:04:10
    so I I kept igb1
  • 01:04:13
    now you will say why we need Virginia
  • 01:04:15
    like why we need version 1 version 2.
  • 01:04:18
    so sometime it may happen when you are
  • 01:04:21
    working for any one organized any
  • 01:04:23
    organization
  • 01:04:24
    like whatever set of code you have you
  • 01:04:27
    developed
  • 01:04:28
    that old set of code is still required
  • 01:04:31
    and they need a big change like in your
  • 01:04:34
    mule application they have done some big
  • 01:04:37
    change and that change
  • 01:04:40
    will like age also required for your
  • 01:04:43
    organization
  • 01:04:46
    okay so let's say
  • 01:04:48
    some big CR Cam and that due to that
  • 01:04:51
    your
  • 01:04:52
    API will be impacted okay your API got
  • 01:04:55
    completely impacted but still your
  • 01:04:58
    organization need all set of API
  • 01:05:02
    okay until unless new set of API will
  • 01:05:05
    not be commissioned properly they don't
  • 01:05:08
    want to decommission
  • 01:05:09
    your existing set of API in that case
  • 01:05:13
    generally we need versioning okay there
  • 01:05:15
    are multiple way of versioning but this
  • 01:05:17
    is the like we are burgeoning entire
  • 01:05:19
    mule application
  • 01:05:22
    okay here we have first folder that is
  • 01:05:25
    SRC main mule which contain your
  • 01:05:29
    mule configuration file okay now you can
  • 01:05:33
    see here I have divided my mule
  • 01:05:34
    configuration file into three
  • 01:05:37
    all right first one is our main mule
  • 01:05:40
    application configuration file which
  • 01:05:42
    contains
  • 01:05:43
    HTTP listener HTTP console then
  • 01:05:54
    which contains this listener One console
  • 01:05:57
    1 then flow like flow for each resources
  • 01:06:02
    each method
  • 01:06:03
    okay here I have only one resource slash
  • 01:06:07
    payment and only post method so you can
  • 01:06:09
    see here only one flow
  • 01:06:11
    but if we will have multiple resources
  • 01:06:14
    multiple methods then we will have
  • 01:06:17
    multiple flows
  • 01:06:31
    and after that you can see I have
  • 01:06:33
    created two folder one is common and one
  • 01:06:35
    is implementation
  • 01:06:37
    inside common folder what I will do I
  • 01:06:40
    will put all the common piece of code
  • 01:06:42
    here let's say error handling this error
  • 01:06:45
    handling will be used by
  • 01:06:48
    will be used in multiple places within
  • 01:06:51
    our mule application okay so I kept
  • 01:06:54
    inside
  • 01:06:56
    common error
  • 01:06:58
    sorry common error XML file or mule
  • 01:07:01
    configuration file here I have
  • 01:07:03
    configuration detail okay Global
  • 01:07:05
    elements So This Global element you will
  • 01:07:07
    be used by multiple
  • 01:07:11
    places within our mule application
  • 01:07:14
    so that's why I created inside another
  • 01:07:16
    separate file so it will be easy for
  • 01:07:18
    developer to ident to check any
  • 01:07:21
    particular thing let's say he want to
  • 01:07:23
    see what all error error things we have
  • 01:07:27
    so he will directly go here but all
  • 01:07:29
    Global elements we have he will go
  • 01:07:32
    inside config.xml here we have common
  • 01:07:35
    flow okay if let's say you are thinking
  • 01:07:38
    this particular flow will be used by
  • 01:07:40
    multiple
  • 01:07:41
    implementation then you can put in
  • 01:07:43
    common flow
  • 01:07:45
    okay so this common flow I am using at
  • 01:07:48
    multiple at this moment I have only one
  • 01:07:51
    but when resource will increase for
  • 01:07:54
    event resource will increase or when
  • 01:07:58
    uh method will increase I need that
  • 01:08:01
    initialization everywhere so that's why
  • 01:08:03
    I created inside common flow
  • 01:08:06
    after that we have implementation folder
  • 01:08:08
    in this implementation folder whatever
  • 01:08:10
    resource we have
  • 01:08:12
    whatever methods we have for each we
  • 01:08:15
    need implementation logic so that
  • 01:08:17
    implementation logic we use here we
  • 01:08:20
    create here
  • 01:08:24
    okay so in this way
  • 01:08:32
    we kept thing inside SRC main mule
  • 01:08:35
    component the part of that SRC main Java
  • 01:08:38
    we have so inside this we will create
  • 01:08:40
    any Java code we can write Java code if
  • 01:08:44
    required okay Java is not mandatory for
  • 01:08:47
    mulesoft and slowly like mulesoft is
  • 01:08:50
    adding more and more component which is
  • 01:08:53
    removing our dependency from java if you
  • 01:08:56
    go to mule 3 you need to do lots of
  • 01:08:59
    thing using Java
  • 01:09:00
    but in real four slowly they are keep
  • 01:09:03
    adding components for each functionality
  • 01:09:07
    okay means for each requirement they are
  • 01:09:10
    keep adding
  • 01:09:12
    components which you can directly drag
  • 01:09:14
    and drop so you don't need any
  • 01:09:18
    any Java code or anything
  • 01:09:21
    then SRC main resources here we keep
  • 01:09:25
    or maintain all the resources okay
  • 01:09:28
    so here you can see I have two property
  • 01:09:30
    file one each application property file
  • 01:09:34
    another one is Secret
  • 01:09:36
    so all the application property file I
  • 01:09:38
    will kept inside here for each
  • 01:09:40
    environment okay we can have multiple
  • 01:09:43
    environment where we will deploy our
  • 01:09:45
    meal application so for each environment
  • 01:09:47
    I will create application property file
  • 01:09:49
    here and secret property file here
  • 01:09:53
    and now what is secret property file so
  • 01:09:56
    there can be multiple property data
  • 01:10:02
    there can be multiple properties data
  • 01:10:04
    which should be sensitive data means
  • 01:10:07
    which which can be sensitive data like
  • 01:10:09
    uh database password
  • 01:10:12
    Salesforce uh secret key or any any
  • 01:10:17
    other like client ID and client secret
  • 01:10:19
    value so those those things are
  • 01:10:21
    sensitive information so those sensitive
  • 01:10:24
    information we should not put we should
  • 01:10:26
    not put directly we should encrypt that
  • 01:10:29
    data and then we should in property
  • 01:10:31
    files so you can see here
  • 01:10:33
    you can see this encrypted data I have
  • 01:10:36
    stored inside secret property file
  • 01:10:41
    okay so this property file I created and
  • 01:10:45
    for each environment I created it's not
  • 01:10:47
    common for all I created for each
  • 01:10:49
    environment
  • 01:10:59
    then we have this API folder okay this
  • 01:11:03
    API folder will contain your DML file if
  • 01:11:06
    you are taking grammar from Design
  • 01:11:08
    Center or raml from your local
  • 01:11:12
    but if you are taking from exchange then
  • 01:11:14
    you will not able to see here
  • 01:11:18
    okay
  • 01:11:20
    then this one is our
  • 01:11:23
    fragment from action since uh in this
  • 01:11:25
    particular implementation I used
  • 01:11:27
    fragment and that fragment I am taking
  • 01:11:29
    for Maxine so you will able to see here
  • 01:11:31
    an inside fragment you will able to see
  • 01:11:34
    all the components like data type
  • 01:11:37
    example trades common Library everything
  • 01:11:40
    is here
  • 01:11:43
    okay
  • 01:11:44
    then
  • 01:11:46
    we have a SRC test resources and SRC
  • 01:11:50
    test time unit
  • 01:11:51
    these two generally we use
  • 01:11:53
    in inside this we write our munit code
  • 01:11:57
    and
  • 01:11:58
    inside this we kept all the immunity
  • 01:12:01
    resources
  • 01:12:04
    okay similar to this
  • 01:12:06
    SRC main mule
  • 01:12:09
    and SRC main resources here we Define
  • 01:12:12
    our mule
  • 01:12:14
    design and mule development here we do
  • 01:12:17
    our mule development and here we keep
  • 01:12:19
    all the resources same way
  • 01:12:22
    or M unit we Define munit flow here and
  • 01:12:27
    resources we keep here
  • 01:12:30
    then you can see some jar okay so these
  • 01:12:33
    all are for our connectors in this API
  • 01:12:36
    we used
  • 01:12:37
    API kit HTTP socket so all this jar you
  • 01:12:42
    will able to see with this mule
  • 01:12:43
    application
  • 01:12:45
    okay and this
  • 01:12:48
    GRE system Library will be automatically
  • 01:12:50
    like for all applications
  • 01:12:52
    these things will vary based on the how
  • 01:12:54
    many connectors and components you are
  • 01:12:56
    using but this will be mandatory one
  • 01:13:00
    okay then this is our new server detail
  • 01:13:03
    like here we are using 4.4.0 so you can
  • 01:13:06
    see This Server detail based on your
  • 01:13:08
    server it will change
  • 01:13:11
    okay
  • 01:13:12
    then we have this mule artifact.json
  • 01:13:17
    okay this this also contains some
  • 01:13:19
    property file like related to minimum
  • 01:13:22
    your version and few or more properties
  • 01:13:24
    one you can configure here
  • 01:13:27
    and at the end we have Palm file since
  • 01:13:30
    mu Lisa like mule 4 is a magnetized mule
  • 01:13:34
    application
  • 01:13:36
    okay it create memonized project which
  • 01:13:39
    contains and for Maven like what you
  • 01:13:42
    need to add you need to add maven
  • 01:13:44
    dependencies
  • 01:13:45
    okay so whatever connector and component
  • 01:13:47
    you will use you need to add their
  • 01:13:50
    dependencies here
  • 01:13:52
    so what it will do at the time of
  • 01:13:54
    deployment it will download those
  • 01:13:56
    dependency from
  • 01:13:58
    Maybe
  • 01:14:00
    okay so this poem
  • 01:14:03
    contains detail for our
  • 01:14:07
    mule magnetized application
  • 01:14:10
    okay
  • 01:14:12
    and one thing we are missing for our
  • 01:14:14
    discussion that is lock for G5
  • 01:14:18
    okay
  • 01:14:18
    this lock4ject file contains our login
  • 01:14:21
    detail okay so in append you define
  • 01:14:26
    where exactly you will place your log
  • 01:14:28
    file
  • 01:14:31
    okay and then here we have
  • 01:14:39
    async root here we Define which level of
  • 01:14:43
    log we want to display in our
  • 01:14:47
    log file
  • 01:14:49
    okay we want to display info log we want
  • 01:14:51
    to display debug log what kind of log we
  • 01:14:54
    want to display
  • 01:14:58
    inside this async route we Define
  • 01:15:04
    Okay so
  • 01:15:07
    like uh vvr now familiar with mule
  • 01:15:11
    folder structure and what all best
  • 01:15:12
    practice we should follow
  • 01:15:14
    okay so let's take uh
  • 01:15:19
    yes
  • 01:15:21
    how can we enable and disable logs
  • 01:15:24
    in Block 4G or in that blogger only we
  • 01:15:29
    can enable our disable logs
  • 01:15:35
    here you need to Define
  • 01:15:38
    which level you want to display if you
  • 01:15:40
    want to display info level you need to
  • 01:15:42
    put info if you want to display debug
  • 01:15:45
    local you need to just put here debugger
  • 01:15:54
    okay if we want to disable locks then
  • 01:15:56
    what we need to do
  • 01:15:58
    that you need to do on like what what
  • 01:16:00
    logging com like framework you are using
  • 01:16:03
    okay if you are using Splunk kivana
  • 01:16:07
    okay that that you need to do there only
  • 01:16:11
    but here then if you need to remove
  • 01:16:13
    complete this async root only
  • 01:16:17
    okay if you don't want to display info
  • 01:16:19
    log also just remove this one also
  • 01:16:28
    okay
  • 01:16:31
    okay
  • 01:16:32
    yeah okay fine then let's take a 10
  • 01:16:35
    minute break and then we'll connect now
  • 01:16:37
    we have only few topics left so we'll
  • 01:16:40
    complete that also it will take 20
  • 01:16:43
    minute more
  • 01:16:53
    okay fine let's join in 10 minutes
标签
  • MuleSoft
  • Mule events
  • Attributes
  • Payload
  • Variables
  • Error Handling
  • Anypoint Studio
  • Project Structure