Índice

Search

  1. Prólogo
  2. Introducción a los servicios de entidad de negocio
  3. Llamadas de servicio de entidad de negocio Enterprise Java Bean
  4. Llamadas del servicio de entidad de negocio de transferencia de estado representacional
  5. Llamadas de servicios de entidad de negocio de Protocolo simple de acceso a objetos
  6. Servicios para registros de referencias cruzadas y cálculos de BVT
  7. Compatibilidad del servicio de vinculación empresarial
  8. Llamadas externas para limpiar, analizar y transformar datos
  9. Uso de las API de REST para añadir registros
  10. Uso de las API de REST para cargar archivos

Guía de servicios de entidad de negocio

Guía de servicios de entidad de negocio

Paso 2. Probar la lógica personalizada

Paso 2. Probar la lógica personalizada

Realice los siguiente pasos para probar la lógica personalizada:
  1. Use la API de creación para crear dos registros de persona con direcciones y teléfonos:
    POST http://localhost:8080/cmx/cs/localhost-orcl-mdm_sample/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Toronto" } ] }, TelephoneNumbers: { item:[ { phoneNum: "111-11-11" } ] } }
    POST http://localhost:8080/cmx/cs/localhost-orcl-mdm_sample/Person?systemName=Admin { firstName: "John", Addresses: { item: [ { cityName: "Ottawa" } ] }, TelephoneNumbers: { item:[ { phoneNum: "222-22-22" } ] } }
    La respuesta contiene los siguientes valores de rowId:
    • Persona: 161923, 161924
    • Direcciones: 2123, 2124
    • Números de teléfono: 101723, 101724
  2. Ejecute la API de vista previa de fusión para fusionar ambos registros de persona:
    POST http://localhost:8080/cmx/cs/localhost-orcl-mdm_sample/Person/161923?action=previewMerge&depth=2 { keys: [ { rowid: "161924" } ] }
    La respuesta es un registro de persona con dos direcciones y dos números de teléfono.
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2121 ", "creator": "admin", "createDate": "2016-10-20T09:50:36.922-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.923-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Toronto" } }, { "rowidObject": "2124 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.790-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.790-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses", "Address": { "rowidObject": "2122 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.777-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.777-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Address", "cityName": "Ottawa" } } ] } } }
  3. Ejecute la API de vista previa de fusión para fusionar ambos registros de persona, lo que reemplaza la fusión de las direcciones y los números de teléfono:
    POST http://localhost:8080/cmx/cs/localhost-orcl-MDM_SAMPLE/Person/161923?action=previewMerge&depth=3 { keys: [ { rowid: "161923" } ], overrides: { Person: { Addresses: { item:[ { rowidObject: "2123", MERGE: { item:[{key:{rowid: "2124"}}], $original: { item:[null] } } } ] }, TelephoneNumbers: { item:[ { rowidObject: "101723", MERGE: { item:[{key:{rowid: "101724"}}], $original: { item:[null] } } } ] } } } }
    En la respuesta se muestran una sola dirección y dos números de teléfono.
    { "Person": { "rowidObject": "161923 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.878-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.879-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Person: , Bill", "partyType": "Person", "displayName": "Bill", "firstName": "Bill", "TelephoneNumbers": { "link": [], "firstRecord": 1, "recordCount": 2, "pageSize": 2, "item": [ { "rowidObject": "101723 ", "creator": "admin", "createDate": "2016-10-20T09:50:35.904-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:35.905-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "111-1111 ", "phoneCountryCd": "1" }, { "rowidObject": "101724 ", "creator": "admin", "createDate": "2016-10-20T09:50:54.768-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:54.769-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "PhoneNumbers", "phoneNum": "222-2222 ", "phoneCountryCd": "1" } ] }, "Addresses": { "link": [], "firstRecord": 1, "recordCount": 1, "pageSize": 1, "item": [ { "rowidObject": "2123 ", "creator": "admin", "createDate": "2016-10-20T09:50:37.956-04:00", "updatedBy": "admin", "lastUpdateDate": "2016-10-20T09:50:37.956-04:00", "consolidationInd": 4, "lastRowidSystem": "SYS0 ", "hubStateInd": 1, "label": "Addresses" } ] }, "PersonDetails": { "link": [], "recordCount": 0, "pageSize": 0, "item": [] } } }