DCR Routing Process

When a DCR is created in Reltio, it needs to be approved by the data steward in Reltio or by an external validation process such  as Onekey or a third party vendor. This is accomplished by the customization of the Reltio Workflow BPMN along with the MDM routing process based on the client configuration.

When an event for a DCR to be routed is received, the routing process can use the routing configuration to route the DCR. The attributes of the following entities and relations are tested and supported.

Entities

  • HCP

  • HCO

  • Company

  • Payer

Relations

  • HCP to HCO

  • HCO to HCO

  • HCP to Payer

External Info from the DCR

If the routing process is successful, the given DCR is routed to the destination and dcr's externalInfo is updated appropriately. See example below:

The event publish table ODP_CORE_LOG.EVENT_PUBLISH_STATUS_LOG for this routed DCR can have the following data in the column PUBLISH_PAYLOAD.

BPMN Workflow Process Customization

The DCR BPMN diagram can be modified to add additional functionality or change the paths that a DCR takes to completion. This can be achieved by adding tasks or actions to existing taks. When enhancing the BPMN diagram, existing tasks and their actions needs to remain unchanged, otherwise the MDM DCR informatica workflow can break.

Example 1: If DCRs need to be authorized by a data steward to be sent to OneKey, the BPMN file needs to route the DCRs approved by a data steward to the OneKey Submit queue (3rd Party Submit) as shown in the diagram below.

Example 2: To configure an auto-approve option, a new path for Auto-Approve needs to be added for the Internal External task, as shown in the diagram below. The route configuration also needs to be modified to specify rules that defines DCRs to be auto-approved.

Routing and Client Configuration

In the MDM process, the routing is based on the routing configuration that a given client can configure based on it's needs..

Based on the conditions configured in the routing configuration (as provided in the database table ODP_CORE_STREAM.DCR_STREAMING_CONFIGURATION), a DCR is moved to the internal or external queue (or any other queue set in the BPMN file) when an event for the DCR comes in with the DCR's external info as below:

Copy
{
"dcrTaskName": "internalExternal" => This means that the DCR is in Task "internalExternal"
}

If a DCR is moved to Internal queue, it appears to a Reltio user in the UI for them to resolve (Approve/Reject) the record. If a DCR is moved to the 3rd Party Submit queue, then it is sent to OneKey for resolution in a subsequent step of this workflow. If a DCR is routed to the Generic Submit queue, then it is vendor specific resolution.

If the attributes RouteTo, Vendor and AssignTo are not provided then the DCR is routed to External (OneKey).

When a DCR is routed to Internal there is a new additional attribute named AssignTo that allows a choice of the user to which a DCR is assigned. The DCR is assigned to a user who is in a role contained in the AssignTo roles collection. These DCRs is assigned round robin based on current user allocations.

Here is a sample DCR Routing Configuration:

Copy
{
    "dcrMiscConfig": {
        "cleanseConfig": "attributes.Phone:PhoneCleanserFn:HCP,attributes.Phone:PhoneCleanserFn:HCO",
        "systemUsers": "<EXTERNAL_SYSTEM_NAME>:<SYSTEM_USER_NAME>|<EXTERNAL_SYSTEM_NAME>:<SYSTEM_USER_NAME>"
    },
    "routingConfig": [
        {
            "Name": "HCO",
            "AndCondition": [
                {
                    "matchValue": [
                        "US",
                        "CH",
                        "NL",
                        "IT"
                    ],
                    "nodePath": "attributes.Address|0.value.Country",
                    "nodeValueField": "lookupCode"
                }
            ],
            "RouteTo": "Approve",
            "Vendor": "OCESALES"
        },
        {
            "Name": "HCP",
            "AndCondition": [
                {
                    "matchValue": [
                        "US",
                        "CH",
                        "NL",
                        "IT"
                    ],
                    "nodePath": "attributes.Address|0.value.Country",
                    "nodeValueField": "lookupCode"
                }
            ],
            "RouteTo": "Approve",
            "Vendor": "OCESALES"
        },
        {
            "Name": "HCO",
            "AndCondition": [
                {
                    "matchValue": [
                        "US",
                        "CH",
                        "NL"
                    ],
                    "nodePath": "attributes.Address|0.value.Country",
                    "nodeValueField": "lookupCode"
                },
                {
                    "matchValue": [
                        "W{attributes.Address|0.value.Country}.TET.*"
                    ],
                    "nodePath": "attributes.ClassofTradeN|0.value.FacilityType",
                    "nodeValueField": "lookupCode"
                }
            ]
        },
        {
            "Name": "HCP",
            "AndCondition": [
                {
                    "matchValue": [
                        "MX"
                    ],
                    "nodePath": "attributes.Address|0.value.Country",
                    "nodeValueField": "lookupCode"
                }
            ],
            "RouteTo": "ExternalGeneric",
            "Vendor": "TEST-VENDOR"
        },
        {
            "Name": "Company",
            "CountryRequired": false,
            "AndCondition": [
                {
                    "nodePath": "attributes.CompanyType.value",
                    "nodeValueField": "String",
                    "matchValue": [
                        "Payer-Payer"
                    ]
                }
            ]
        }
    ]
}

