Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Retrieve record with entity action

Hello everyone,
I'm working with Talend MDM Platform 6.1 and trying to create an entity action runnable process.

My goal is to run a bunch of controls on the record and update a field in the record if they pass.
I create a runnable process/entity action linked to my entity and the job to go with it.
The job is called normally when I start the process from the web UI but I can't figure out how to retrieve the data of the currently displayed record.
I tried using the tMDMTriggerInput, with and without the updateReport , but have no data coming through (also tried the tMDMReceive component).
Can't find any resource concerning this kind of process.

Any advice/help is more than welcome !
Thnks !
Pierre-Olivier
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi Pierre,
There are some examples in the MDM demo project you can check how to do it. You can import MDM demo project via Menu: Help-> Welcome -> In the Getting Started section, select "Demos" then check MDM Demos.
In the Demo project, there is a similar process and job to your requirement
Entity Process : Product (ShowMap) which invoke a job: ShowStoreMap
You can also use a Trigger to automatically invoke a job, see in demo CheckAvailability trigger which invoke CheckAvailability job.

Cheers,
John
PoG
Contributor
Contributor

Hi John thanks for your reply, I forgot to update the post with a solution 0683p000009MACn.png

the problem was that tMDMtriggerInput doesn't return the full "Exchange Message" when used in an entity-action called job.
Instead it returns the update part alone
<?xml version="1.0" encoding="UTF-8"?>
<Update>
<UserName>pog</UserName>
<Source>genericUI</Source>
<TimeInMillis>1461748515896</TimeInMillis>
<OperationType>ACTION</OperationType>
<DataCluster>XXX</DataCluster>
<DataModel>XXX</DataModel>
<ConceptXXX></Concept>
<Key>XXX</Key>
</Update>

To get the full exchange message (and avoid having to do a lookup to get the entity details) set the calljob plugin of the process to return the default "xmlInput" to the job. In the job you can then use tFixedFlowInput to get the "xmlInput" context variable (add it in local context conf for the job) and process it. The context varaible will contain the full exchange message 
<exchange xmlns:mdm="java:com.amalto.core.plugin.base.xslt.MdmExtension">
  <report>
     <Update>
        <UserName>pog</UserName>
        <Source>genericUI</Source>
        <TimeInMillis>1461831582550</TimeInMillis>
        <OperationType>ACTION</OperationType>
        <DataCluster>XXX</DataCluster>
        <DataModel>XXX</DataModel>
        <Concept>XXX</Concept>
        <Key>XXX</Key>
     </Update>
  </report>
  <item>
    <entity><id>XXX</id>....</entity>
  </item>
</exchange>


Hope thi is clear enough andcan be of some help for some other Talend MDM users 0683p000009MACn.png