更新时间:2024-11-18 GMT+08:00
分享

修订多维版本的数据实例

功能介绍

创建多维版本的数据实例后,您可以在需要调用接口的请求参数中传入该数据实例的多维版本属性,用于多维版本管理数据实例。

本章节以修订接口(revise)为例,指导您如何使用多维版本&多维分支功能。

URI

  • URL格式:

    POST http://{Endpoint}/rdm_{appID}_app/publicservices/dynamic/api/{entityName}/revise

  • 参数说明:
    表1 URI参数说明

    参数

    是否必填

    参数类型

    描述

    Endpoint

    String

    承载REST服务端点的服务器域名或IP地址。

    appID

    String

    应用ID。

    entityName

    String

    实体的英文名称。

前提条件

请求参数

表2 请求body参数

参数

是否必填

参数类型

描述

creator

String

创建者。

modifier

String

更新者。

masterId

String

主对象ID。

workCopyType

Object

此配置项用于创建多维版本数据实例时是否继承其对应的关系实例。根据业务需求,选择类型。

  • BOTH:若存在关系实例引用此数据实例作为源端实例或目标端实例,创建后的数据实例将继承这些关系实例。
  • SOURCE:若存在关系实例引用此数据实例作为源端实例,创建后的数据实例将继承这些关系实例。
  • TARGET:若存在关系实例引用此数据实例作为目标端实例,创建后的数据实例将继承这些关系实例。
  • NONE:创建后的数据实例将不继承任何关系实例。
  • CUSTOM:若指定的关系实体集合对应的关系实例引用此数据实例作为源端实例或目标端实例,创建后的数据实例将继承这些关系实例。

workingCopy

Boolean

是否工作副本,默认值false。

customLinkSet

List

关系实体名称的集合。

“workCopyType”设置为“CUSTOM”时,需要设置此参数。

needSetNull

List

指定不复制的属性。被指定不复制的属性,其返回值将被设置为“null”

view2

说明:

如果用户在应用设计态配置“多维版本”功能配置时,将此多维版本属性设置为必填,则请求参数为必填项。

Object

自定义的多维版本属性。

view2.id

String

多维版本属性的ID。

view2.clazz

String

多维版本属性的类名。

响应参数

返回修订后的多维版本数据实例。

请求示例

示例背景

  • 已在cn-north-4区域的TestApp应用中,构建一个名称为“TestMV”、多维版本属性为“view2”的M-V模型数据实体,并完成了实体发布、应用发布和应用部署。
  • 已在应用运行态通过可视化页面或API的方式创建一个多维版本的数据实例,其数据实例的唯一编码为“523616294595981234”

您的业务数据存在较大变更,希望可以创建新的版本,差异化管理实例数据。

示例代码

{
    "params": {
        "modifier": "XDM_Developer",
        "masterId": "637652965003370496",
        "workCopyType": "BOTH",
        "view2": {
            "id": "4"
        }
    }
}

响应示例

