pp108 : System

System

 

The system object is a part of the framework library and is available to all the applications that are in the Process Platform framework. This component keeps track of all the applications that are loaded in the framework and helps in cross-application referencing and data sharing between the applications.

The system component, along with the application component, forms the core of the Process Platform front end framework.

Application Framework Flow

  1. In the Process Platform Ajax Toolkit framework, HTML files are linked to a JScript file called application.js. When the HTML page is opened, the application component searches for a root application; in the case of Explorer, this root application is the desktop.htm. If the HTML page is itself the root application, then the application component loads the system component. It also loads the event library, which helps in implementing events.
  2. In the Process Platform framework, an application is opened by calling the select method of the application object, and passing an application definition to it. The application opened is launched in a container, supplied by the system component. This container provides the application with some additional user interface (GUI) elements such as the title bar, the close button, the maximize button, and so on. The container provides this additional GUI by using the guiRepresentation component, which is available in the framework. Each application is uniquely identified by an ID called applicationID, which is provided in the application definition. The framework uses the same application ID for creating the container for the application. Thus, an application can also be referenced through its container.
  3. The system component contains several arrays such as windows, containers, parameters, data, and so on. These arrays are used for the various functions of the system component, which include keeping track of the various applications that are loaded in the Process Platform framework, data sharing between the applications, and storing the information required for backend communication.
  4. The system component maintains the collection of frames, and takes care of registering the various frames and running applications in their appropriate frames.
  5. The system object keeps track of the anonymous applications that are loaded in the framework. Anonymous applications are those that are not started through the Process Platform framework. It also maintains the details of the current user who is logged into the framework.
  6. The system component also has various methods through which it manages loading the appropriate libraries that are requested by the various applications in the framework, and removing them once their usage is over. The various libraries requested by the applications are loaded into hidden iframes, and are maintained by the system component.

The following table lists the properties, methods and events defined for the component:

Table 1. List of Attributes

Attribute

Property

Description

baseURL

baseURL

String that denotes the URL at the server to which, SOAP messages are posted. This is same as that of the SOAPTransaction property of the system component.
The following is the default value: IIS/Apachecom.eibus.web.soap.Gateway.wcp.

containers

containers

Array that contains the collection containing references to the containers of all the registered applications in the Process Platform Ajax Toolkit framework. The array is indexed based on the application IDs. All applications in the Process Platform Ajax Toolkit framework have a container associated with them. This property refers to a collection of all the containers. This property is read-only.

data

data

Array that can be used to store data that can be shared across applications

method

method

String that denotes the HTTP method used to send the SOAP message to the server

parameters

parameters

Name-based array that contains the parameters that can be appended to the baseURL when sending SOAP messages to the server.

url (Deprecated)

url

Both Apache and IIS Web servers have the same Gateway URLs. Therefore, developers need not use this property. Object that contains the prefix and the postfix that is to be added to the URL of the Web applications while sending requests. The various properties available with this object are as follows:

  • prefix - String that denotes the prefix for the Gateway Application.
  • postfix - String that denotes the postfix for the Gateway Application.

windows

windows

Array that contains the references to the windows object of all the registered applications in Process Platform Ajax Toolkit framework. The array is indexed based on the application IDs. This property is read-only.

requestHeader

requestHeader

System exposes this property for setting the custom headers that can be a part of XMLHTTP. The usage of this property is as follows:

requestHeaders\["soap-action"\] = <URL> requestHeaders\["myheader"\] = <header value>

If this property is set in the Bus Data Island component too, then the value specified for Bus Data Island takes precedence.

Table 2. List of Methods

Method

Description

addLibraryPackage(url)

Adds a library package to the system

fireSystemEvent()

Fires the system event, which can be used for event-based notifications between applications

getClipboard()

Retrieves the object that represents the system clipboard

getUser(bRefresh)

Retrieves the value of the user property. This contains information about the current user, and the organizational properties that belong to the user. bRefresh indicates whether the user details must be retrieved explicitly from the LDAP Connector. The default value of bRefresh is false.

registerFrame()

Registers a new frame in the Process Platform Ajax Toolkit framework

unregisterFrame()

Removes an already registered frame from the Process Platform Ajax Toolkit framework

getAdjustedTime(bNotifyUser )   Returns the Date object with the server time
Table 3. List of Events

Event

Description

onsystemevent

Fires when the fireSystemEvent() method is called. This event carries property data, which can be used for event-based notifications between applications.

onrequest

Fires when a SOAP request is sent to the backend

onresponse

Fires when a SOAP response is received from the backend

Note: While contacting the gateway using the system component, if the baseURL is being used for any HTTP request, then ensure that the encodeURIComponent(url) method is used while opening an HTTP connection to the gateway.

Related information

Process Platform Ajax Toolkit Architecture
Overview of Process Platform Ajax Toolkit