From da98576260ef9a23ae24e42f58a01f11a9ec6dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 12 Jul 2018 15:30:10 +0200 Subject: [PATCH] Add note on FSM update messages in API docs --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 71e7294..d46cd4b 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ To set the tail length of logs (the monitor will send back the last `value` char ### FSMManagingEventHandler -To attempt executing a trigger on the FSM use: +To attempt executing a trigger on the FSM use (this will also generate an FSM update message): ``` { "key": "fsm", @@ -266,3 +266,16 @@ To force the broadcasting of an FSM update you can use this message: } } ``` + +This event handler broadcasts FSM update messages after handling commands in the following format: +``` +{ + "key": "fsm_update", + "data" : + { + "current_state": ...string..., + "valid_transitions": ...array of {"trigger": ...string...} objects... + } +} +``` +