InfoToday Consulting         Phone +61 411113476

Level 25

Chifley Tower

2 Chifley Square                 

Sydney, NSW 2000

Australia                               

The InfoToday RAMS Data Server (ITRDS)

The COM Data Server for RAMS Pro

This document is an overview of the InfoToday RAMS Data Server (ITRDS).  This data server provides a COM portal to RAMS Pro data for both querying and editing.  This document also provides some technical information and examples of how the ITRDS is used


 

The Issues – Why we need the RAMS Pro Data Server  1

The Infotoday Solution – The RAMS Pro Data Server (ITRDS) 3

How it works - Communication and Dataflow   4

Examples for the Techy’s – Some simple examples of usage  6

Loading a Customers information , changing it and saving it 7

Loading all existing work orders on a customer  8

In Summary – where do we go from here  9

 

 


Chapter

The issues

1

 

RAMS Pro is a powerful software tool used by the waste services industry.  Written in Visual FoxPro, Microsoft’s fastest data centric, object oriented programming language, it offers a very fast, customisable client for entering and viewing customer data and configuring routing information.  With the introduction of Visual RAMS Pro, we now have a full windows client that is even more customisable and includes vastly improved data integrity mechanisms.

The issue however is this.  In order to enter, edit and delete information in RAMS , you must use the RAMS client.  This is fine if you are a user with the software installed on your computer.  However, what RAMS does not currently provide is a way for other

applications to communicate with it’s data.  In todays B2B and WEB world, there is a huge demand for applications to provide an interface (API) through which applications can communicate with it. Applications such as;

– WEB sites

–Automated payment systems

– CRM applications

– B2B systems

–Application Integration systems such as Microsoft's BizTalk

 

For example, you may want your automated telephone booking system to automatically book a service in RAMS.  You may want your customers to be able to book their service on the Internet or query their invoice information on the NET.  Even pay their invoices on the NET.  In order to have this functionality you need to be able to query and write data to the RAMS Pro database without using the provided client software.

In it’s simplest form this is not too hard to achieve.  You could for instance get the company that wrote your telephone booking system to develop a program that would create a work order in RAMS.  But how do they know what needs to be written to the RAMS tables? How do they know what else needs to be done to follow all the business logic of RAMS such as determining work order departments and creating tray items.  What’s more, what happens when you want your web site to do the same thing?  Are you going to pay for your web site developers to re write the same software?  If you did then both these companies need to keep up to date with RAMS business logic and table structure.


What is needed is an interface to RAMS that satisfies the following criteria;

·         Acts as a single point of entry for reading and writing data to RAMS no matter what application requires it.   Either via COM or Web Services.

·         Incorporates all the business logic of RAMS and is updated when RAMS is updated.

·         Allows custom business logic relevant to your own needs to be incorporated and triggered at the appropriate times

·         Allows retrieval of data no matter where the RAMS data is located.  In other words be able to access the data across the web using HTTP / XML or talking locally over the LAN or WAN.


 

Chapter

The InfoToday Solution

2

InfoToday has developed a fully COM compliant interface (API) to RAMS (Visual RAMS and DOS). 

 

The InfoToday RAMS Data Server provides all the following;

 

·         Written in Microsoft Visual FoxPro, it is fully COM compliant allowing almost any software product to use it.  Hence there is now a single point of entry for all your other applications to read and edit RAMS data.  Also, as it communicates directly with the FoxPro data it is faster than ODBC clients, especially over the WAN

 

·         It’s lightweight and hence will draw little of your valuable server resources

 

·         Incorporates all the RAMS business logic required to carry out the functions it performs.  It will be updated as RAMS is updated and updates distributed to its customers.

·         It will allow for additional business logic to be incorporated that is specific to your company.  For instance you may require that notification emails be sent to people if certain work orders are requested.  This is achieved through pre save calls to programs in which you can add any FoxPro code you want.  InfoToday can even perform this function for you if you don’t have the FoxPro expertise on site (this functionality is currently being incorporated)

·         Allow access to your RAMS data-using HTTP or directly via the WAN or LAN.  Using the COM business objects you can retrieve data no matter where it is. 

·         Your clients can also use the data server to retrieve RAMS Pro information in XML format if required.

 


 


Chapter

How it works

3

 


The steps in using the RAMS Data Server are simple and as follows;

1.       The COM compliant software (or ASP Page) creates an instance of the ITRDS object

2.       It then configures the object to tell it where the RAMS data is located.  It can do this in one of two ways;

a.       It gives it the path to the RAMS data.  You would do this if you were talking directly to the RAMS Pro data on the same machine or on the LAN.

