属性通用
“属性通用”是“属性”组件的通用预定义配置,可从这里开始配置特性组件。由于通用配置未指定任何属性,您需要编辑其配置才能进行添加。
绑定特性 
有关绑定“属性通用”配置的信息,请参阅属性组件。
* 
对于“属性通用”,input 绑定特性支持下列对象类型:PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequestPTC.ProdMgmt.PartPTC.CADDocumentMgmt.CADDocument
配置特性 
有关“属性通用”的所有可用配置特性的列表,请参阅属性组件的配置特性表。下表提供“属性通用”的相关配置特性的其他信息。
有关详情,请参阅组件配置结构
有关子特性的详情,请参阅子特性和容器键
特性名称
说明
特性类型
默认值
必需或可选
attributes
有关详情,请参阅属性
接受具有特定对象类型的属性,具体取决于输入数据中项的对象类型。详情如下:
对于对象类型为 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 的输入,此特性可以接受对象类型为 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 的属性。
例如,如果输入数据中的项具有 PTC.Workflow.WorkItem 对象类型,此特性可接受具有 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 对象类型的属性。
对于对象类型为 PTC.ProdMgmt.Part 的输入,此特性可以接受对象类型为 PTC.ProdMgmt.Part 的属性。
对于对象类型为 PTC.CADDocumentMgmt.CADDocument 的输入,此特性可以接受对象类型为 PTC.CADDocumentMgmt.CADDocument 的属性。
不适用
必需
示例配置 
用于水平布局的示例配置:
{
"layout": {
"selectedKey": "horizontal",
"additionalData": {
"isMultilineDefinition": {
"isMultiLine": {
"additionalData": {
"dimensionDefinition": {
"maxHeight": {
"version": "1.0.0",
"value": 200
}
}
},
"version": "1.0.0",
"value": true
}
}
},
"version": "1.0.0"
},
"attributes": {
"sets": [{
"data": {
"selectedValues": {
"data": [{
"itemListsData": [{
"items": [{
"id": "Description",
"ordinal": 0
}, {
"id": "ProposedSolution",
"ordinal": 1
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true,
"version": "1.0.0"
},
"name": ""
}
],
"inTailoring": true,
"filteredValues": {
"data": [{
"itemListsData": [{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
},
"version": "1.0.0"
},
"messageWhenNoAttributes": {
"version": "1.0.0",
"value": "[[PTC.Nav.AttributesGeneric.NoAttributesMessage]]"
},
"baseConfigurationVersion": {
"value": "nav.2"
},
"implementationConfigurationVersion": {
"value": "nav.1"
},
"hideLabel": {
"value": false
}
}
用于垂直布局的示例配置:
{
"layout": {
"selectedKey": "vertical",
"additionalData": {
"isMultilineDefinition": {
"isMultiLine": {
"additionalData": {
"dimensionDefinition": {
"maxHeight": {
"version": "1.0.0",
"value": 200
}
}
},
"version": "1.0.0",
"value": true
}
}
},
"version": "1.0.0"
},
"attributes": {
"sets": [{
"data": {
"selectedValues": {
"data": [{
"itemListsData": [{
"items": [{
"id": "Description",
"ordinal": 0
}, {
"id": "ProposedSolution",
"ordinal": 1
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true,
"version": "1.0.0"
},
"name": ""
}
],
"inTailoring": true,
"filteredValues": {
"data": [{
"itemListsData": [{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
},
"version": "1.0.0"
},
"messageWhenNoAttributes": {
"version": "1.0.0",
"value": "[[PTC.Nav.AttributesGeneric.NoAttributesMessage]]"
},
"baseConfigurationVersion": {
"value": "nav.2"
},
"implementationConfigurationVersion": {
"value": "nav.1"
},
"hideLabel": {
"value": false
}
}
自定义服务 
除了配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写的服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅自定义服务的输入/输出示例
名称
说明
GetConfigurations
返回“属性通用”实现的可用配置。
参数:
返回:JSON
GetImplementationLabel
返回此组件的本地化名称,或返回可用于获取此本地化名称的标记。此本地化名称显示在 Mashup Builder 用户界面中。
参数:
返回:字符串
GetAttributesValues
返回具有属性及其值的 JSON。
参数:
input (必需) - CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。
configuration (可选) - JSON,其中包含从“定制管理器”资源获得的最终合并配置。
attributes (必需) - JSON,其中包含预设属性列表。
返回:CCO 格式的 JSON
实现定义 
{
"array": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"additionalDefinition": [],
"updateServiceName": "",
"minimumSelectedAttributes": null,
"supportedTypes": {
"data": [
{
"itemListsData": [
{
"selectionGroupIds": [
"CR"
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
},
{
"selectionGroupIds": [
"WI"
],
"objectType": "PTC.Workflow.WorkItem"
},
{
"selectionGroupIds": [
"Part"
],
"objectType": "PTC.ProdMgmt.Part"
},
{
"selectionGroupIds": [
"CAD"
],
"objectType": "PTC.CADDocumentMgmt.CADDocument"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring": true
},
"addServiceName": "",
"maximumSelectedAttributes": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.AttributesSetsSelector"
},
"mandatory": true,
"key": "attributes"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": "vertical",
"options": [
{
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": true,
"true": {
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxHeight"
}
],
"key": "dimensionDefinition"
}
],
"label": "[[PTC.Nav.Yes]]"
},
"false": {
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxWidth"
}
],
"key": "dimensionDefinition"
}
],
"label": "[[PTC.Nav.No]]"
},
"label": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "isMultiLine"
}
],
"key": "isMultilineDefinition"
}
],
"description": "attribute name-value pairs are shown in the user interface vertically stacked one below the other",
"label": "[[PTC.Nav.Attributes.Layout.Vertical]]",
"key": "vertical"
},
{
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxHeight"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxWidth"
}
],
"key": "dimensionDefinition"
}
],
"description": "attribute name-value pairs are shown in the user interface in column form, or horizontally stacked one next to the other",
"label": "[[PTC.Nav.Attributes.Layout.Horizontal]]",
"key": "horizontal"
}
],
"updateServiceName": null,
"addServiceName": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.RadioButton"
},
"mandatory": true,
"key": "layout"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "messageWhenNoAttributes"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": false,
"true": {
"additionalDefinition": [],
"label": null
},
"false": {
"additionalDefinition": [],
"label": null
},
"label": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "hideLabel"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "inputDisplay"
}
]
}
这对您有帮助吗?