Programming languages in Archibus

Archibus is a highly useful piece of software and several of the blogs we have largely underline what you can do with the software out of the box, however, it is rare that a piece of software out of the box will match your business practices perfectly. As such our technical expertise extends to the ability to modifying the software to suit what you require. In this blog, I intend to go over the various programming languages in Archibus that come together to allow the software to do what it does.


SQL


The first language is SQL, or to not use its acronym, Structured Query Language. At the core of Archibus is a Relational database, and the language inherent to databases is SQL. The language is used to:


Manage data
- Insert

-  Delete
-  Amend
 Create, amend and delete table structure
 Query data within the database


The language was first created by IBM in the early 1970s and has been used as the standard language ever since Oracle released their first commercially viable relational database in the later 1970s.


As a language it is relatively simple and often adheres to common sense rules about how it works, an example would be to query a database for specific data within a table.

 

 

 

 

 

In the above example we’re looking for all of the data (SELECT *) in the table wr (FROM wr) where the records have a specified field value of HQ (WHERE bl_id = ‘HQ’).


XML


The second language within Archibus that we need to go over is XML, or to not use its acronym, Extensible Markup Language. After the database where the data is stored, the next major part of Archibus is Web Central. XML is used by Web Central to create the visible structure of the web pages within web central. So each view within Archibus Web Central (for example The Space Console, The Asset Console or the Building Operations Console) is an XML view.


The specific iteration of XML used by Web Central is a version created specifically by Archibus, and the way it is set up is to have self-contained within each file the data source (the structured look up that tells the view what data it needs to view and interact with) and also the panel/view structure.


Below is an example of the structure, with a data source at the top, and then a standard panel view that will display the data.

 

 

 

 

 

 

 

 

In the example the data source lists and collects the source table (wr) and the fields from the table that you want to use (wr_id, wo_id, requestor) and then below it is a view which pulls the data from the data source and then utilises it to generate a view of said data. These particular details are the work request details screen from the Building Operations Console.


Javascript


The third language of use within Archibus is Javascript. This is a simple, object-orientated programming language that creates and utilises the objects as functions within a single file creating a simplified use of Java.


This language is used by Web Central to update the data within the XML view files. While XML can use the data sources within the structure to pull data from the database, to be able to change and update data within the database the system needs to connect and run generated SQL Scripts on the database, to do this the structure used Javascript.


As I said, the language is, in essence, a stripped-down object-based language and utilises functions that are generated and utilised on the fly within the Javascript file. These objects that are used are called functions, and an example of one of these functions can be seen below:

 

 

The above script is a part of the work request details Javascript management file, and it is used to check whether the details within the work request can be amended by the person looking at the work request within the Building Operations Console. There are levels of complexity to the above script, but to break it down it first looks to see if the user's role is Requestor, Craftsperson or Supervisor and if it is none of the above it then checks against a workflow rule within the database (checCfChangeWorkRequest). If none of these match the set parameters then the function returns a value of false and the ability to amend the work request is removed.


Java


The final language utilised by Archibus is Java. This is the object-orientated language that everyone uses when building a complex programme and requires multiple structures. The way that Java works, in a nutshell, is through defined Objects (functions as in Javascript) that are created and saved within class files. These objects are then utilised in structured files to store, create and destroy data according to how these objects interact with each other. These objects and how the objects are utilised are then all compiled within a compressed folder called a jar file, and the jar file is run through a Java Virtual Machine (JVM) which is a standard tool within Java software.


This is a highly complex language and is used by Archibus to not just link the database through to the Application structure sat in Tomcat, but is also used by Archibus to generate the SQL queries that are run on the database by Web Central to create, delete or amend the data in the database.


Below is an example of the language, how it is used, and how it is stored before compiling:

 

 

 

 

 

 


Figure 1: Class files prior to compilation

 

 

The above function is used by Archibus to check whether the user viewing the work request in the Building Operations Console can verify the work request as according to the SLA’s within the system. I won't step through all parts of the code structure, but as you can see at the top of the function you have the name (checkVerificationSubstitute), below this is the data source used by the function stating first the database table (wr_step_waiting) and then the fields within the table that is used by the function. After this, the function is going to iterate through the SLA and table data to see whether the user currently logged in to the system and viewing the work request can be used to verify the work request.


This has been a brief overview of the programming languages in Archibus Web Central, and the extent of the knowledge that is broadly required by our Support team to be able to amend the system to better suit your personal business practices. 


If you would like to understand more about 'Programming languages', please call MASS on

0118 977 8560 or visit our website at: www.mass-plc.com


Callum Doyle 



BACK TO BLOG


Web Central 24.1 Reservations 13/11/2019

In this Blog we cover the Web Central Reservations module. This is a Web application for managing enterprise room and resource reservations. With this application, you can manage several ...
read more view all blog posts

GET IN TOUCH