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
- 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.
- 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.
- 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.
- The system component maintains the collection of frames, and takes care of registering the various frames and running applications in their appropriate frames.
- 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.
- 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. |
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. |
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 |
Name-based array that contains the parameters that can be appended to the |
||
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:
|
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 |
---|---|
Adds a library package to the system |
|
Fires the system event, which can be used for event-based notifications between applications |
|
Retrieves the object that represents the system clipboard |
|
Retrieves the value of the user property. This contains information about the current user, and the organizational properties that belong to the user. |
|
Registers a new frame in the Process Platform Ajax Toolkit framework |
|
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. |
Fires when a SOAP request is sent to the backend |
|
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.