Display the tasks for a user in a paging grid and allow them to click on a task to navigate to the task itself.
This design pattern is not recommended for offline interfaces because reflecting immediate changes in an interface based on user interaction requires a connection to the server.
This scenario demonstrates:
How to use a!queryProcessAnalytics() to query task data
How to display a SAIL grid based on a process report's configuration
How to use the process report's configured formatting in SAIL
How to convert the process report's configured drilldown to SAIL links
For this recipe, you'll need a constant pointing to a task report. Follow these steps to create a task report with the default columns and associate it with a constant:
From your application, click New, and then click Process Report.
Select Create from scratch.
Name the report Tasks for User A, and provide a description that will be displayed as the label and instructions of the SAIL grid.
Under Report Type, select Task.
Under Context Type, select Tasks by owner.
Specify a folder to contain the report, and then click Create & Edit.
The process report opens in a new tab.
In the toolbar, click Edit.
In the Report Options dialog, click the Data tab.
Click the Name link.
Check the Link to more information checkbox and from the Link to drop-down, select Task Details.
Save the report by clicking Save in the toolbar.
The main expression uses a supporting constant constant, so let's create them first.
UC_TASKS_FOR_USER_REPORT: Constant of type Document whose value is Tasks for User A
Now that we've created the supporting rules, let's move on to the main expression.
Test It Out
Sort and (if you have enough tasks) page your grid
Click on a task's name to view the task form
Notable Implementation Details
This example shows how to specially handle one kind of formatting and one kind of drill down, but the same pattern can be applied to provide a SAIL interpretation of other process report configurations.