July 30, 2023

tMDMRouteRecord – Docs for ESB 7.x

tMDMRouteRecord

Helps Event Manager to identify the changes you have made on your data so that
correlative actions can be triggered.

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
, see Talend Studio User Guide.

tMDMRouteRecord Standard properties

These properties are used to configure tMDMRouteRecord running in the Standard Job
framework.

The Standard
tMDMRouteRecord component belongs to the Talend MDM family.

The component in this framework is available in all Talend
products
.

Basic Settings

Use an existing
connection

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

MDM version

By default, Server 6.0 is selected. Although it is
recommended to migrate existing Jobs for this new version, the Server 5.6 option is available to
ease the process of the migration of your Jobs so as to keep them working
without modification with a 6.0 server. To do so, an option on the server must
be enabled to accept and translate requests from such Jobs.

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.

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.

The key of the event record is different
depending on the working mode of your MDM server:

  • for the standalone mode, the key is composed of the Source value and the TimeInMillis value of the record, concatenated using a period, for example,
    genericUI.1552964721309.
  • for the cluster mode, the key is the UUID value of the record, for example,
    814da0a4-1c55-453d-bfab-312c2d8e2165.

Advanced settings

tStatCatcher Statistics

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

Global Variables

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

Usage rule

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

You can increase the timeout values for a Job using this component
to help process a large number of data records. For more information, see advanced
execution settings for JVM parameters in the article Timeout values for a Job using
MDM components
on Talend Help Center (https://help.talend.com).

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
.

Routing an update report record to Event Manager

This scenario applies only to Talend MDM Platform and Talend Data Fabric.

In this scenario, the tMDMRouteRecord
component is used to submit the primary key of an update report record to Event Manager so that a trigger is launched to call a Job which
will print out the notification that a data record had been updated.

Prerequisites

  • The MDM server is up and running.
  • The MDM demo project has already been imported.
  • The data container Product has already been populated with some data
    records.

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 UI User Guide.

Creating a Job to notify users that a data record has been updated

In this scenario, a Job called message is created with
only one tJava component to inform the users of the update of an
existing data record.

  1. Drop a tJava component
    onto the design workspace.
  2. Double-click the component to display its Basic settings.
  3. In the Code field, enter
    System.out.println("------- A Product is Updated.--" + new
    java.util.Date());
    .
  4. Save your Job and deploy it to the MDM Server.

For further information about the tJava component, see tJava.

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

Generating a Job Caller Trigger and deploying it to the MDM server

In this scenario, once the Job message is created, a trigger
calling this Job can be generated.

  1. In the MDM Repository
    tree view, under the Job Designs node,
    right click the message Job.
  2. In the contextual menu, select Generate Talend Job Caller Trigger, accept
    the default options and click Generate.

    A trigger used to call the message Job is generated
    and stored under Event Management > Trigger. Its name is CallJob_Message, and its Service JNDI Name is
    callJob.
  3. In the Trigger xPath Expressions area, customize the
    conditions of the trigger according to your needs.

    In this example, add the following conditions:

    XPath Operator Value Condition
    Update/DataCluster Matches Product C1
    Update/DataModel Matches Product C2
    Update/OperationType Matches UPDATE C3
  4. In the Conditions area, combine the conditions using the
    predicates.

    In this example, enter the following:

    In this way, this Trigger will be executed on a record in the Update entity
    only when a Product data record has been updated.

  5. Deploy the customized Trigger to the MDM server.

Updating a data record in a specific data container

  1. Log onto your Talend MDM Web UI .

    For further details about how to log onto the Talend MDM Web UI, see
    Talend MDM Web UI User Guide
    .

  2. In the upper right corner of the web page, make sure the
    Actions panel is displayed.
  3. In the Domain
    Configuration
    area, select the required data container and data
    model.

    In this example, select Product for both the data container and the data
    model.
  4. Click Save to save your
    changes.
  5. Go to the Master Data
    Browser
    page, and select the Product entity from the list.
  6. Double-click one of the product records to display its viewable
    attributes in a new view dedicated to this product.

    In this example, open the product record Talend Mug
    with the Unique Id of 231035938.
  7. Update one of the attribute values in the product record.

    In this example, update the record by selecting the
    Availability check box to make it
    available.
  8. Click Save to validate
    this update.

Accessing the Update Reports

  1. In the MDM Repository
    tree view, double click Data Container > System > UpdateReport to open the UpdateReport
    view.

    An Update Report is a complete track of all create, update or delete
    actions on any master data.

    If the UpdateReport 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.

  2. Next to the Entity field
    of this view, click the tMDMRouteRecord_1.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 update, since it is
    just the entity name defined by the data model of UpdateReport and may record different actions including create,
    delete, and update.
  3. Locate the record that corresponds to your action of updating the data record
    as described in Updating a data record in a specific data container.

    The update report record will be routed to Event
    Manager
    , whose primary key is
    genericUI.1499236505686.

Setting up the Job to route the update report record to Event Manager

  1. In the Integration perspective, right-click Job Designs in the Repository tree view and select Create Standard Job in the contextual menu.
  2. Enter RouteRecord in the
    Name field in the wizard that opens, and then click
    Finish.
  3. Drop the tMDMRouteRecord
    component from the Palette onto the
    design workspace.
  4. Double click this component to open its Component view.
  5. In the URL field, enter
    the URL for accessing your MDM server.

    In this example, enter
    http://localhost:8180/talendmdm/services/soap.
  6. In the Username and the
    Password fields, enter the
    credentials for accessing the MDM server.
  7. In the Data Container
    field, enter the data container name that stores the record you want to
    route.

    It is UpdateReport in this example.
  8. In the Entity Name
    field, enter the entity name that the record you want to route belongs to.

    It is Update in this example.
  9. In the IDS area, click
    the plus button under the table to add a new line.
  10. In the newly added line, fill in the primary key of the update
    report record to be routed to Event
    Manager
    , which was read earlier from the UpdateReport data container.

    In this example, the primary key is
    genericUI.1499236505686.
    tMDMRouteRecord_2.png

Saving and executing the Job

  1. Press Ctrl+S to save the
    Job.
  2. Press F6 to run this
    Job.

    In this example, since the Product data record with the Unique Id of
    231035938 is updated, the component
    tMDMRouteRecord submits the primary key of the
    corresponding update report record to the Event Manager.
    When the Event Manager checks this record and confirms
    that this record meets the conditions in the trigger
    CallJob_Message‘s configuration view, the Event Manager calls the trigger to invoke the
    message Job.
  3. Verify the execution results of this Job by consulting the MDM server log to
    see that the notification ------- A Product is Updated.-- is
    printed out.

    You can check the server log in one of the following ways:

    • In the Server Explorer panel, right-click the
      connection to the server where MDM server is installed, and then
      click View Server Log. A Console opens
      displaying the most recent contents of the
      mdm.log file.

    • You can also view the contents of the mdm.log
      file in a browser. For more information, see the Talend Studio User Guide.

    • If you have direct access to the MDM server, you can also consult the
      file directly in the <$INSTALLDIR>/log
      directory, with INSTALLDIR indicating where the
      MDM server is installed.


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