Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

Changing an XML record in beforeSaving_xxx

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

Changing an XML record in beforeSaving_xxx

Last Update:

Feb 9, 2024 2:06:24 PM

Updated By:

Jamie_Gregory

Created date:

Apr 1, 2021 6:01:45 AM

Overview

Talend MDM (Master Data Management) provides a beforeSaving_xxx process to validate the data when you update a Talend MDM record. Furthermore, it is possible to change the XML record in beforeSaving_xxx by providing one special output variable, output_item. This article explains how to do it.

 

Environment

This procedure applies to Talend MDM v5.1.x or higher.

 

Resolution

In a beforeSaving_xxx process, there is a special output variable, output_report, used to show the update report message as in the formatted string below:

<report> <message type="info|error"> xxx report message xxx </message> </report>
  • info: validation OK.
  • error: validation failed.

There is another output variable, output_item, used to change the XML record as in the formatted string below:

<exchange> <item> xxx the updated xml record string xxx </item> </exchange>

Here is an example of how to change the XML record in a beforeSaving_xxx process:

The beforeSaving_Entity_3 process contains 2 steps: Change and Check.

 

  1. Change the step as below:

    0693p000008u9jAAAQ.png

  2. Check the step as below:

    0693p000008uAQZAA2.png

 

Steps to reproduce the issue

  1. Import mdmitems.zip (attached) to the Studio, then deploy all items to MDM server.
  2. Import jobs.zip (attached) to the Studio, then deploy the 2 Jobs to the MDM server.
  3. Log in to the Web User Interface, create one Entity_3 record, and save it.
  4. Update Field_2 and Field_3, then Save. The Date will be updated with the value of the current time.

The files jobs.zip and mdmitems.zip are exported from Talend 5.3.1.

 

Related Jira Issues

TMDM-1816 - Let a before saving process alter the item before it is committed to the db - Closed

Labels (3)
Version history
Last update:
‎2024-02-09 02:06 PM
Updated by: