Use the order-by clause to specify the sort criteria for the query result set. The order-by clause syntax is the same as an SQL order-by clause; use commas to separate each part of the clause. Each part of the clause must specify a property from one of the predefined views.
If you identify more than one property, the query result set is ordered by the values of the first property, then by the values of the second property, and so on.
If you do not want to sort the query result set, you must specify null for the order-by clause.
Examples of order-by clauses:
Sorts the query result alphabetically by the process-template name.
Sorts the query result by the creation date and, for a specific date, sorts the results alphabetically by the process-instance name in reverse order.
Sorts the query result by the activity owner, then the activity-template name, and then the state of the activity.