"Accept as new" doesn't function properly when out of box data deduplication workflow is set up for workitem approval even for one match

"Accept as new" doesn't function properly when out of box data deduplication workflow is set up for workitem approval even for one match

book

Article ID: KB0083982

calendar_today

Updated On:

Products Versions
TIBCO MDM 8.x, 9.x

Description

The issue was caused by the transition in the workflow execution as it was designed for more than one match condition. After the SelectMatchRecordWorkItem activity, the workflow should be transitioned to UpdateRecordStateAsApprovedSF. See the attached screenshot (Filename: CorrectTransition.JPG). Instead, the workflow is transitioned to MergeFromWI because the condition is evaluated to true. See the attached screenshot (Filename: WrongTransition.JPG)

The following is the default transition:

<Transition FromActivity="SelectMatchRecordWorkItem" ToActivity="MergeFromWI">
<Rule>
<Parameter direction="in" eval="variable" name="MergeCount" type="long" >MergeCount</Parameter>
<Parameter direction="in" eval="variable" name="MatchingRecordKey" type="long" >MatchingRecordKey</Parameter>
<Parameter direction="out" name="result" type="boolean" ></Parameter>
<Condition format="bsh" > <![CDATA[ result = (MatchingRecordKey !=null && MatchingRecordKey > 0) || (MergeCount != null && MergeCount > 0); System.out.println(RecordListForNew+" RecordListForNew for workitemsubmission MatchingRecordKey" +MatchingRecordKey +"result : "+result); ]]>
 </Condition>
</Rule>
</Transition>

The condition in the above transition is evaluated to "true". Consequently, the workflow will be transitioned to MergeFromWI instead of UpdateRecordStateAsApprovedSF.

Issue/Introduction

When the data duplication workflow is configured for a workitem, for even one match the SelectMatchRecord workitem will be created if there is one or more matched record. However, the "Accept as new" does not function properly in the case of a single match. The expected behavior is the newly created duplicate record will be saved as a confirmed record. The actual behavior is that the newly created record will still be merged with the existing record.

Environment

Product: TIBCO MDM 8.x, 9.x Operating System: All OS supported by MDM Database: All databases supported by MDM App server: All app servers supported by MDM

Resolution

Add a parameter "RecordListForNew" and modify the condition in the transition. The new transition follows.

<Transition FromActivity="SelectMatchRecordWorkItem" ToActivity="MergeFromWI">
<Rule>
<Parameter direction="in" eval="variable" name="MergeCount" type="long" >MergeCount</Parameter>
<Parameter direction="in" eval="variable" name="MatchingRecordKey" type="long" >MatchingRecordKey</Parameter>
<Parameter direction="in" eval="variable" name="RecordListForNew" type="arraylist" >RecordListForNew</Parameter>
<Parameter direction="out" name="result" type="boolean" ></Parameter>
<Condition format="bsh" > <![CDATA[ result = (RecordListForNew == null &&(MatchingRecordKey !=null && MatchingRecordKey > 0) || (MergeCount != null && MergeCount > 0)); System.out.println(RecordListForNew+" RecordListForNew for workitemsubmission MatchingRecordKey" +MatchingRecordKey +"result : "+result); ]]>
 </Condition>
</Rule>
</Transition>

When "Accept as new" is selected, the parameter "RecordListForNew" will not be null. Therefore, the condition is false and the workflow will not be transitioned to "MergeFromWI". A sample workflow file is attached. (Fileame: wfin26productaddinternaleditv1.xml).

Additional Information

N/A

Attachments

"Accept as new" doesn't function properly when out of box data deduplication workflow is set up for workitem approval even for one match get_app
"Accept as new" doesn't function properly when out of box data deduplication workflow is set up for workitem approval even for one match get_app
"Accept as new" doesn't function properly when out of box data deduplication workflow is set up for workitem approval even for one match get_app