fantonangeli opened a new issue, #3324:
URL: https://github.com/apache/incubator-kie-tools/issues/3324

   For the WF 
[here](https://gist.github.com/fantonangeli/49a39426e5921dc3b16e675be3a5694e) 
the `ForEachState` node in the diagram is not highlighted. (See the screenshot)
   With @fjtirado we discovered that we should highlight the nodes using the 
metadata, which can be fetched with the query below: 
   ```graphql
       nodes {
         id
         nodeId
         name
         enter
         exit
         type
         definitionId
         __typename
       }
       nodeDefinitions {
         id
         name
         type
         uniqueId
         metadata {
           UniqueId
           state
           branch
           action
         }
       }
   ```
   
   To obtain a response like this:
   ```json
   "nodes": [
            {
               "id": "61ff08b5-9adc-4d5f-a291-74127478f4c4",
               "nodeId": "3",
               "name": "ForEach",
               "enter": "2025-10-24T09:46:40.907Z",
               "exit": "2025-10-24T09:46:40.925Z",
               "type": "ForEachNode",
               "definitionId": "3",
               "__typename": "NodeInstance"
             },
   ]
   ...
   "nodeDefinitions": [
             {
               "id": "3",
               "name": "ForEach",
               "type": "ForEachNode",
               "uniqueId": "3",
               "metadata": {
                 "UniqueId": "3",
                 "state": "ForEachState",
                 "branch": null,
                 "action": null
               }
             },
   ]
   ```
   
   Then we can join logically `nodes.nodeId` with 
`nodeDefintions.definitionId`, to obtain the `nodeDefinitions[].name` to 
highlight in the Diagram.
   
   <img width="1319" height="605" alt="Image" 
src="https://github.com/user-attachments/assets/35f8282a-3269-4201-9713-70863d0f68db";
 />


-- 
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