{
    "result": "SUCCESS",
    "data": [
        {
            "id": "637773750976122880",
            "creator": "XDM_Developer",
            "modifier": "XDM_Developer",
            "createTime": "2024-05-30T14:05:11.504+0000",
            "lastUpdateTime": "2024-05-30T14:05:11.504+0000",
            "rdmVersion": 1,
            "rdmDeleteFlag": 0,
            "rdmExtensionType": "MultiViewMv",
            "tenant": {
                "id": "-1",
                "creator": "xdmAdmin",
                "modifier": "xdmAdmin",
                "createTime": "2024-05-30T01:11:34.110+0000",
                "lastUpdateTime": "2024-05-30T01:11:34.110+0000",
                "rdmVersion": 1,
                "rdmDeleteFlag": 0,
                "rdmExtensionType": "Tenant",
                "tenant": null,
                "className": "Tenant",
                "name": "basicTenant",
                "description": "默认租户",
                "kiaguid": null,
                "securityLevel": "internal",
                "nameEn": null,
                "code": "basicTenant",
                "disableFlag": false,
                "dataSource": "DefaultDataSource"
            },
            "className": "MultiViewMv",
            "name": "1",
            "description": null,
            "kiaguid": null,
            "securityLevel": "internal",
            "master": {
                "id": "637652965003370496",
                "creator": "XDM_Developer",
                "modifier": "XDM_Developer",
                "createTime": "2024-05-30T06:05:13.911+0000",
                "lastUpdateTime": "2024-05-30T06:14:31.070+0000",
                "rdmVersion": 2,
                "rdmDeleteFlag": 0,
                "rdmExtensionType": "MultiViewMvMaster",
                "tenant": {
                    "id": "-1",
                    "creator": "xdmAdmin",
                    "modifier": "xdmAdmin",
                    "createTime": "2024-05-30T01:11:34.110+0000",
                    "lastUpdateTime": "2024-05-30T01:11:34.110+0000",
                    "rdmVersion": 1,
                    "rdmDeleteFlag": 0,
                    "rdmExtensionType": "Tenant",
                    "tenant": null,
                    "className": "Tenant",
                    "name": "basicTenant",
                    "description": "默认租户",
                    "kiaguid": null,
                    "securityLevel": "internal",
                    "nameEn": null,
                    "code": "basicTenant",
                    "disableFlag": false,
                    "dataSource": "DefaultDataSource"
                },
                "className": "MultiViewMvMaster"
            },
            "branch": {
                "id": "637773751051620352",
                "creator": "XDM_Developer",
                "modifier": "XDM_Developer",
                "createTime": "2024-05-30T14:05:11.496+0000",
                "lastUpdateTime": "2024-05-30T14:05:11.496+0000",
                "rdmVersion": 1,
                "rdmDeleteFlag": 0,
                "rdmExtensionType": "MultiViewMvBranch",
                "tenant": {
                    "id": "-1",
                    "creator": "xdmAdmin",
                    "modifier": "xdmAdmin",
                    "createTime": "2024-05-30T01:11:34.110+0000",
                    "lastUpdateTime": "2024-05-30T01:11:34.110+0000",
                    "rdmVersion": 1,
                    "rdmDeleteFlag": 0,
                    "rdmExtensionType": "Tenant",
                    "tenant": null,
                    "className": "Tenant",
                    "name": "basicTenant",
                    "description": "默认租户",
                    "kiaguid": null,
                    "securityLevel": "internal",
                    "nameEn": null,
                    "code": "basicTenant",
                    "disableFlag": false,
                    "dataSource": "DefaultDataSource"
                },
                "className": "MultiViewMvBranch",
                "version": "C"
            },
            "latest": true,
            "latestIteration": true,
            "versionCode": 3,
            "iteration": 1,
            "version": "C",
            "latestVersion": true,
            "workingCopy": false,
            "workingState": {
                "code": "CHECKED_IN",
                "cnName": "已检入",
                "enName": "checked in",
                "alias": "CHECKED_IN"
            },
            "checkOutUserName": null,
            "checkOutTime": null,
            "preVersionId": "637760894251569152",
            "view2": {
                "id": "4",
                "creator": "XDM_Developer",
                "modifier": "XDM_Developer",
                "createTime": "2024-05-30T07:17:01.666+0000",
                "lastUpdateTime": "2024-05-30T07:17:01.666+0000",
                "rdmVersion": 1,
                "rdmDeleteFlag": 0,
                "rdmExtensionType": "Entity",
                "tenant": {
                    "id": "-1",
                    "creator": "xdmAdmin",
                    "modifier": "xdmAdmin",
                    "createTime": "2024-05-30T01:11:34.110+0000",
                    "lastUpdateTime": "2024-05-30T01:11:34.110+0000",
                    "rdmVersion": 1,
                    "rdmDeleteFlag": 0,
                    "rdmExtensionType": "Tenant",
                    "tenant": null,
                    "className": "Tenant",
                    "name": "basicTenant",
                    "description": "默认租户",
                    "kiaguid": null,
                    "securityLevel": "internal",
                    "nameEn": null,
                    "code": "basicTenant",
                    "disableFlag": false,
                    "dataSource": "DefaultDataSource"
                },
                "className": "Entity",
                "name": null,
                "description": null,
                "kiaguid": null,
                "securityLevel": "internal",
                "ref": null,
                "lifecycleTemplate": null,
                "lifecycleState": null,
                "folder": null,
                "clsAttrs": null,
                "owner": [],
                "aclEntry": null,
                "rootNode": null,
                "parentNode": null,
                "leafFlag": true,
                "fullPath": "4/",
                "rawFullPath": "4/",
                "disableFlag": false,
                "extAttrs": [],
                "extAttrMap": {}
            },
            "lifecycleTemplate": null,
            "lifecycleState": null,
            "disableFlag": false,
            "aclEntry": null,
            "clsAttrs": null,
            "owner": [],
            "extAttrs": [],
            "extAttrMap": {}
        }
    ],
    "errors": []
}

相关文档