Tip: Interface patterns give you an opportunity to explore different interface designs. Be sure to check out How to Adapt a Pattern for Your Application.
Use an interface to display information about instances of a specific process model.
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:
a!queryProcessAnalytics()
to query process dataa!forEach()
to dynamically create a grid's columnsFor this recipe, you'll need a constant pointing to a process report and a process model that has been at least started a few times. If you don't have a process model, you can follow the Process Modeling Tutorial. Once you have some processes, you can follow these steps to create a process report with the default columns and associate it with a constant:
The main expression uses two supporting constants, so let's create them first.
UC_PROCESSES_FOR_PM_REPORT
: Constant of type Document whose value is Processes for Process Model A
.UC_PROCESS_MODEL
: Constant of type Process Model whose value is the process you created.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
a!localVariables(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1
),
local!report: a!queryProcessAnalytics(
report: cons!UC_PROCESSES_FOR_PM_REPORT,
contextProcessModels: {
cons!UC_PROCESS_MODEL
},
query: a!query(
pagingInfo: local!pagingInfo
)
),
a!gridField(
label: local!report.name,
instructions: local!report.description,
data: local!report.data,
columns: a!forEach(
items: local!report.columnConfigs,
expression: a!gridColumn(
label: fv!item.label,
sortField: fv!item.field,
value: if(
fv!item.configuredFormatting = "PROCESS_STATUS_ICON",
a!imageField(
images: choose(
/*Process status go from 0-4, so add 1 to index into the choose list */
1 + tointeger(index(fv!row, fv!item.field, {})),
a!documentImage(
document: a!iconIndicator( icon: "PROGRESS_RUNNING" ),
altText: "Active",
caption: "Active"
),
a!documentImage(
document: a!iconIndicator( icon: "STATUS_OK" ),
altText: "Completed",
caption: "Completed"
),
a!documentImage(
document: a!iconIndicator( icon: "PROGRESS_PAUSED" ),
altText: "Paused",
caption: "Paused"
),
a!documentImage(
document: a!iconIndicator( icon: "STATUS_NOTDONE" ),
altText: "Cancelled",
caption: "Cancelled"
),
a!documentImage(
document: a!iconIndicator( icon: "STATUS_ERROR" ),
altText: "Paused By Exception",
caption: "Paused By Exception"
)
) ),
index(fv!row, fv!item.field)
)
)
),
rowHeader: 1,
pageSize: 20
)
)
Display Processes by Process Model with Status Icons