• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    Integrate Blockly

    scheduled pinned locked moved Developers Zone
    11 posts 2 posters 4.6k views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • B offline
      blacksheepinc
      global:last-edited-by,

      Hi everyone!
      How difficult would it be to integrate Blockly as a more use friendly way to make rules?
      Something like blockly would make a javascript code as a result then added to rules list.
      How would you start to implement this?

      Thank you!
      Best regards,
      Mark

      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @blacksheepinc
        global:last-edited-by,

        @blacksheepinc MyController uses pure Java to configure rules. However, you can use script based condition. You can use your Blockly generated code with some modifications.

        B one-reply-to-this-post last-reply-time reply quote 0
        • B offline
          blacksheepinc @jkandasa
          global:last-edited-by,

          @jkandasa Thank you!
          As I saw there are 2 different kind of script defined at the rules page. Operation and Condition.
          I guess at the backend loop it checks every condition and if it's true it will perform the operation.
          Is it possible to make a script with blockly(condition and operation in one script), save as a script file, then use them as condition?

          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
          • jkandasaJ offline
            jkandasa @blacksheepinc
            global:last-edited-by,

            @blacksheepinc In the backend, it checkes only the file you have mentioned on your rule. not all the scripts. Operation is common for many activites. However you can address your operation also on condition itself.

            B one-reply-to-this-post last-reply-time reply quote 0
            • B offline
              blacksheepinc @jkandasa
              global:last-edited-by,

              @jkandasa I see.
              I made a simple version where the blockly makes javascript as output, then I can run it, and it performs the task, but it is manual and done by the front-end.
              I would like to make an extra menu, next to the rules menu.
              It would work like the same, first there is a list, you can enable/disable or add/edit.
              Then the rule edit will be the blockly page. Click save and it makes a script file in the resources folder.
              Then the back end would perform each script if enabled.

              Or the second idea is to hide the operations and conditions menus. So when blockly makes the output, it will split into condition and operation, automatically saving them to the corresponding places. I think this idea needs less recoding/modifications to work.

              I think with this graphical interface people would use this with more confidence then the current method. Also would be easier to expand with additional functions instead of the need to use scripts.

              What do you think Jeeva?

              jkandasaJ one-reply-to-this-post last-reply-time reply quote 1
              • jkandasaJ offline
                jkandasa @blacksheepinc
                global:last-edited-by,

                @blacksheepinc Your idea looks great. Let me have a look on Blockly and update you shortly on this.

                B topic:replies-to-this-post, 2 last-reply-time reply quote 0
                • B offline
                  blacksheepinc @jkandasa
                  global:last-edited-by,

                  @jkandasa Thanks Jeeva!

                  one-reply-to-this-post last-reply-time reply quote 0
                  • B offline
                    blacksheepinc @jkandasa
                    global:last-edited-by,

                    @jkandasa Did you have time to think about this?

                    jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                    • jkandasaJ offline
                      jkandasa @blacksheepinc
                      global:last-edited-by,

                      @blacksheepinc I am sorry. Yet to have a look. Will do it by this weekend. Sorry for the delay.

                      B one-reply-to-this-post last-reply-time reply quote 0
                      • B offline
                        blacksheepinc @jkandasa
                        global:last-edited-by,

                        @jkandasa any news?

                        jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                        • jkandasaJ offline
                          jkandasa @blacksheepinc
                          global:last-edited-by,

                          @blacksheepinc Hi, Yes, I had a look. And looks like we can implement with MyController with some new implementation to support for JSR223 standard(which is used in Java). Kindly create a request on github.com/mycontroller-org/mycontroller/issues When I get time I will work on this. Thank you!

                          one-reply-to-this-post last-reply-time reply quote 1
                          • first-post
                            last-post

                          0

                          online

                          644

                          users

                          532

                          topics

                          3.4k

                          posts
                          Copyright © 2015-2025 MyController.org | Contributors | Localization