Configuration - Rules For Task Routing

A configuration file for this step allows you to create custom Boolean logic that can test whether a task is moved to the External or ExternalGeneric step next or not. If the Boolean logic evaluates to true, the task is moved to the External step; otherwise, it is moved to the Internal step (It can also be specified in the configuration file to route the DCR internally).

In the above example there are three sections, each section has four attributes, Name, AndCondition, RouteTo and Vendor.

  • The Name attribute specifies the Reltio entity (HCP and HCO) to read data from.

  • The AndCondition attribute specifies the data expressions that need to be matched for the DCRs to be routed as externals. The nodePath is the path of the data to be read. The matchValue specifies the values to match, for example, the second match condition block has ["W{attributes.Address|0.value.Country}.TYP.*"], the highlighted value is replaced by one of countries found in the first block. So, the order of the nodePath elements should be arranged based on the dependency on each other. Here, the country nodePath should be first, because it is used to replace the SubTypeCode match value. The matchValue attribute can support a list of values that acts as an OR condition, with the wildcard character “*” at the end. For example, WNL.TET.* indicates all code values that start with WNL.TET.

  • The RouteTo attribute indicates where to route the given DCR to, if the given condition is true for the DCR data. The value External means it is routing to OneKey.

  • The Vendor attribute provides the vendor name where the DCR is routed to. The configuration also provides the flexibility to add a new routing (it must be first defined in Reltio workflow/BPMN file) other than the ones defined so far. But if a given routing is used in the routing configuration but not defined in Reltio then the DCR routing can fail and this must be corrected before resubmitting the DCR.

DCR Routing Support for All Reltio Entities

The Boolean attribute named CountryRequired in Reltio supports all the entities (for example, Company, Account, Substance, etc), see the image later in this section. This attribute allows routing the DCRs which do not have the attribute Country in the entity/dcr (unlike HCP and HCO where Country is a required attribute in the entity). For these entities this attribute should be set to false. Below is how this attribute is interpreted:

  • If not provided in the configuration, the default value is true (backward compatibility).

  • If there are multiple blocks of configuration for a given entity and this attribute has different values such as false/true, then the value that is taken for that entity is false.

Boolean Logic

The Boolean logic can access property values on the Reltio entities for their tests.

Note:   

These entities can be found attached to the DCR. The properties are accessed through node queries against the Reltio entity.

The Boolean logic always contains a single top level OR condition and as many child AND conditions as required.

Boolean Node Definitions

Node

Description

OrCondition

Boolean OR condition – The parent level OR condition (can only have one).

AndCondition

Boolean AND condition.

Reltio Entity Queries

Query Node Definitions

Node

Description

nodePath

Path to the value node in the Reltio entity.

nodeValueField

Field on the Reltio entity found by the nodePath query to use as a comparison value.

matchValue

Can be a list of values separated by commas (,) or a single value.

The value represented by the combination nodePath and nodeValueField is compared to this list of values for equality, see DCR Routing Attributes.

DCR Routing Attributes

Node

Description

RouteTo

Where to route the given DCR, if the given condition is satisfied.

Vendor

Name of the vendor such as OK for External and VEEVA for ExternalGeneric routing. For routing to External, the default value is OK. For ExternalGeneric routing a valid Vendor should be provided.

AssignTo

Contains an array of roles of which a user must belong to be assigned this dcr.

Important:  Only valid when RouteTo equal Internal.

CountryRequired

If the Country check is NOT required for a given Reltio Entity (for example, Company, Account, etc.), this attribute should be provided in the routing configuration for the given entity as: CountryRequired: false. The default value is true

Entity Queries Explained

The entity queries specify the path to follow from the root of a Reltio entity to the node you are interested in. For example, the following query selects a country node from a Reltio entity:

attributes.Address|0.value.Country

This query traverses the following path, which you can see highlighted in yellow in the screenshot, see Entity Queries.

attributes -> Address (Array index 0) -> Country.

Similarly, if the workplace FacilityType needs to be added, it looks like this:

attributes.ClassofTradeN|0.value.FacilityType

attributes -> ClassofTradeN (Array index 0) -> FacilityType.

In this query, note the syntax used for arrays: nodeName | array Index.value.

Route Internal/External Example

To sum things up, examine the sample configuration file previously displayed in this section. Assume the entity queries have the values shown in the following table.

nodePath

nodeValueField

Reltio Entity Value

attributes.Address|0.value.Country

lookupCode

US

attributes.SubTypeCode

lookupCode

WNL.TYP.*

