任务标识
“任务标识”是“项标识”组件的预定义配置,用于显示其中包含 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":""
}
}
]
}
},
"expanded":{
"version":"1.0.0",
"value":true
},
"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\": \"tertiary\" }, \"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\": \"tertiary\" }, \"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\": \"tertiary\" }, \"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\": \"tertiary\" }, \"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,
"additionalData":{
"itemIdentityShowImageDefinition":{
"defaultImagePath":{
"value":"/Thingworx/MediaEntities/PTC.Nav.ItemIdentity.ThumbnailTask"
}
}
}
},
"enableExpandCollapse":{
"version":"1.0.0",
"value":true
},
"baseConfigurationVersion":{
"value":"nav.1"
},
"implementationConfigurationVersion":{
"value":"nav.1"
}
}
自定义服务 
除了配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅自定义服务的输入/输出示例
名称
说明
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":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[

],
"updateServiceName":"",
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.ChangeMgmt.ChangeRequest"
},
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.Workflow.WorkItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":true
},
"addServiceName":""
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory":true,
"key":"primaryTitle"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[

],
"updateServiceName":"",
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.ChangeMgmt.ChangeRequest"
},
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.Workflow.WorkItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":true
},
"addServiceName":""
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory":true,
"key":"secondaryTitle"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[

],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.ChangeMgmt.ChangeRequest"
},
{
"selectionGroupIds":[
"WI-CR"
],
"objectType":"PTC.Workflow.WorkItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":true
},
"addServiceName":"",
"maximumSelectedAttributes":"5"
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"attributes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"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"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"defaultImagePath"
}
],
"key":"itemIdentityShowImageDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"showImage"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"showSecondaryIcon"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":true,
"key":"enableExpandCollapse"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":true,
"key":"expanded"
}
]
}
这对您有帮助吗?