wmedvede commented on PR #3183:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3183#issuecomment-2988759386

   Hello @fantonangeli 
   
   I don't think the sorting by **"id"**  (which corresponds to the process 
instanced id)  is implemented for the ProcessInstances query, but also I don't 
see that the documentation is saying that it is possible.
   
   Looking at here: 
   
https://sonataflow.org/serverlessworkflow/main/data-index/data-index-core-concepts.html
  I don't see any example.
   
   Also, if we look in the DI GraphqlUI in the sort options for the 
ProcessInstances query, we are not showing the **"id"** field as available for 
sorting.
   
   We can sort for example by **"processId"**, but not by **"id"**
   
   ```
   {
     ProcessInstances (orderBy: {processId: DESC} ) {
        processId,
       state,
       serviceUrl,
       state
     }
   }
   ```
   
   
   ![Screenshot from 2025-06-19 
19-10-25](https://github.com/user-attachments/assets/fbf43a5b-c805-435b-a6b2-626947a39efc)
   
   
   While it could be technically possible to implement the sorting by **"id"**, 
in practice I don't think it't be useful, since the **"id"** (the process 
instance id) has values like:  **"a0ac78ad-54e6-4168-882e-ac2849706e69"** .
   
   I think that instead of sorting by **"id"** , this query can internally sort 
by **"processId"**, and thus, users can group all the instances that belongs to 
the same ProcessDefinition.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to