JAMS Developer Guide
Using JAMS On the Web

JAMS is very extensible and can be customized and integrated into your own applications.  This is also true of connecting to JAMS over the web. This guide will demonstrate how to connect to a JAMS server and submit jobs via a web page.

For this example, you will create a new ASP.NET Web Application and name it JAMSWebParameters.


After creating a new project, open the web designer for Default.aspx. Add a couple of text boxes to the page and a button. These will be used to accept input from the user for job parameters, and start the new Job instance.

Double click the button to move to the code behind the Web page and add a new button click event.  You will then write some code which interacts with the JAMS system.  Before doing so, add a reference to JAMSShr.dll. Right click on the References folder in the Solution Explorer window, choose Add Reference, and then select the browse tab. The dll can be found at Program Files\MVPSI\JAMS\Client\JAMSShr.dll

Now that the reference has been added to the JAMS dll, you can start writing code which accesses the JAMS scheduler. The code to submit a Job and set parameter values is found below:

C#

Build and run the application. When the web page is displayed, you can enter the required information in the textboxes and click the submit button. This will submit a new Job instance in the scheduler on the local machine.

This simple concept can be taken much further to fully leverage the programmability of the JAMS system.  All of the functionality of the client GUI is available to the developer. Using the API, a developer can display information about any JAMS object, such as Jobs, Sequences, Folders, Variables, and Triggers.  It is also possible to edit the definitions of any of these objects, if necessary. Below are some code snippets which demonstrate how to retrieve a listing of Jobs from a JAMS server, and how to change values in a Job definition.

C#

 

C#

 

 


Copyright © Fortra, LLC and its group of companies.
All trademarks and registered trademarks are the property of their respective owners.