属性通用
“属性通用”是“属性”组件的常规预定义配置,可作为配置“属性”组件的起点。由于通用配置未指定任何属性,因此您需要编辑其配置才能进行添加。
绑定属性 
有关绑定“属性通用”配置的信息,请参阅属性组件。
* 
对于“属性通用”,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":{
"dimensionDefinition":{
"maxHeight":{
"version":"1.0.0",
"value":200
},
"maxWidth":{
"version":"1.0.0",
"value":300
}
}
},
"version":"1.0.0"
},
"attributes":{
"sets":[
{
"data":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Role#Display",
"ordinal":0
},
{
"id":"Activity|Deadline",
"ordinal":1
},
{
"id":"Status#Display",
"ordinal":2
}
],
"objectType":"PTC.Workflow.WorkItem"
},
{
"items":[
{
"id":"Category#Display",
"ordinal":3
},
{
"id":"Description",
"ordinal":4
}
],
"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"
}
}
用于垂直布局的配置示例:
{
"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"
}
}
自定义服务 
除配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅自定义服务的输入/输出示例
名称
说明
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]]"
}
}
},
"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"
}
]
}
这对您有帮助吗?