I was under impression that by adding a node to a flow, or moving a node, and deploying the flow through Deploy-Modified Flows the flows containing nodes marked with blue circle should restart.
It does not seem to be always the case.
Import the following flow:
[{"id":"a1b23951.ce6a58","type":"tab","label":"State machine example","disabled":false,"info":""},{"id":"721c9d74.48aec4","type":"state-machine","z":"a1b23951.ce6a58","name":"","triggerProperty":"topic","triggerPropertyType":"msg","stateProperty":"topic","statePropertyType":"msg","outputStateChangeOnly":false,"throwException":false,"states":["initial","updated"],"transitions":[{"name":"update","from":"*","to":"updated"}],"x":300,"y":100,"wires":[["e8c4a0eb.cc77d"]]},{"id":"2806cff8.27fd6","type":"inject","z":"a1b23951.ce6a58","name":"","topic":"update","payload":"updated payload","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":40,"wires":[["721c9d74.48aec4"]]},{"id":"cafda122.04bfa","type":"debug","z":"a1b23951.ce6a58","name":"payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":820,"y":220,"wires":[]},{"id":"57e3d16a.d9ba1","type":"change","z":"a1b23951.ce6a58","name":"payload → \"initial payload\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"initial payload","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":120,"wires":[["cafda122.04bfa"]]},{"id":"e8c4a0eb.cc77d","type":"switch","z":"a1b23951.ce6a58","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"initial","vt":"str"},{"t":"eq","v":"updated","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":160,"wires":[["57e3d16a.d9ba1"],["cafda122.04bfa"]]}]
Deploy it:
Inject the message to update state machine state:
Modify the flow without modifying the node (e.g., move the node, or add a new node not connected to the rest):
Deploy using Modified flows or Modified nodes option:
Result: the state machine remains in the updated state and announces it instead of starting in initial state.
As a bonus, in the above example, I get a message with undefined payload.
If I did the same using used Deploy-Full instead, the state machine would reset to initial state and send the message with Initial payload.
So, either of the following causes the state machine node to reset back to the initial state:
- Deploy-Full
- Deploy-Restart Flows
- modifying the actual flow (connected to the
state machine), other than moving the nodes (e.g., changing a name, deleting and recreating a connection) and deploying with any option (full, modified flows, or modified nodes)
but not:
- Deploy-Modified Flows
- Deploy-Modified Nodes
I'm not sure if it's a problem with the state machine node, or a general one, but it looks buglike to me.
Whether I tamper with the state machine node by moving it, or renaming it, I get the same blue circle indication in the editor, yet the results of Deploy options differ.
What do you think?




