Monitoring state of variable flag (toggle true/false) in Azure Table?












0














I want at some stage in my bot dialog waterfall to monitor some JSON flag within Azure Table to change from true to false (and the flag could switch true/false a few times), and then I should inform user (console.log etc.) each time depending whether the flag is false or true currently - what kind of structure should I use in Node.js?




  • if..then..

  • while..do

  • callbacks

  • promises

  • async-await

  • any relevant npm packages etc?


The best structure could be something like...do (something) until (condition) then (do some alternative) - but with possibility to monitor several changes of the flag - e.g. true -> false -> true -> false... (4-6 changes of flag state, not more...) and to inform user about that..



But I couldn't find something which does the job like do..until..then as mentioned above...










share|improve this question





























    0














    I want at some stage in my bot dialog waterfall to monitor some JSON flag within Azure Table to change from true to false (and the flag could switch true/false a few times), and then I should inform user (console.log etc.) each time depending whether the flag is false or true currently - what kind of structure should I use in Node.js?




    • if..then..

    • while..do

    • callbacks

    • promises

    • async-await

    • any relevant npm packages etc?


    The best structure could be something like...do (something) until (condition) then (do some alternative) - but with possibility to monitor several changes of the flag - e.g. true -> false -> true -> false... (4-6 changes of flag state, not more...) and to inform user about that..



    But I couldn't find something which does the job like do..until..then as mentioned above...










    share|improve this question



























      0












      0








      0







      I want at some stage in my bot dialog waterfall to monitor some JSON flag within Azure Table to change from true to false (and the flag could switch true/false a few times), and then I should inform user (console.log etc.) each time depending whether the flag is false or true currently - what kind of structure should I use in Node.js?




      • if..then..

      • while..do

      • callbacks

      • promises

      • async-await

      • any relevant npm packages etc?


      The best structure could be something like...do (something) until (condition) then (do some alternative) - but with possibility to monitor several changes of the flag - e.g. true -> false -> true -> false... (4-6 changes of flag state, not more...) and to inform user about that..



      But I couldn't find something which does the job like do..until..then as mentioned above...










      share|improve this question















      I want at some stage in my bot dialog waterfall to monitor some JSON flag within Azure Table to change from true to false (and the flag could switch true/false a few times), and then I should inform user (console.log etc.) each time depending whether the flag is false or true currently - what kind of structure should I use in Node.js?




      • if..then..

      • while..do

      • callbacks

      • promises

      • async-await

      • any relevant npm packages etc?


      The best structure could be something like...do (something) until (condition) then (do some alternative) - but with possibility to monitor several changes of the flag - e.g. true -> false -> true -> false... (4-6 changes of flag state, not more...) and to inform user about that..



      But I couldn't find something which does the job like do..until..then as mentioned above...







      node.js botframework azure-table-storage azure-bot-service






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '18 at 19:47

























      asked Nov 20 '18 at 19:11









      IAmBotmaker

      35




      35





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399946%2fmonitoring-state-of-variable-flag-toggle-true-false-in-azure-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399946%2fmonitoring-state-of-variable-flag-toggle-true-false-in-azure-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown