Configure Item List to Show Tasks of a Specific Task Type
Tasks is a predefined configuration available for the Item List component that displays a list of the tasks. Out of the box, Tasks retrieves all of the tasks assigned to a user in Windchill. However, you may want to fetch specific types of tasks, such as Review Change Request tasks or Review Problem Report tasks. This topic shows how to configure Tasks to fetch one or more specific types of tasks.
Background
The types of tasks that the Tasks implementation fetches are controlled by the taskTypeFilter key in the configuration JSON.
The taskTypeFilter key is a stringified JSON object array which can include the activityName and workItemProcessTemplate fields. The taskTypeFilter key is located under the implementationConfiguration key.
The activityName field allows you to fetch different types of workflow activities from Windchill, and the workItemProcessTemplate field allows you to fetch different types of work item process templates from Windchill. You can include one or more values for each of activityName and workItemProcessTemplate to retrieve exactly the tasks you want.
Out of the box, the taskTypeFilter key is empty, so Tasks retrieves all tasks from Windchill that are assigned to the user.
For more information see the topic on the Tasks configuration of Item List.
Sample Code 
Below you can find sample codes showing different ways to utilize the taskTypeFilter configuration key.
The following two samples show the taskTypeFilter key with a single value for activityName or workItemProcessTemplate:
"implementationConfiguration": {
"value": {
"taskTypeFilter": {
"value": "[{\"activityName\": \"Submit Problem Report\"}]"
}
}
}
"implementationConfiguration": {
"value": {
"taskTypeFilter": {
"value": "[{\"workItemProcessTemplate\": \"Problem Report Workflow\"}]"
}
}
}
The next sample shows the taskTypeFilter key with multiple activityName values. Similarly, you can also include multiple workItemProcessTemplate values:
"implementationConfiguration": {
"value": {
"taskTypeFilter": {
"value": "[{\"activityName\": \"Submit Problem Report\"}{\"activityName\": \"Analyze Change Request\"}]"
}
}
},
The next two samples show the taskTypeFilter key with one or more values for each of activityName and workItemProcessTemplate:
"implementationConfiguration": {
"value": {
"taskTypeFilter": {
"value": "[{\"activityName\": \"Conduct Online CRB Review\",\"workItemProcessTemplate\": \"Change Request Workflow\"}]"
}
}
}
"implementationConfiguration": {
"value": {
"taskTypeFilter": {
"value": "[{\"activityName\": \"Conduct Online CRB Review\",\"workItemProcessTemplate\": \"Change Request Workflow\"},{\"activityName\": \"Submit Problem Report\",\"workItemProcessTemplate\": \"Problem Report Workflow\"}]"
}
}
}
Step-by-Step Instructions
To create a mashup that shows a user’s tasks, follow these steps:
1. Open ThingWorx Composer
and create a Responsive mashup.
2. Enter a Name and a Project. Then save the mashup and navigate to the Design tab.
3. In the left dock, navigate to the Widgets panel and select the Item List widget. Drag it into the canvas to add it to your mashup.
4. Click Gear icon in the top right corner of the Widget Properties panel. The configuration dialog box opens.
5. From the Configuration Type drop-down menu, select Tasks. The Configuration field populates with the out-of-the-box JSON configuration for Tasks.
6. In the Configuration field, edit taskTypeFilter to include the appropriate values for activityName and workItemProcessTemplate to fetch the desired tasks.
7. Click Done and then save the mashup.
Tasks is now configured to show the desired tasks.
Was this helpful?