The Boolean logic from the configuration file translates to the following:

The list of matchValue is considered as OR

value of (Attributes.Address|0.value.Country.lookupCode) == “US” AND value of (attributes. SubTypeCode.lookupCode) == “WNL.TYP.*”

OR

value of(Attributes.Address|0.value.Country.lookupCode) == “CH” AND value of (attributes. SubTypeCode.lookupCode) == “WNL.TYP.*”

OR

value of(Attributes.Address|0.value.Country.lookupCode) == “NL” AND value of (attributes. SubTypeCode.lookupCode) == “WNL.TYP.*”

Which then becomes the following:

“US” == “US” AND “WNL.TYP.A” == “WNL.TYP.*” OR “CH” == “CH” AND “WNL.TYP.MX” == “WNL.TYP.*” OR “NL” == “NL” AND “WNL.TYP.MX” == “WNL.TYP.*”

This condition evaluates to true, so this task can get moved to the External workflow step.

Routing of DCR for soft affiliations to Data Steward or auto-approve

This can be achieved through routing configuration using Name: relations.

A new entity type named relations is introduced in configuration, which can have conditions on the Start Object Entity's Attributes or End Object Entity's Attributes.

Also, we can have conditions on Start Object Attributes or End Object Attributes.

If we provide a condition which cannot match any criteria, then DCRs is routed to Steward Approval (internal DCR).

Copy
{

  "Name": "relations",

  "AndCondition": [

    {

     "nodePath": "startObjectEntityAttributes.Address|0.value.Country",

     "nodeValueField": "lookupCode",

     "matchValue": [

     "NL"

     ]   

    },

    {

     "nodePath": "startObjectEntityAttributes.SubTypeCode",

     "nodeValueField": "lookupCode",

     "matchValue": [

     "W{startObjectEntityAttributes.Address|0.value.Country}.TYP.*"

     ]

     },

     {

     "nodePath": "type",

     "nodeValueField": "String",

     "matchValue": ["configuration/relationTypes/affiliatedwith"]

     },

     {

     "nodePath": "startObject.type",

     "nodeValueField": "String",

     "matchValue": ["configuration/entityTypes/HCP"]

     }

     ],

     "RouteTo": "Approve"

}

Customization of Reltio Workflow (BPMN) for Custom Java Listener Class

If the BPMN diagram is customized and the core functionality wanted to be maintained (such as routing, third party submit and processing), the new custom bpmn diagram needs to keep the task start listener on the core tasks (example. Internal External, 3rd Party Submit, Internal DS Review) to allow these core functionality to work on real time thru streaming. The listener (CustomTaskStartEventListener) is implemented in a custom jar deployed in Reltio.

To see the listener configuration you can open the BPMN in Reltio and click on the core tasks (example. Internal External, 3rd Party Submit, Internal DS Review), on the property box go to the Listeners tab and verify that the "Task Listener" option has "create: Java Class" and the listener class is com.reltio.iqvia.customworkflow.activiti.services.CustomTaskStartEventListener, see below:

The above can also be accomplished by making direct API Calls to get the current BPMN file from Reltio, modifying it to add the custom listener class and then by re-deploying it in Reltio. The postman collection for the given stream contains a section for these API calls, as indicated in the below screenshot (notice the 'Get BPMN file' and 'Set new BPMN File' api calls):

With this modification implemented in the BPMN file, when a DCR is created in Reltio, it's externalInfo can automatically contain the following attribute - dcrTaskName: internalExternal. In the MDM streaming process, a dcr with this externalInfo is identified as a candiate for routing and the routing process for this DCR is executed.

Sample DCR:

Troubleshooting

The first place to look for issues for a given DCR is in the following database tables:

ODP_CORE_LOG.EVENT

ODP_CORE_LOG.EVENT_PUBLISH_STATUS_LOG

If there were any issues then they should be reflected in the columns - ODP_CORE_LOG.EVENT_PUBLISH_STATUS_LOG.PUBLISH_MESSAGE and ODP_CORE_LOG.EVENT_PUBLISH_STATUS_LOG.PUBLISH_PAYLOAD.

  1. DCR does not get routed and ODP_CORE_LOG.EVENT_PUBLISH_STATUS_LOG shows error in the payload

    This indicates that the routing configuration is empty/null.

    Resolution

    Verify in the database table that the configuration to be used has a valid routing configuration in a valid Json format. Since this type of error is of type "ERROR', this DCR event can come back again and it should be processed fine once the routing configuration issue is fixed.

  2. "Error": "Country not found. Entity type: HCO"

    This error means that the DCR does not have address country in the given entity and country is required to route the DCR. The data needs to be fixed in this case

  3. "Error": "No valid task for DCR ID: 4AqDXonK"

    This type of error may happen if we try to, somehow, route a DCR that has already been routed successfully and moved to a different task in BPMN workflow.