b.       Give it the location (either HTTP address or Network machine name) of where it can find another instance of the RAMS Pro Data.  You would do this if the RAMS Pro data was located remotely on either the WAN or a WEB server on the Net

3.        Once this is set, communication can be carried out.  This is done through a set of objects and commands that allow you to request data, change it and write it back.   Every time data is written back to RAMS the full business logic is applied.  If errors occur the data is not saved and error messages are logged at the server AND returned to the client.

4.       You can even use the ITRDS as an XML data server of RAMS data. 


 


Chapter

Examples for the Techy’s

4

Here are a couple of simple examples of how you would use the ITRDS in a real life situation.  These examples help demonstrate the minimal amount of code required for you applications to load manipulate and save data.

 

Loading a Customers information , changing it and saving it

This example shows the ASP code required for a page on my web site to load the customer details of account “1046548” and then the customers details.  The web server is located on the WAN so we want to use DCOM as the communication method.  The RAMS Data is located on a machine called INFOTODAY02 where there the ITRDS is also installed

‘ Dimension the parameters

Dim oRamsDataServer, lSuccess, cErrorMessage

 

‘ Create the instance of the RAMS Data Server

Set oRamsDataServer = CreateObject(“RamsDataServer.RamsDataServer”)

 

‘ Set the Communication method and system

With oRamsDataServer

      ‘ Set the communication method

      .SetConnection(“HTTP”)

‘ Set the RAMS system

.SetSystem(“INFOTODAY02”)

Endwith

 

‘ Now just load the customer with s single command.  It will return false if it cannot find the customer

lSuccess = oRamsDataServer.oCustomer.Load(“1046548”)

 

‘ You can do a test here for errors and do what you want with them

If oRamsDataServer.oCustomer.lError = True

      cErrorMessage = oRamsDataServer.oCustomer.cErrorMsg

      ‘ Then do whatever you want

Endif

 

‘ At this point you have no loaded the customer data into an object called oData

‘ under the customer object which can be viewed in any way you want. 

‘ For instance you could set some customer values into session parameters as follows

Session(“CustomerBalance”) = oRamsDataServer.oCustomer.oData.Balance

Session(“SiteName”) = oRamsDataServer.oCustomer.oData.Site_Name

 

‘ If I wanted to I could get an XML document representing the entire customer record

cXMLCustomer = oRamsDataServer.oCustomer.MakeCData()

 

‘ Change the site name and save the changes

oRamsDataServer.oCustomer.ADDFIELDVALUE(“Site_Name”,“JO BLOGGS NEW SITE NAME”)

oRamsDataServer.oCustomer.Save()

 

‘ Again all errors are fed back to the client

‘ You can do a test here for errors and do what you want with them

If oRamsDataServer.oCustomer.lError = True

      cErrorMessage = oRamsDataServer.oCustomer.cErrorMsg

      ‘ Then do whatever you want

Endif

 


Loading all existing work orders on a customer

In this example our automated telephone booking system needs to determine all active work orders that are currently assigned to a customer.  Again the customer is “1046548”.  The Automated telephone system is sitting within our WAN so again we use DCOM.  The RAMS Data is located on a machine called INFOTODAY02 where there the ITRDS is also installed

‘ Dimension the parameters

Dim oRamsDataServer, nNumberOfJobs , cErrorMessage

 

‘ Create the instance of the RAMS Data Server

Set oRamsDataServer = CreateObject(“RamsDataServer.RamsDataServer”)

 

 

‘ Set the Communication method and system

With oRamsDataServer

      ‘ Set the communication method

      .SetConnection(“HTTP”)

‘ Set the RAMS system

.SetSystem(“INFOTODAY02”)

Endwith

 

 

‘ Now just load workorders with the filter set to work orders of type “OPS”

oRamsDataServer.oWorkOrders.cPKValue = “1046548”

nNumberofJobs = oRamsDataServer.oWorkOrders.Query(“TYPE = ‘OPS’,””,1)

 

‘ You can do a test here for errors and do what you want with them

If oRamsDataServer.oWorkorders.lError = True

      cErrorMessage = oRamsDataServer.oCustomer.cErrorMsg

      ‘ Then do whatever you want

Endif

 

‘ At this point you have loaded all the workorders so you can extract the XML document

cXMLActiveWorkorders = oRamsDataServer.oWorkorders.cResultXML


 

Chapter

In Summary

5

As you can see the ITRDS is a simple and powerful tool for accessing and editing RAMS data.  It provides a single interface with all the bells and whistles that you would expect from an application written with today’s technologies in mind. 

InfoToday welcomes any opportunity to talk to potential customers about there needs.  If you have any questions please do not hesitate to contact me, John Burrows.

John Burrows

Director

InfoToday