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 |
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 |
URL | Type in the URL of the MDM server. |
Username and Password |
Type in the user authentication data for the To enter the password, click the […] button next to the |
Data Container |
Type in the name of the data container that |
Type |
Select Master or Staging to specify the database on which the |
Entity Name |
Type in the name of the business entity that |
IDs |
Specify the primary key(s) of the record(s) you The key of the event record is different
|
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the processing |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
Use this component as a start component. It You can increase the timeout values for a Job using this component |
Connections |
Outgoing links (from this component to Row: Iterate
Trigger: Run if; On Incoming links (from one component to this Row: Iterate;
Trigger: Run if, On For further information regarding |
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
only one tJava component to inform the users of the update of an
existing data record.
-
Drop a tJava component
onto the design workspace. - Double-click the component to display its Basic settings.
-
In the Code field, enter
System.out.println("------- A Product is Updated.--" + new
java.util.Date());. - 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.
-
In the MDM Repository
tree view, under the Job Designs node,
right click the message Job. -
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. -
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 -
In the Conditions area, combine the conditions using the
predicates.In this example, enter the following:
1C1 AND C2 AND C3In this way, this Trigger will be executed on a record in the Update entity
only when a Product data record has been updated. - Deploy the customized Trigger to the MDM server.
Updating a data record in a specific data container
-
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. -
In the upper right corner of the web page, make sure the
Actions panel is displayed. -
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. -
Click Save to save your
changes. -
Go to the Master Data
Browser page, and select the Product entity from the list. -
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. -
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. -
Click Save to validate
this update.
Accessing the Update Reports
-
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. -
Next to the Entity field
of this view, click the 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. -
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
- In the Integration perspective, right-click Job Designs in the Repository tree view and select Create Standard Job in the contextual menu.
-
Enter RouteRecord in the
Name field in the wizard that opens, and then click
Finish. -
Drop the tMDMRouteRecord
component from the Palette onto the
design workspace. - Double click this component to open its Component view.
-
In the URL field, enter
the URL for accessing your MDM server.In this example, enter
http://localhost:8180/talendmdm/services/soap. -
In the Username and the
Password fields, enter the
credentials for accessing the MDM server. -
In the Data Container
field, enter the data container name that stores the record you want to
route.It is UpdateReport in this example. -
In the Entity Name
field, enter the entity name that the record you want to route belongs to.It is Update in this example. -
In the IDS area, click
the plus button under the table to add a new line. -
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.
Saving and executing the Job
-
Press Ctrl+S to save the
Job. -
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. -
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.
-