The present invention relates to the field of software integration. More particularly, the invention relates to a method for building automatic interfaces to exiting programs that can be changed and updated, while eliminating the need for re-programming whenever such changes in the programs are made.
Several techniques have been developed, in order to monitor existing programs and interact with them through an appropriate interface, in order to identify each filed in the displayed screen. Some of these techniques are extremely invasive and require re-programming. Others require only building wrappers, and still other techniques are almost non-intrusive and rely on object models that are exposed by the underlying system. Intensive re-programming is not desired due to several reasons. It requires heavy programming resources for altering an existing program. This problem becomes more severe, particularly when the existing program is an old one. More over, it requires a complete development life-cycle, even if only a wrapper is constructed, such as proposed by IBM's WebSphere Software, or by Microsoft's BizTalk (which is a business process management (BPM) server that enables companies to automate and optimize business processes). In some cases, heavy usage of the Application Program Interface (API) is required, which sometimes exposes features which were not fully supported.
An example of using underlying object model engines is disclosed for example in U.S. Pat. No. 5,889,518, which describes an apparatus for acquiring, processing and routing data contained in a graphical user interface window. The data contained in a window selected by the user is captured by an acquisition unit and stored in a data buffer. The data, whether string data or bitmapped graphics data, is stored in the data buffer in standard graphical user interface text and/or bitmapped format. A user may designate a portion of the acquired data to be processed by a processor for adding functionality to an application associated with the graphical user interface window selected by the user.
Other techniques use “Screen Scarping”, where text or other data is extracted from the display of the program, while ignoring the binary information that the display carries, by using the visual properties of the screen, effectively imitating the way a human would view the display.
All the methods described above have not yet provided satisfactory solutions to the problem of providing automatic interfaces to exiting programs that can be changed and updated.
It is an object of the present invention to provide automatic interfaces to exiting programs that, although said programs be changed and updated, the present invention eliminates the need for re-programming whenever such changes are made.
It is another object of the present invention to provide automatic interfaces to exiting programs while keeping stability regarding changes within the observed, monitored program.
It is a further object of the present invention to provide automatic interfaces to exiting programs that can identify desired displayed objects in a varying dynamic display environment.
Other objects and advantages of the invention will become apparent as the description proceeds.
The present invention is directed to a method for allowing invariant identification of selected objects displayed during the execution of an object oriented application, by another application. According to the proposed method, a tag generator is determined, for uniquely tagging each of the selected objects and then the tag generator generates a plurality of different and unique tags. Access of object generating functions in the source code of the application, to plurality of different and unique tags is established. A unique tag from that plurality is automatically attached to the object, such that the attached tag is added to the attributes of the selected object, whenever a selected object that should be invariantly identified is generated during the execution of the application. This way, the another application is allowed to identify and access one or more objects through an interface of the application, according to their corresponding unique tags, which are invariant across all application invocations and updates.
The selected objects may be objects that can be created in a variety of ways by the underlying execution system, which can be an operating system, or a VM in Net or Java.
Tags may be determined according to the hierarchy of their corresponding objects with respect to other objects. Whenever the application is a browser interpreting an HTML page, interaction with the operating system level is avoided, while referring only to the browser's interface functions. In this case, tags may be generated in XML documents.
Whenever the application is executed in an environment without a direct non programmatic interface (such as a Visual Basic), each selected object is tagged by generating a unique tagging function that can be called by the application. Then a first event is defined whenever such an object is generated and a unique tag is selected for the first event by calling the tagging function. A second event is defined whenever the unique tag is associated with the object. Then the application is allowed to proceed to the next executable step.
The other application may be used for monitoring the running application or for evaluating the application and the user's state of interaction. The other application may actively interact with the objects, in a similar way to a user interaction(s).
In the drawings:
The distributed client/server architecture includes a user system interface (top tier) where user services (such as session, text input, dialog, and display management) reside.
The third tier provides database management functionality and is dedicated to data and file services, such as data locking, consistency, and replication. The connectivity between tiers can be dynamically changed depending upon the user's request for data and services.
The middle tier (the application server) provides process management services (process development, monitoring) that are shared by multiple applications. The application server improves performance by centralizing process logic that makes administration and change management easier by localizing system functionality. By doing so, changes must only be written once and placed on the middle tier server to be available throughout the systems, rather than writing a change to a function (service) into every application.
A similar approach is used when a wrapper or Service Oriented Architecture (SOA) is used for integration. By providing a middle tier, such as NetWeaver (by S.A.P Aktiengesellschaft, Walldorf, Germany), a communication layer between the various applications is introduced, which allows for interfacing any such application from any other application, as long as the both sides conform to the underlying communication protocols.
In contradiction to the prior art techniques described above, the present invention proposes a novel approach, which provides stability regarding changes within the observed, monitored program. The invention relies on the object models that the application exposes, but provides also an automatic mechanism for uniquely tagging objects, in a manner which is independent of programming interfaces, and at the same time, remains stable across multiple invocations of the program, or in the face of updates and changes to the program.
The original application is the monitored program 20, and to the external application is the monitoring program 30. The functionality of the monitoring program is not restricted to monitoring only, but rather it can also activate features within the monitored program. The monitor is therefore an external controller of the application, or simply another program which interacts with the application.
The present invention provides means for semi-automatically generating unique identifiers for elements within the program, which will allow clear and unique identification across multiple execution of the program, and remain stable even when the program is modified. The unique tagging method proposed by the present invention can be applied to Web pages, as well as to programming environments such as Visual Basic, and alike, where objects can be accessed using a GUI or an API only. The present invention provides unique naming (tagging) for each object, and a quick manner for identifying and locating the desired object from the external monitoring program 30. This solution provides several advantages over prior art solutions:
Since not all the objects must be tagged, there are some guideline rules for tagging, which are often technology specific:
Web browsers such as Internet Explorer, Netscape's Mozilla (FireFox) and others expose multiple object hierarchies such as Document Object Model (DOM) and HTML2.
These are runtime representations of the HTML documents, which form a standard document structure and a way of hierarchically arranging content. More specifically, an HTML element is an element that matches at least one of the HTML Document Type Definitions (DTDs). An HTML element has properties of attributes and content. Elements may represent headings, paragraphs, tables, hypertext links, lists, embedded media, and so on. While this is the static representation of the page, during the browser-server interaction, Web pages can also contain programs, such as Personal Home Page (PHP, which is a scripting language and creates a “dynamic HTML page”, since content will vary based on the results of interpreting the script) on the server side, or JavaScripts—on the browser side, which eventually produces HTML documents. Accordingly, each HTML element can be created with a variety of properties and contents, as a result of these programs. Similarly, dynamic HTML pages can be created as a result of the use of extended Markup Language (XML).
In addition, objects may be created by the operating system that executes an application of by a Virtual Machine (an operating system that can host other operating systems, so that each of the operating systems seems to have its own complete system of software and hardware resources), Java applications and applications the run on Microsoft's .NET platform.
Since HTML pages can rapidly change from one invocation of the browser to another invocation, screen scraping technology will not be sufficient, as the display properties rapidly change. Further, even relying on a fixed object hierarchy is insufficient for the same reason. According to the solution proposed by the present invention, this task is performed by the monitoring program 30, while implementing the tagging mechanism:
Option 1—Unique (global) numbering: According to this option, the tag contains: <Naming-header><Global Number>
The tag is added as an attribute to the HTML page, which may be any predefined string. The global number must be set in agreement between the monitoring and monitored program, and hence, it is fixed. For example, this can be done based on the order of appearance in any of the GUI documentation. Note that setting a counter and dynamically allocating a tag may be sufficient for a single execution, but does not guarantee the stability and the identification across multiple invocations of the page, and clearly is not stable under changes in the page over time.
Option 2—Control name: In this alternative each tag for each control contains information indicating for:
<Naming-header><Control Name>
The Control Name is derived from the class name, or from the semantics of the object (for example, the XML hierarchy, or generating script), but must conform with the uniqueness requirements within the level it is created. Hence, if two objects of the same type are being constructed within a list, their order must be preserved, or alternatively, they must be uniquely identified within the list they reside in. In this case, a complete parsing (analyzing an input sequence read for example, from a file or a keyboard,) in order to determine its grammatical structure) may be required—as a similar tag may appear in various parts of the object hierarchy. Therefore, the path to each such object is unique.
Option 3—Control name and relative number: In this alternative each tag contains at least:
<Naming-header><Control Name><Relative Number> where like in Option 2, the Control Name is derived from the class name. However, if it cannot be always unique per subsuming class, the enumeration within a page, or at least within the subsuming class must be preserved. The enumeration is the order agreed with the monitoring application (rather than the order of creation).
Unlike in HTML, where textual representation is the dominant form of representing the program, and the browser interprets this program into a visual representation, some common programming environments do not easily expose a textual representation of the program. Moreover, even if such a representation does exist, and is exposed, directly editing this code is highly uncommon, for example, in order to add an attribute. Instead, programming interfaces allow the user to add, delete or modify object attribute values. In the context of predefined tagging, this introduces a challenge, as:
Accordingly, while in HTML-based environments and their kin pre-tagging can be easily implemented, in order to tag an object such as common in Visual Basic and similar programs, there is a need to add an additional component in the system, hence a special event, which complements the object creation, and can be recorded by the monitoring program 30. We refer to this as “lazy tagging”. The tagging format can conform to any of the formats mentioned in Example 1, the tagging injection needs to be done programmatically, and the invocation of the tagging function should occur only after the creation of the need-to-be-tagged object. An event is generated upon completion of tagging task by the tagging function, so as to notify the monitoring program 30 that the tagged object is now ready for monitoring.