2 Replies Latest reply on Aug 15, 2019 4:20 AM by Régis LE BERRE

    External Event with Powershell via REST API and return from Pattern

    Régis LE BERRE
      Share This:

      Hi Expert,

       

      I have 2 questions for you :

      1 ) How to use External Event with Powershell via REST API ? this body working good from Swagger :

           {

           "source": "Test EVT",

           "type": "UpdApp",

           "params":

                {

                "app" : "Test_App",

                "soft" : "OS Server Server 2008 R2 on hostname",

                "server" : "hostname"

                }

           }

      And

      2) How to return result from TPL script vith Rest API ? for example, I'll like return comment of log.debug :

       

      triggers
              // Trigger when migration is complete
              on event := ExternalEvent created where
                                  type in [ "UpdApp",
                                            "DelApp"];
          end triggers;

       

          body

             log.debug("Triggering on %event.type%");
             nameApp := event.app;
             log.debug(""+event.server);
             log.debug(""+event.soft);
             log.debug(""+nameApp);

      ...

      end body;

      end pattern;

       

      Thank you in advance