Record Copy and Clone using workflow/rulebase customization.

Record Copy and Clone using workflow/rulebase customization.

book

Article ID: KB0093963

calendar_today

Updated On:

Products Versions
TIBCO MDM -
Not Applicable -

Description

Description:
Record Copy and Clone using workflow/rulebase customization. 

Issue/Introduction

Record Copy and Clone using workflow/rulebase customization.

Resolution

How it works.


1).    A catalogvalidation file detects when you are copying and records the ID and EXT of the copied record into hidden variables.
2).    The same file adds a pull-down menu to the screen allowing you to select whether to copy All Relationships (your requirement), or None.
3).    The user selects not to duplicate all related records.
4).    On Save and Process, the workflow executes a new rulebase.
5).    This reads the ID and EXT of the copied record, and calls a custom function to get the recordkeys of its related records across a particular relationship.
6).    The recordkeys are turned into a softlink.
7).    The softlink is used to connect those records to the new record. 
8).    Repeat steps five through seven for as many relationships as required (explicitly repeat in the rulebase).
9).    Process rest of workflow as normal.

Attached is a zip containing everything needed (Filename: CopyClone.zip). 


1).    Metadata description for additional attributes you need to add to the copied repository (essential for recording context and intention).
2).    CatalogValidation for the copied repository (essential in controlling visibility and required values).
3).    Workflow file (calls the rulebase that actually does the connections).
4).    Rulebase + customrulebasefunction class (these make the connections).

Note that if you need to modify the Rulebase file to match your relationship names and your related repositories, included are two sections of rulebase code that each deal with copying a single relationship. If you have more relationships to copy you will want to duplicate the first section for each additional relationship. It has the best comments telling you what to change.


Some notes are also in a the ReadMe in the zip attached.


Tested with CIM 8.2

Operating instructions.
1). Copy a record that has relationships.
2). Switch all Relationships to "none".
3). Modify the ProductID to a new value.
4). Click the Relationships to Copy pull-down (screen refreshes, click again).
5). Select None or All Relationships to determine whether no links or all links should be copied.
6). Click Save and Process.

Limitation:
This version works only in the forward direction of the relationships: meaning the relationships were defined to belong to the parent record's repository.

Additional Information

MDM workflow and rulebase guides.

Attachments

Record Copy and Clone using workflow/rulebase customization. get_app