-
Notifications
You must be signed in to change notification settings - Fork 230
Open
Labels
Description
For the WF here the ForEachState node in the diagram is not coloured. (See the screenshot)
With @fjtirado we discovered that we should coloured the nodes using the metadata, which can be fetched with the query below:
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:
"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
}
},
]The current colouring logic can be found here
The new node coloring logic should work as follows:
- For S
tartNode/EndNodetypes: Always color usingnode.name - For other node types:
- Find the corresponding nodeDefinition by matchingnode.definitionIdwithnodeDefinition.id
- IfnodeDefinition.metadata.stateexists (not null), color usingmetadata.statevalue
- IfnodeDefinition.metadata.stateis null or nodeDefinition not found, skip the node (don't color it)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog