-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 24
-
Component/s: Content Views, Workflow
-
Tags:
-
Impact type:Configuration Change
-
Upgrade notes:
I want to customize the content-view displayed in Home > Workflow, so it is sorted by my custom mytaskdoc:priority field, and this field also is displayed in the colums of the result table layout.
It is the "user_open_tasks" that is used in this page, and here is what I did:
- Create a MyTaskDoc document type, with the appropriate facets and lifecycle (so it can be used as task document). The schema just have a priority integer field
- Import the task schema in the registry (because we need to use it in the search layout of the content-view and in the table layout of the results)
{ "schemas": { "task": { "@prefix": "nt", "accepted": "boolean", "actors": "string[]", "delegatedActors": "string[]", "directive": "string", "dueDate": "date", "initiator": "string", "name": "string", "processId": "string", "targetDocumentId": "string", "targetDocumentsIds": "string[]", "taskComments": { "fields": { "author": "string", "creationDate": "date", "text": "string" }, "type": "complex[]" }, "task_variables ": { "fields": { "value": "string", "key": "string" }, "type": "complex[]" } } } }
- Create the routing_user_open_task_listing Table Layout. It will be used by the content view.
- Add the
{mytaskdoc:priority}
field in one column, default value 0
- NOTE: This step probably is not mandatory, it should be able to create the result columns directly in the content-view. But I started my testing by overriding this result table layout (and it worked with the default "user_open_tasks" content view)
- Add the
{mytaskdoc:priority}
- Create the "user_open_tasks" content view
- Set its static query as the one defined in the original XML:
ecm:mixinType IN ('RoutingTask') AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState = 'opened' AND ecm:isProxy = 0
- Set the default sort on mytaskdoc:priority, descending ("ascending" not checked)
- Create the search layout with
- Task name (field nt:name), ILIKE as operator
- Task due date (field nt:dueDate), BETWEEN as operator
- Priority (field mytaskdoc:priority, = as operator)
- Set the result columns to the existing {routing_user_open_task_listing}} Table Layout.
- Set its static query as the one defined in the original XML:
Also, of course, have a workflow whose tasks use the MyTaskDoc document type. Can be a basic one: Just start/stop and an "Approve" task which uses this document type.
Now, update the server, create some documents, start the workflow on each of them. No need to handle the priority at this time.
Then, go to Home > Workflow, see the list of tasks is displayed and ordered by priority (well, they are all at O).
Query on priority, for example, query on priority equals 5 => all the tasks are displayed, and server.log states the priority field is not found
- depends on
-
NXP-17082 Show warn at startup when not overriding a schema
- Resolved