任务标识
“任务标识”是“项标识”组件的预定义配置,用于显示一个包含 Windchill 任务基本信息的面板。任务标识面板提供有关任务及其关联更改请求的基本信息。此面板包括更改请求的主要和次要标题以及标识属性。此面板中的默认属性有“角色”、“截止日期”、“状况”、“类别”和“请求优先级”。“任务标识”面板中还嵌入了“操作栏”组件。此面板中包含的默认操作有“批准”“拒绝”“分析”“重新分配”
下面是一个示例图像,其中显示了“任务标识”的预定义配置:
绑定属性 
有关绑定“任务标识”的信息,请参阅项标识组件。
* 
对于“任务标识”,输入绑定属性支持 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 对象类型。
配置属性 
有关配置“任务标识”的信息,请参阅项标识组件。
属性名称
说明
属性类型
默认值
必需或可选
primaryTitle
有关详细信息,请参阅项标识
接受 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 对象类型的属性。
不适用
必需
secondaryTitle
有关详细信息,请参阅项标识
接受 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 对象类型的属性。
不适用
必需
attributes
有关详细信息,请参阅项标识
接受 PTC.Workflow.WorkItemPTC.ChangeMgmt.ChangeRequest 对象类型的属性。
不适用
必需
配置示例 
{
"primaryTitle": {
"selectedValues": {
"data": [
{
"itemListsData": [
{
"items": [
{
"numericIdentifier": 1,
"id": "Subject|SubjectName"
}
],
"objectType": "PTC.Workflow.WorkItem"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"pattern": "%1",
"filteredValues": {
"data": [
{
"itemListsData": [
{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
}
},
"actionBarConfiguration": {
"value": {
"actionBarConfigurationJSON": {
"value": "{ \"maxItemsToShow\": { \"value\": 2 }, \"modelThingName\": { \"entityName\": \"PTC.ActionBarModel.Thing\" }, \"actions\": { \"selectedValues\": { \"data\": [ { \"itemListsData\": [ { \"items\": [ { \"id\": \"Approve\", \"additionalData\": { \"actionConfiguration\": { \"overrideLabel\": { \"value\": \"\" }, \"popupHeight\": { \"value\": 479 }, \"actionButtonVisibility\": { \"selectedKey\": \"HideUnavailable\" }, \"buttonStyle\": { \"selectedKey\": \"primary\" }, \"mashupName\": { \"mashupName\": \"PTC.AccessApp.WindchillServices.RoutingOptionMashup\" }, \"fireEventOnFinish\": { \"value\": false }, \"activityType\": { \"selectedKey\": \"popup\" }, \"redirectAfterPopupSuccess\": { \"mashupName\": \"PTC.MyTasksAppMashup\" }, \"popupWidth\": { \"value\": 600 } } }, \"ordinal\": 10 }, { \"id\": \"Reject\", \"additionalData\": { \"actionConfiguration\": { \"overrideLabel\": { \"value\": \"\" }, \"popupHeight\": { \"value\": 479 }, \"actionButtonVisibility\": { \"selectedKey\": \"HideUnavailable\" }, \"buttonStyle\": { \"selectedKey\": \"primary\" }, \"mashupName\": { \"mashupName\": \"PTC.AccessApp.WindchillServices.RoutingOptionMashup\" }, \"fireEventOnFinish\": { \"value\": false }, \"activityType\": { \"selectedKey\": \"popup\" }, \"redirectAfterPopupSuccess\": { \"mashupName\": \"PTC.MyTasksAppMashup\" }, \"popupWidth\": { \"value\": 600 } } }, \"ordinal\": 20 }, { \"id\": \"Analyze\", \"additionalData\": { \"actionConfiguration\": { \"overrideLabel\": { \"value\": \"\" }, \"popupHeight\": { \"value\": 479 }, \"actionButtonVisibility\": { \"selectedKey\": \"HideUnavailable\" }, \"buttonStyle\": { \"selectedKey\": \"primary\" }, \"mashupName\": { \"mashupName\": \"PTC.AccessApp.WindchillServices.RoutingOptionMashup\" }, \"fireEventOnFinish\": { \"value\": false }, \"activityType\": { \"selectedKey\": \"popup\" }, \"redirectAfterPopupSuccess\": { \"mashupName\": \"PTC.MyTasksAppMashup\" }, \"popupWidth\": { \"value\": 600 } } }, \"ordinal\": 30 }, { \"id\": \"Reassign\", \"additionalData\": { \"actionConfiguration\": { \"overrideLabel\": { \"value\": \"[[PTC.AccessApp.Reassign]]\" }, \"popupHeight\": { \"value\": 579 }, \"actionButtonVisibility\": { \"selectedKey\": \"AlwaysShown\" }, \"buttonStyle\": { \"selectedKey\": \"primary\" }, \"mashupName\": { \"mashupName\": \"PTC.AccessApp.WindchillServices.ReassignActionMashup\" }, \"fireEventOnFinish\": { \"value\": false }, \"activityType\": { \"selectedKey\": \"popup\" }, \"redirectAfterPopupSuccess\": { \"mashupName\": \"PTC.MyTasksAppMashup\" }, \"popupWidth\": { \"value\": 600 } } }, \"ordinal\": 40 } ], \"objectType\": \"WT.WorkItem.Actions\" } ], \"adapter\": { \"instanceName\": \"windchill\", \"thingName\": \"PTC.WCAdapter\" } } ] } } }"
}
}
},
"showSecondaryIcon": {
"version": "1.0.0",
"value": false
},
"secondaryTitle": {
"selectedValues": {
"data": [
{
"itemListsData": [
{
"items": [
{
"numericIdentifier": 1,
"id": "Activity|Name"
}
],
"objectType": "PTC.Workflow.WorkItem"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"pattern": "%1",
"filteredValues": {
"data": [
{
"itemListsData": [
{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
}
},
"attributes": {
"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": "RequestPriority#Display",
"ordinal": 4
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true,
"filteredValues": {
"data": [
{
"itemListsData": [
{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
}
},
"showImage": {
"version": "1.0.0",
"value": false
}
}
自定义服务 
除配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅自定义服务的输入/输出示例
名称
说明
GetConfigurations
返回“任务标识”实施的可用配置。
参数:
返回:JSON
GetImplementationLabel
返回此组件的本地化名称或可用于获取此本地化名称的标记。此本地化名称显示在 Mashup Builder 用户界面中。
参数:
返回:字符串
GetItemIdentityAttributes
检查配置并添加所需的任何附加属性,然后调用 GetAttributeValues 以从后端系统获取所有属性值。
用于将工作项状况添加到属性列表中。工作项状况可确定是启用还是禁用“操作栏”。
参数:
input (必需) - CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。
configuration (可选) - JSON,其中包含从“定制管理器”资源获得的最终合并配置。
attributes (必需) - JSON,其中包含在配置中指定或通过定制方式设置的预设属性列表。
返回:JSON
GetAttributesValues
返回具有属性及其值的 JSON。
参数:
input (必需) - CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。
configuration (可选) - JSON,其中包含从“定制管理器”资源获得的最终合并配置。
attributes (必需) - JSON,其中包含预设属性和附加属性的列表。
返回:CCO 格式的 JSON
实施定义 
{
"array": [
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.Workflow.WorkItem",
"selectionGroupIds": [
"WI-CR"
]
},
{
"objectType": "PTC.ChangeMgmt.ChangeRequest",
"selectionGroupIds": [
"WI-CR"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": ""
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory": true,
"key": "primaryTitle"
},
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.Workflow.WorkItem",
"selectionGroupIds": [
"WI-CR"
]
},
{
"objectType": "PTC.ChangeMgmt.ChangeRequest",
"selectionGroupIds": [
"WI-CR"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": ""
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory": true,
"key": "secondaryTitle"
},
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.Workflow.WorkItem",
"selectionGroupIds": [
"WI-CR"
]
},
{
"objectType": "PTC.ChangeMgmt.ChangeRequest",
"selectionGroupIds": [
"WI-CR"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": "",
"maximumSelectedAttributes": 5,
"minimumSelectedAttributes": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory": true,
"key": "attributes"
},
{
"property": {},
"value": {
"initializationData": {
"constraints": {},
"properties": {
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"constraints": {},
"properties": {
"hintText": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "actionBarConfigurationJSON"
}
]
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory": false,
"key": "actionBarConfiguration"
},
{
"value": {
"initializationData": {
"properties": {},
"constraints": {},
"additionalDefinition": [
{
"true": {
"label": "[[PTC.Nav.Yes]]",
"additionalDefinition": [
{
"key": "itemIdentityShowImageDefinitions",
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "defaultImagePath"
}
]
}
]
},
"false": {
"label": "[[PTC.Nav.No]]",
"additionalDefinition": []
},
"default": false
}
]
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"key": "showImage"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": false,
"true": {
"additionalDefinition": [],
"label": "[[PTC.AccessApp.Yes]]"
},
"false": {
"additionalDefinition": [],
"label": "[[PTC.AccessApp.No]]"
}
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "showSecondaryIcon"
}
]
}
这对您有帮助吗?