6 Replies Latest reply: May 15, 2014 10:00 AM by Gareth Horton RSS

    Trigger DP processes from VB

    Lanette _

      I have seen a number of posts and resources on how to automate running Monarch models/projects from a VB.NET application.  I am looking for information on how I can do the same thing with DP v7 processes.  Here is why:

       

      I need to create a number of processes that end users can trigger to load master data into an Oracle database.  They will be interacting with the db via a VB.NET user interface.  I want to control the project/model files so they can't be changed, but allow users to specify the source file of the data (built using a predefined template) and a runtime parameter, so I don't want them to have direct access to the DP application itself.  I have a model and project file setup to test doing this, and have created a DP process to load the result set into Oracle. 

       

      Can anyone advise on how to trigger the process from outside the application?[/b]   I thought perhaps I could just automate running the project file and invoke the ExportTable command, but since exporting to a database does not seem to be an option in Monarch Pro v7, I don't see how this can be done.  Just for grins I tried modifiying the project file in DP 7 to export to the database table, then reopened the project in Pro and tried to run the project exports, but I just get a message saying the export completed, with no output to my database.

       

      Any suggestions?

        • Trigger DP processes from VB
          Gareth Horton

          Lanette,

           

          You can use the MDP7 web service interface to do this.

           

          If you install the web service (IIS Required) on the server, then you will be able to invoke a process automatically.

           

          Runtime parameters are not supported in MDP7 but you can use manifests to pass dynamic input file references to the web service.

           

          Essentially you create a process in MDP7 then in the project in the process, you specify the input file or files as "manifest.<itemname>"

           

          A manifest is a simple XML file. The process attribute specifies the name of the process with which this manifest is to be associated. It must be one of the processes already defined for the server. The inputs section details the input files that are to be fed into the names process. Each input item has a symbolic name, specified in the name attribute, that is intended to match up with a symbolic name mentioned in a manifest.symbolicname input in one or more of the xprjs that comprise the process.

           

          <manifest process="oracle_export">

            <inputs>

              <item name="oracleinput">

          &lt;uri&gt;[url]ftp://ftptest.datawatch.com/monarch/reports/classjan.prn</uri>[/url]

              &lt;/item&gt;

            &lt;/inputs&gt;

          &lt;/manifest&gt;

           

          Note that you can use ftp, http and local or UNC paths in the manifest.

           

          So in this case, the MDP process would be called oracle_export and the input file name in the xprj would be manifest.oracleinput

           

          Then you can use the CreateProcessUsingManifest web method to invoke the process, with the dynamically created file manifest.

           

          The web service includes a help file with all the methods and properties, and it also installs 2 sample applications, one in C# and one in VB.net with full source code supplied, so you can see exactly how it all works.

           

           

          Gareth

           

          Originally posted by Lanette:

          I have seen a number of posts and resources on how to automate running Monarch models/projects from a VB.NET application.  I am looking for information on how I can do the same thing with DP v7 processes.  Here is why:

           

          I need to create a number of processes that end users can trigger to load master data into an Oracle database.  They will be interacting with the db via a VB.NET user interface.  I want to control the project/model files so they can't be changed, but allow users to specify the source file of the data (built using a predefined template) and a runtime parameter, so I don't want them to have direct access to the DP application itself.  I have a model and project file setup to test doing this, and have created a DP process to load the result set into Oracle. 

           

          Can anyone advise on how to trigger the process from outside the application?[/b]   I thought perhaps I could just automate running the project file and invoke the ExportTable command, but since exporting to a database does not seem to be an option in Monarch Pro v7, I don't see how this can be done.  Just for grins I tried modifiying the project file in DP 7 to export to the database table, then reopened the project in Pro and tried to run the project exports, but I just get a message saying the export completed, with no output to my database.

           

          Any suggestions? /b[/quote]

          • Trigger DP processes from VB
            Lanette _

            Gareth,

             

            Thanks for the information.  Does the MDP7 web service interface install automatically if IIS is already on the server?  The test server I installed DP on and have been using during development has IIS installed, but I don't remember being prompted for any option to this effect on install.  I don't see any Monarch reference when I open IIS or any links to a specific interface I should use...and I've been searching in all the help files for the samples you mentioned and don't see any sample or anything discussing manifests.  Am I looking in the wrong place?    

             

            Thanks,

             

            Lanette

            • Trigger DP processes from VB
              Darren _

              Lanette,

               

              I am just going my by implementation process experience of MDP7, and I already had IIS installed on my server (Win2K). MDP7 web service interface did automatically install on my system. I was not prompted to do anything either, but as far as I can tell, its working fine on my system.

              There is an active link and monarch reference there on my IIS services.

               

              Possibly is this a potential glitch here? Or just some sort of installation error? Again, I'm just going by my personal experience here. I would like to see what Gareth has to say here as well when he returns!   [img]smile.gif[/img]

              • Trigger DP processes from VB
                Lanette _

                Thanks everyone for the replies.  I went back and searched my install cd and did find the installation guide.  Also, I found the install file for Web Service.

                 

                When I installed DP7 I had to do it from a command line DP7, for some reason, cannot find a manually updated Monarch V7.01 and throws an error on the original install.  I guess because I was just running the setup.exe file it doesn't automatically install the web service executable.

                 

                Anyway, I've got access to the documentation now, so hopefully I'll be all set now.

                • Trigger DP processes from VB
                  Gareth Horton

                  Lanette,

                   

                  Additionally we will be providing a "traditional" VB.NET API with MDP 7.01, which will have the same functionality of the web service, but without the requirement of the web service. 

                   

                  Gareth

                   

                  Originally posted by Lanette:

                  I have seen a number of posts and resources on how to automate running Monarch models/projects from a VB.NET application.  I am looking for information on how I can do the same thing with DP v7 processes.  Here is why:

                   

                  I need to create a number of processes that end users can trigger to load master data into an Oracle database.  They will be interacting with the db via a VB.NET user interface.  I want to control the project/model files so they can't be changed, but allow users to specify the source file of the data (built using a predefined template) and a runtime parameter, so I don't want them to have direct access to the DP application itself.  I have a model and project file setup to test doing this, and have created a DP process to load the result set into Oracle. 

                   

                  Can anyone advise on how to trigger the process from outside the application?[/b]   I thought perhaps I could just automate running the project file and invoke the ExportTable command, but since exporting to a database does not seem to be an option in Monarch Pro v7, I don't see how this can be done.  Just for grins I tried modifiying the project file in DP 7 to export to the database table, then reopened the project in Pro and tried to run the project exports, but I just get a message saying the export completed, with no output to my database.

                   

                  Any suggestions? /b[/quote]

                  • Trigger DP processes from VB
                    Gareth Horton

                    Originally posted by Gareth Horton:

                    Lanette,

                     

                    Additionally we will be providing a "traditional" VB.NET API with MDP 7.01, which will have the same functionality of the web service, but without the requirement of the web service. 

                     

                    There is also a method already available for simple invokation of processes via the command line (sorry for forgetting).  You can execute PumpCMD.exe (in the Monarch Data Pump Folder) with the following arguments:

                     

                    -s

                     

                    Starts the specified process

                     

                    -r

                     

                    Retries a process instance

                     

                    -r

                     

                    Reruns a specified job

                     

                    -c

                     

                    Cancels a specified job

                     

                    -custodian run

                     

                    Runs the custodian

                     

                    -custodian dispose:[ProcessName]

                     

                    Uses the custodian to dispose of the jobs, if any related the the specified process.

                     

                     

                    Gareth

                     

                     

                      /size[quote]quote:[/size]Originally posted by Lanette:

                    I have seen a number of posts and resources on how to automate running Monarch models/projects from a VB.NET application.  I am looking for information on how I can do the same thing with DP v7 processes.  Here is why:

                     

                    I need to create a number of processes that end users can trigger to load master data into an Oracle database.  They will be interacting with the db via a VB.NET user interface.  I want to control the project/model files so they can't be changed, but allow users to specify the source file of the data (built using a predefined template) and a runtime parameter, so I don't want them to have direct access to the DP application itself.  I have a model and project file setup to test doing this, and have created a DP process to load the result set into Oracle. 

                     

                    Can anyone advise on how to trigger the process from outside the application?[/b]   I thought perhaps I could just automate running the project file and invoke the ExportTable command, but since exporting to a database does not seem to be an option in Monarch Pro v7, I don't see how this can be done.  Just for grins I tried modifiying the project file in DP 7 to export to the database table, then reopened the project in Pro and tried to run the project exports, but I just get a message saying the export completed, with no output to my database.

                     

                    Any suggestions? /b[/quote][/b][/size][/QUOTE]