1

I'm working with Total.js Flow. I would like to know if is possible to refresh my flow if I edit designer.json without rebooting my node server.

General Grievance
  • 4,555
  • 31
  • 31
  • 45

1 Answers1

0

This is currently not possible. But I'll add something like FLOW.reload() might this week :-). But you will need to add some scheduler or watcher for watching of designer.json file because FLOW.reload() will perform only reloading of Flow.

UPDATE: new version of Total.js Flow v6 supports hot reloading of designer.json file. It can be reloaded by executing FLOW.reload() method for example in code component or directly in application.

Peter Sirka
  • 748
  • 5
  • 10
  • Hello, first of all thank you for answering :), I just have another question, I would like to know where the insertion of the json on `designer.json` is made? Thank you :) – Maxence.sailly Feb 19 '19 at 14:13
  • Here is the code: https://github.com/totaljs/flow/blob/master/source/index.js#L1642 – Peter Sirka Feb 19 '19 at 20:37
  • Sorry for delay, I forgot to anwser. Now Flow supports `FLOW.reload()` for hot reloading of `designer.json`. So you can test it here: https://github.com/totaljs/flow (it's beta version with great new features). – Peter Sirka Mar 06 '19 at 09:52
  • Hi Peter, sorry i'm late too, i would like to know i have to implement a watcher ? or Flow.reload() i'll detect the changes alone ? thx – Maxence.sailly Apr 04 '19 at 07:08
  • Hi, yes Flow emits `ON('flow.reload', function() {})` event. You can catch it. – Peter Sirka Apr 04 '19 at 08:41
  • Hi how can i refresh my Components ? – Maxence.sailly Apr 08 '19 at 12:43