change data record in BeforeSaving

Four Stars

change data record in BeforeSaving

Hello,
I would like change data before save the record.
For this with before saving i use calljob plugin. I know to return error message using outparameters variable output_report, but i don't know how to change data?
Someone speak me about output_item can be used since 5.1 but i found nothing about it?
Regards.
Employee

Re: change data record in BeforeSaving

Hi,
Yes, using a output_item allows you to change the record being saved (since 5.1). You need both output_report *and* output_item in this case: the output_report is used by MDM to control whether beforeSaving process succeeded or not. Please keep in mind security is checked again on the record in output_item: MDM will discard changes the user is not allowed to perform.
Four Stars

Re: change data record in BeforeSaving

Thanks for your answer fhuaulme, but i don't found how used it, can you help me please?
I have Talend MDM Documention, but found nothing about output_item
Regards
Employee

Re: change data record in BeforeSaving

Hi,
Two things:
1) You need two jobs in your beforeSaving process, one to return output_report , one to return output_item.
2) output_item - the xml message you return from your job has the same schema as an MDM exchange message - i.e. if you use tMDMTriggerInput and look at the structure of the message provided by MDM, this will give you an idea of what to return to MDM. You only need to return /exchange/item which is the section that contains the actual data of your entity, /exchange/report is not mandatory.
Hope that helps!
Employee

Re: change data record in BeforeSaving

"I have Talend MDM Documention, but found nothing about output_item"
Yes, this was identified... but after 5.1 release. 5.2 documentation should contain a use case and a description of this feature.
Employee

Re: change data record in BeforeSaving

I would also recommend that you use v5.1.2 for this feature. It will work on 5.1.1, but you will need to request a patch from Talend support (assuming you are an enterprise customer).
Four Stars

Re: change data record in BeforeSaving

Thank you for your answer, and yes i have 5.1.2, so it's good.
One Star

Re: change data record in BeforeSaving

Hi,
I'm facing the same problem that david. I've downloaded the 5.2.1 documentation and can't find the use case for the output_item.
I can only find hot to set up a callJob process.
Employee

Re: change data record in BeforeSaving

The documentation for this use case is scheduled for inclusion in the 5.2.2 release.