August 17, 2023

tMDMRouteRecord – Docs for ESB 5.x

tMDMRouteRecord

tMDMRouteRecord_icon32_white.png

tMDMRouteRecord properties

Component family

Talend
MDM

 

Function

tMDMRouteRecord submits the
primary key of a record stored in your MDM Hub to Event Manager in order for Event Manager to trigger the due
process(es) against some specific conditions that you can define in
the process or trigger pages of the MDM Studio.

For more information on Event
Manager
and on a MDM process, see Talend Studio.

Purpose

This component helps Event
Manager
identify the changes which you have made on
your data so that correlative actions can be triggered.

Basic Settings

Use an existing connection

Select this check box if you want to use a configured tMDMConnection component.

  URL Type in the URL of the MDM server.

 

Username and
Password

Type in the user authentication data for the MDM server.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

 

Version (deprecated)

Type in the name of the master data management Version you want to
connect to, for which you have the user rights required.

Leave this field empty if you want to display the default perspective.

 

Data Container

Type in the name of the data container that holds the record you
want Event Manager to read.

Type

Select Master or Staging to specify the database on which
the action should be performed.

 

Entity Name

Type in the name of the business entity that holds the record you
want Event Manager to read.

 

IDs

Specify the primary key(s) of the record(s) you want Event Manager to read.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the processing metadata at the Job
level as well as at each component level.

Connections

Outgoing links (from this component to another):

Row: Iterate

Trigger: Run if; On Component Ok;
On Component Error, On Subjob Ok, On Subjob Error.

Incoming links (from one component to this one):

Row: Iterate;

Trigger: Run if, On Component Ok,
On Component Error, On Subjob Ok, On Subjob Error

For further information regarding connections, see Talend Studio User
Guide
.

Global Variables

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.

Usage

Use this component as a start component. It needs an output
flow.

Scenario: Routing a record to Event Manager

In this scenario, the tMDMRouteRecord component is
used to submit the primary key of a record noting an update to Event Manager in order for this element to trigger a process that
informs the user of this update.

Warning

Talend Studio is case-sensitive, so respect the differences of uppercase
and lowercase when realizing the scenario.

Scenario prerequisites

The following prerequisites must be met in order to replicate this
scenario:

  • A data container stores several records using a specific model. In this
    scenario, the container is named Product, and a record
    in the container is entered against the model named
    Product:

Use_case_tMDMRouteRecord1.png

This figure shows one of the stored product records with all of its viewable
attributes.

For further information about how to create a data container and a data model, see
your Talend Studio User Guide.

For further information about how to create a record and access its viewable
attributes, see the Talend MDM Web User Interface User
Guide
.

Creating a message to inform the user when the record is updated

A Job is used to inform the user of the update. In this scenario, the Job is
called message, and uses only the tMsgBox component.

  1. Drop a tMsgBox component onto the
    design workspace.

  2. Double-click the component to display and configure its Basic settings :

    Use_case_tMDMRouteRecord2.png
  3. In the Title field, type in
    Talend MDM“.

  4. In the Message field to be displayed,
    type in “A record is updated“.

  5. Save your Job and deploy it to the MDM Server.

For further information about the tMsgBox
component, see tMsgBox.

For further information about how to deploy a Job onto the MDM Server, see the
Talend Studio User Guide.

Routing a record to trigger the corresponding process

This section shows you how to replicate the whole scenario using tMDMRouteRecord to trigger a process.

  1. Log onto your Talend
    MDM Web UI and click Master Data Browser.

    For further details about how to log onto the Talend
    MDM Web UI and open the Master Data Browser view, see Talend MDM Web User Interface User Guide.

  2. In the upper right corner of the web page, click on the show_button.png button to show the Actions panel.

  3. On the Actions panel on the right, select
    the required data container and data model in which is the record to be
    updated. In this scenario, the data container and the data model are both
    Product.

  4. Click Save to save the selected data
    container and data model.

  5. In the Master Data Browser view, select
    the Product entity.

  6. Double-click one of the product records to display its viewable attributes
    in a new view dedicated to this product. For example, open the product
    Talend Mug with the unique Id
    231035938.

    Use_case_tMDMRouteRecord1.png
  7. In this view, modify one of the attribute values. You can, for example,
    update this product and make it available by selecting the Availability check box.

  8. Click Save to validate this
    update.

  9. Open your Talend Studio and
    make sure you are connected to the MDM server. For further information about
    how to launch the Talend Studio and
    connect it to the MDM server, see Talend Studio
    User Guide
    .

  10. In the MDM Repository tree view, under
    the Job Designs node, right click the
    message Job.

  11. In the contextual menu, select Generate Talend Job Caller
    Process
    , accept the default options and click Generate.The process used to call this Job is
    generated and stored under Event Management
    > Process.

  12. Deploy your newly-created Process to the MDM Server.

  13. Under the Event Management node, right
    click Trigger.

  14. In the contextual menu, select New.

  15. In the pop-up [New Trigger] wizard, name
    the trigger, for example, TriggerMessage.

    Use_case_tMDMRouteRecord7.png
  16. Click OK to open the new trigger view in
    the workspace of your studio.

  17. Configure the trigger to make it launch the process that calls the
    message Job once an update is done.

    Use_case_tMDMRouteRecord8.png
  18. In the Description field, enter, for
    example, Trigger that calls the Talend Job: message_0.1.war
    to describe the trigger being created.

  19. In the Entity field, select or type in
    the business entity you want to trigger the process on. In this example, it
    is exactly Update.

  20. In the Service JNDI Name field, select
    callprocess from the drop-down
    list.

  21. In the Service Parameters field, select the CallJob_message check box.

  22. In the Trigger xPath Expressions area,
    click the MDMTrigger_AddButton.png button under the table to add a new XPath line.

  23. In the newly added line, click the three-dot button to open a dialog box
    where you can select the entity or element on which you want to define
    conditions. In this example, it is
    Update/OperationType.

    Use_Case_tMDMRouteRecord9.png
  24. In the Value column, enter a value for
    this line. In this example, it is exactly
    UPDATE.

  25. In the Condition Id column, enter a
    unique identifier for the condition you want to set, for example,
    C1.

  26. In the Conditions area, enter the query
    you want to undertake on the data record using the condition ID
    C1 you set earlier.

  27. Press Ctrl+S to save the trigger, and
    then deploy the trigger to the MDM Server.

  28. In the MDM Repository tree view, double
    click Data Container > System > UpdateReport to open the Data
    Container Browser UpdateReport
    view. An Update Report is a
    complete track of all create, update or delete actions on any master
    data.

    Note that, if the Update Report data
    container is not available, you may first have to import it from your MDM
    Server. For details of how to import system objects from the MDM Server to
    your local repository, see the Talend Studio
    User Guide
    .

    Use_Case_tMDMRouteRecord10.png
  29. Next to the Entity field of this view,
    click the SearchButton.png button to search all the action records in the
    UpdateReport. Note that the Update entity does not necessarily mean that the
    corresponding action recorded is the update, as it is just the entity name
    defined by the data model of UpdateReport
    and may record different actions including create, delete, update.

    The last record corresponds to what you did to the product record at the
    beginning of the scenario. The primary key of this record is
    genericUI.1283244014172 and this is the record that
    will be routed to Event trigger.

  30. In the Integration
    perspective, right-click Job Designs, in
    the Repository tree view. In the contextual
    menu, select Create Job.

  31. A wizard opens. In the Name field, type
    in RouteRecord, and click Finish.

  32. Drop the tMDMRouteRecord component from
    the Palette onto the design
    workspace.

  33. Double click this component to open its Component view.

    Use_Case_tMDMRouteRecord11.png
  34. In the URL field, enter the address of
    your MDM server. This example uses
    http://localhost:8180/talend/TalendPort.

  35. In the Username and the Password fields, type in the relevant
    information.

  36. In the Data Container field, enter the
    data container name that stores the record you want to route. It is
    UpdateReport in this example.

  37. In the Entity Name field, enter the
    entity name that the record you want to route belongs to. In this example,
    the entity name is Update.

  38. In the IDS area, click the plus button
    under the table to add a new line.

  39. In the newly added line, fill in the primary key of the record to be
    routed to Event Manager, that is,
    genericUI.1283244014172, as was read earlier from
    the Data Container Browser
    UpdateReport
    .

  40. Press F6 to run this Job. Event Manager calls the process to execute the
    message Job and generate the dialog box informing
    the user that this recorded has been updated.

    Use_Case_tMDMRouteRecord12.png

This component submits the primary key of the record noting the update to
Event Manager. When Event
Manager
checks this record and finds that this record meets the
conditions you have defined on the trigger TriggerMessage‘s
configuration view, it calls the process that launches the
message Job to pop up the dialog box informing the user of
this update.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x