System, method, and article of manufacture for test maintenance in an automated scripting framework6701514Abstract A system, method and article of manufacture are provided for affording test maintenance in an automated scripting framework. First, a plurality of test scripts are developed. Then, the plurality of test scripts are stored in a centrally located database. A user is then allowed to edit a specific test script located on the centrally located database. Finally, the user edits to the specific test script are propagated to each of the plurality of test scripts. Claims What is claimed is: Description FIELD OF THE INVENTION
Method Description
Init This method initializes the UserSS Component.
GetUserID This method returns a string value representing the user
id. SiteServer's API is used to obtain this value.
GetUserName This method returns a string value representing the user's
name. SiteServer's API is used to obtain this value.
GetRealName This method returns a string value representing the user's
real name SiteServer's API is used to obtain this value.
GetPref This method takes as input a preference label and returns
a string value representing the user's preference value.
SiteServer's API is used to obtain this value.
SetPref This method accepts two parameters (String
the PrefLabel, String the PrefValue). The preference is
set that matches the "thePrefLabel" passed in.
GetRoleID This method returns the current users Role id.
GetRoleName This method returns the current user's role name.
GetRolePref This method takes as input a preference label returns the
current user's role preference value.
SetRolePRef This method sets the current user's role preference
Site Server Personalization and Membership/Directory Membership Manager This portion of the description describes the required settings in Site Server Commerce Edition used by the ReTA frameworks. This portion of the description also describes the steps involved in creating the required settings. ReTA Required Settings The Membership Directory Manager is used to manage administration and access control for Membership Directory objects, including users and groups, and schema objects. The Membership Directory stores objects used by all Site Server features. The ReTA UserSS framework requires schema objects to be created. The schema objects required by the ReTA Frameworks are: Roles container, RoleName attribute, username attribute, webUserId attribute, and a Role class. Required Container, Class, and Attribute Setup Instructions Users may have different roles within the system. In Site Server ReTA takes advantage of this by creating a Container "Roles" that contains different "Roles" or different objects of the class "Role". These "Roles" have attributes such as a default start page. Therefore different "Roles" (different objects of the class "Role") such as "Operator" or "Customer" may both have a default start page attribute that may point to different URL's. The Site Server portion of the present description details how to setup a Container, Class, and Attributes. The following lists the steps involved to setup the required attributes for the ReTA Frameworks to integrate with Site Server. Using the Site Server Console, right click on the Membership Directory Manager folder. Select New--Container, then type in Roles for the Container name. FIG. 11 illustrates the creating of Container "Roles". Right click on Membership Directory Manager 1100 and select New 1102--Container 1104. After creating the Container "Roles", create the attribute "DefaultStartPage", "username", webUserId", and "RoleName" in the Schema. To create these attributes expand the Admin Container under the Membership Directory Manager. Right click on the Schema folder 1200 and select New 1202--Attribute 1204 (See FIG. 12) Define the class "Role" the same way by right clicking on Schema and selecting New--Class. Select the "common-name" as a required attribute, also select the "DefaultStartPage" as an attribute but do not make it required. Create the Roles for our Application, "Operator" and "Customer". See FIG. 13, which illustrates the adding of different Roles. Right click the Roles Container 1300 under the Membership Directory Manager folder 1302. Select New 1304--Object 1306, select "Role" for the class of object to create, type the name of the object i.e. "Operator", add the attribute "DefaultStartPage" by clicking Add Attribute button and enter the URL. Once these have been created, a member of the system can be assigned to a "Role" and the ReTA Framework required attributes can be added to the user. FIG. 14 illustrates an example showing the attributes 1400 of member "Joe Bloggs" (Note RoleName). EVENT HANDLER FRAMEWORK DESIGN FIG. 15 illustrates a method 1500 for handling events in a system. In operation 1502, an event which includes metadata is recognized. Next, in operation 1504, the metadata of the event is read and, in operation 1506 a table look-up is performed for information relating to the event based on the metadata. The information includes a severity of the event and further information such as a type of the event, and a location where the event occurred. In operation 1508, a message is displayed either in-line in a currently depicted display or in a separate display based on the severity of the event. Optionally, the event may additionally be indicated to components of the system other than the component in which the event occurred. The type of the event may be a database error, an architecture error, a security error, and/or an application error. Further the location of the event may be at least one of a method and an object where the event occurred. Also, the information may further relate to a code associated with the event. The message may include the information relating to the event. In additionally, the message may also include a time during which the event occurred. Further, the message may include a string altered based on a user profile. The following material provides a more detailed description of the above-described method. This portion of the present description details the ReTA Event Handler framework design from the perspective of the application developer. The role of this framework is to provide services to manage the informational, warning and error events that an application may raise. These services include: Presenting the user with an understandable event explanation. Informing other Components when errors happen (for example to restore transactional data to a consistent state) using a Publish/Subscribe mechanism. Logging informational, warning and error event messages. The Event Handler uses an Event Reference meta-data database table to maintain information about the types of events in an application and the policy for dealing with them. This gives a flexible approach and the event messages, the severity and other policies for the events can be changed during operations. Phase 2--Event Handler Enhancements For phase 2, Event Handler consists of the following enhancements: The Event Handler framework is componentized. It no longer maintains references to any of the other framework components. Internally, the Event Handler continues to use the persistence light framework to log events to the database. As in phase 1, it can be used as a Session level component. As an enhancement for phase 2, the Event Handler framework can be used as a stateless page level component. This means that a new instance of the component is created at the beginning of each ASP page and is released at the end of each page. The Event Handler framework no longer requires Event Collection components as parameters to implement event handling, which only allowed handling events at the page level. In phase 2, the new method "processSingleEvent" takes the parameters of a single event as its input, which enables handling events at the occurrence of the event. As in phase 1, The Event Handler can format error descriptions in HTML. As an enhancement for phase 2, the Event Handler can return the error message as a string and enables the application to implement client specific formatting (HTML or other). The process event method no longer calls the ASP redirect method. Instead, it returns the severity level code. On return, the application logic determines whether to redirect to the error page or display the error in-line in the current page. The Translator is no longer a separate component. Instead, it is a Java class inside the Event Handler component. Event Handler Framework Description With reference to FIG. 15.1, the ReTA Event Handler Framework 1530 manages the informational, warning and error events that an application raises. The following describes the ReTA event handling sequence: 1) The event(s) occurs When an event occurs the following event information is recorded: event type (defined in database Event Reference table), for example: database error security error architecture error application error event location: method and object name where the event occurred event code (sub-type): SQL error code, application error code--mapped to a unique description in the database architecture error code--mapped to a unique description in the database event context: Any relevant information about when the event occurred stored in a tagged name value pair format. Eg. [OrderNumber=1][Description="Repeat Order"] If the event occurs within a Java class inside a COM object, use the Java exception mechanism by throwing an AFEventException. If the exception occurs elsewhere, call the add method on the Event Collection passing the event information. Each method defining a COM component interface captures these event exceptions and either adds them to an Event Collection component or directly calls a method on the Event Handler component. Events are processed from the ASP page by calling the process method of the Event Handler. Events can also processed from the point where the event occurred by calling the "processSingleEvent" method of the Event Handler. 2) The Event Handler processes the event(s): For each event, set the user id and current page For each event, retrieve the event severity from the event handler's "translator" class. This class caches in memory all event descriptions and severity levels retrieved from the event reference database table. Add the events to the Event Handler context. Implement the persistence policy on the events--events are logged in a batch. Return the severity of the most severe event to the caller. The caller is responsible for either redirecting to the error page or displaying the event in-line in the Current Page. 3) Display the event: Use the Event Handler component to generate the error message. This message can contain context information describing when the event was created. Create the HTML formatting and display the event message. The Error Message is either displayed in-line in the current page or in a separate error page. 4) The Event Handler generates error display message: Get the event with the highest severity level from its event context. If the most severe event is "fatal", display the user description associated with the event. Broadcast a SESSION_ABORT message using the Publish/Subscribe mechanism. Any component that is interested in these events must implement the IAFEventListener interface and register with the Event Broadcaster component as interested. To do this they call the addListener method of the Event Handler component. If the most severe event is "logical unit of work", display the user description associated with the event. Broadcast an ACTIVITY_ABORT message using the Publish/Subscribe mechanism. If the most severe event is "warning", display the user description associated with the event. Note: The user event descriptions are retrieved from the database either on session start or on demand and are cached by the Translator class. When generating the event description page, this description is requested from the Translator. Event descriptions can have embedded context parameters. When generating the event description page, the event handler replaces these parameters with their values specified when creating the event. Database Tables The Event Handler uses two database tables: The T_AF_EventReference 1534 is a static table that describes the Event meta-data, giving the policies for each event type. The policies include: The message that is displayed to the user. These messages can contain data from the Context that is included when the event is generated. The severity of the event. The severity can be Information, Warning, Error and Fatal. Whether to persist the event in the database event log. The T_AF_EventLog 1536 contains the log of the events that occurred. The following information is logged: Event type and Code The location where the event occurred. I.e. ASP, Object name and Method Name. The user that raised the event. The datestamp. The context information giving other information about what caused the event. Services The Event Handler Framework provides the following services:
Service Detail
Register event Create event
Maintain event reference
Process event Information
Warning
Logical Unit of Work
Fatal
Display events Translate event
Inform user
Persist event Log event to database
Components and Classes The Event Handler Framework implements these services through the following COM and Class objects:
Service
Component
AFEventHandler Handle events generated by the system
AFEventCollection Contains a collection of events (AFEventException)
AFResult Defines the result returned by a method execution.
Class
AFEventException Contains single event information.
AFEventReference Contains event reference information from database
table T_AF_EventReference
AFTranslator Returns event reference information based on the
event type and event code.
Note: multi-language translation functionality not
implemented
AFPersistableEvent This is the persistable class containing the
information for a single event. It is a sub-class
of the Persistence PersistableObj class. The
persistance mechanism can insert, delete, select
and update objects of this class in the database.
This class persists event information the
T_AF_EventLog table.
These components and classes are described in detailed in the following sub-portions of the description. AFEventHandler The AFEventHandler component 1538 handles the events generated by the system. Depending on the severity level, the event handler may redirect the user to another ASP page and may abort the activity or session. The event handler also determines whether and when to log an event. Methods The IAFEventHandler interface defines the access to the AFEventHandler component. This interface supports the following methods:
Method Description
PersistAllEvents Persist all events stored by the event
handler to the database.
ProcessSingleEvent Gather associated event information. Call the
add method to persist the events in the event
log. Return the event severity to the caller.
This method is called either from the ASP page
or from a Java class where the Event was trapped.
Process Examine the events and gather associated
event information. Call the add method to
persist the events in the event log. Return the
event severity of the most severe event to the
caller. The application developer calls this
method from an ASP page to check the events
generated during the scripting logic execution.
Generate Return generated HTML which describes the
severity of the error, gives the target URL
(depending on the severity - previous page,
activity start page or home page) and an error
log. The Event Handler page calls this method.
Initialize The application developer can invoke this
method to load all event descriptions in
memory (normally used to speed access during
user session).
GetErrorDescription Return error message as a string, which
describes the security of the error. This allows
the application to determine the HTML
formatting used to display an error.
HasFatalError If the event handler contains at least one fatal
error, returns true.
AFEventCollection The AFEventCollection component contains a collection of events. Methods The IAFEventCollection interface defines the access to the AFEventCollection component. This interface supports the following methods:
Method Description
SpecifySubActivity Attach the sub-activity to all events contained
in the event collection.
GetSubActivity Return the sub-activity attached to all events
contained in the event collection.
Add Add an event to the event collection.
Get Return the requested event.
NumberOfEvents Return the number of events in the collection.
Clear Clear all the events from the collection.
AFResult The AFResult component defines the result return by a method execution. Methods The IAFResult interface defines the access to the AFResult component. This interface supports the following methods:
Method Description
GetResult Return the result.
AddResult Add a result.
AddResultString Add the result as a string.
GetResultString Return the result as a string.
AFTranslator The AFTranslator class returns event reference information (based on the event type and event code. Methods The AFTranslator class has the following methods:
Method Description
GetEventTranslation Return the description for this event.
GetEventSeverity Return the severity level for this event.
GetEventPersist Return flag that defines whether to persist this
event.
GetUserDescription Return the user description for this event. This
description is displayed to the user.
GetDescription Return the description for this event. This
description is user by the technical support
team to analyze error.
Start Initialize component.
AFEventException The AFEventException class contains the event exception information and is added to the AFEventCollection component for processing by the AFEventHandler component. Methods The following AFEventException class methods are important for the application developer to understand:
Method Description
AFEventException Create the event exception class and populate
it with
event type:
database error
Java error
security error
architecture error
application error
event location:
method and object name where the event occurred
event code (sub-type):
SQL error code,
Application error code - mapped to a unique
description in the database
Architecture error code - mapped to a unique
description in the database
event context:
value of specific object
AddToCollection Add the current event to an event collection.
AFEventReference The AFEventReference component 1540 contains the event reference information that is defined by the application through database table T_AF_EventReference. The architecture reads the event reference data into memory on session start. T_AF_EventReference:
Column name Description
Id Unique id
Type The event type
Code The event code
Severity Level The event severity level:
1: Information
2: Warning
3: Abort the activity
4: Fatal, close the session
Persist 1: if the event should be persisted in the event log
0: if the event should not be persisted
Description Event description showed to the operator
User Description Event description shown to the user. This description
can contain contextual information, which is specified
by adding tag like [ParameterName] in the description.
These tags are replaced by the event
framework when displaying the event to the user.
Language Language of the description. This may be used by the
multi-language framework when developed. At this
time, set to `English`.
Context Event context default value.
AFPersistableEvent The AFPersistableEvent 1542 contains the event information captured during the application execution that is persisted to the database table T_AF_EVENTLOG. T_AF_EVENTLOG:
Column name Description
Id Unique id
Type The event type
Code The event code
SeverityLevel The event severity level:
1: Information
2: Warning
3: Abort the activity
4: Fatal, close the session
SubActivityLevel Name of Sub Activity where event occurred.
MethodName Name of class method where event occurred.
ObjectName Name of class where event occurred.
ASP Name of ASP page where event occurred.
Context Event context default value.
UserID ID of user logged in when event occurred.
LastUpdate
USER FRAMEWORK DESIGN FIG. 16 depicts a method 1600 for managing user information. A site server is provided in operation 1602. The side server has information stored on it including preferences, roles, and details relating to users. A database separate from the site server is provided in operation 1604. The database has information stored thereon including preferences, roles, and details relating to the users. In operation 1606, an identity of one of the users is authenticated. A single interface is displayed in operation 1608, which provides the user access to both the site server and the database upon authentication of the identity of the user. In operation 1610, the user is allowed to view and change the information that is stored on the site server and the database and that is associated with the user. The single interface is tailored in operation 1612 based on the information associated with the user. The identity of the user may be authenticated by verifying a user name and a password, a secure sockets layer (SSL) certificate, and/or a log-in form. Further, the preferences relating to the users may include a currency in which monetary values are displayed and a language in which text is displayed. Also, the roles relating to the users may include a customer, a manager, and an employee. Additionally, the details of the users may include a user name and a legal name. The following material provides a more detailed description of the above-described method. This portion of the present description details the ReTA User framework design from the perspective of the application developer. The primary role of this framework is to provide services that allow the application developer to maintain user preferences, roles and security. In regards to security, the User framework provides User Authentication services through any of the standard Internet Information Server security methods: Username/Password sent in clear text. SSL Certificates Windows NT Challenge/Response (Intranet only) HTML Forms login (Site Server version only) Once the user has been authenticated, the User framework provides services for accessing: User information--NT username, Real Name. User Preference information--For example Language, Currency (These are configurable) User Role information (e.g. Customer, Manager, Employee) User Role Preference information There are two implementations of the User Component: One is database driven and the other interfaces with Site Server Personalization and Membership directory. User Framework Description With reference to FIG. 16.1, the User framework 1630 enables two approaches to maintaining user information. The framework supports two approaches by exposing a single set of interfaces that can be used by either of the two user framework components. With the AFUserSS component 1632, the framework interfaces with the Microsoft Site Server products Personalization and Membership Directory. For this user component, SiteServer holds and manages user information. With the AFUserDB component 1634, the framework interfaces with database tables. For this user component, database tables define the user information. Services The User Framework provides the following services:
Service Detail
User Information User Role
Maintenance User RoleName
User Preferences
User Role Preferences
User Id
User Name
User RealName
Components The User Framework implements these services through the following COM objects:
Component Service
AFUserDB User information maintained through the following
database tables.
T_AF_USERNAME,
T_AF_USERPREFERENCES
T_AF_USERROLES
AFUserSS User information maintained through SiteServer.
These components are described in detailed in the following sub-portions of the description. AFUserDB The AFUserDB component holds the user role, preferences and details retrieved from the database. When created the user component retrieves the user NT login name, user details and constructs the user preference and user role objects. Methods The IAFUser, IAFUserPreferences and IAFUserRole interfaces define the access to the AFUserDB component. These interfaces support the following methods:
Method Description
Init This method retrieves the user's NT name, user details
from the database, constructs the preference object and
constructs user's role object.
GetUserID Returns the user id.
GetUserName Returns the user's NT account name.
GetRealName Returns the user's real name.
GetPref Returns user's preference based on label passed to this
method.
SetPref This method sets the user's preference to the 2.sup.nd
parameter passed in.
GetRoleID Returns the user's role ID.
GetRoleName Returns the user's role name.
GetRolePref Returns role preference.
SetRolePref This method sets the current user's role preference
AFUserSS The UserSS component interfaces with the SiteServer personalization and membership services. This component uses SiteServer to handle the user security, role and preferences. Methods The IAFUser, IAFUserPreferences, and IAFUserRole interfaces define the access to the AFUserSS component. These interfaces support the following methods:
Method Description
Init This method returns a zero integer. It is here for
compatibility with the UserDB component.
GetUserID The method returns a string value representing the user
id. SiteServer's API is used to obtain this value.
GetUserName This method returns a string value representing the user's
name. SiteServer's API is used to obtain this value.
GetRealName This method returns a string value representing the user's
real name. SiteServer's API is used to obtain this value.
GetPref This method returns a string value representing the user's
preference. SiteServer's API is used to obtain this value.
SetPref This method accepts two parameters (String
the PrefLabel, String thePrefValue). The preference is set
that matches the "thePrefLabel" passed in.
GetRoleID This method returns the current user id.
GetRoleName This method returns the current user's role name.
GetRolePref This method returns the current user's role preference.
SetRolePref This method sets the current user's role preference
PERSISTENCE FRAMEWORK DESIGN FIG. 17 illustrates a method 1700 for managing business objects in a system that includes a plurality of sub-activities which each include sub-activity logic adapted to generate an output based on an input received from a user upon execution, and a plurality of activities which each execute the sub-activities in a unique manner upon being selected for accomplishing a goal associated with the activity. First, in operation 1702, an identifier and a reference to a business object are received from one of the sub-activities upon the execution thereof. In operation 1704, a database is accessed and data from the database is retrieved based on the identifier. The business object is created and populated with the data retrieved from the database in operation 1706. The data may be stored on the database in tables. Further, the created business object may replace an existing business object. Additionally, the identifier may identify a customer and the business object may be a customer object. Also, a business object referenced by one of the sub-activities may be removed upon the execution thereof. The business object may be a Visual Basic business object. In another aspect of the present invention, the business object may be a Java business object. The following material provides a more detailed description of the above-described method. This portion of the present description details the ReTA Persistence framework design from the perspective of the application developer. The role of this framework is to provide services that interact with application database(s) to create, retrieve, update and delete business objects. Persistence Framework Description The ReTA Persistence framework provides a transparent and flexible mapping of the business object attributes to relational database tables. To implement this "business object to database table" mapping, the framework is tightly integrated with all business objects. The framework exposes abstract methods that the application developer implements in the business objects. In contrast with the other ReTA frameworks, the Persistence framework is not implemented as a separate component. The Persistence framework is a set of local language classes available in Java or Visual Basic. FIG. 17.1 shows a SubActivity component 1730 using the Persistence framework 1732 to retrieve a Customer Object 1734 from the Database. Services The Persistence Framework provides the following services:
Service Detail
Database Connection Uncouple database connection from application
Database mapping Map an object to a database table
Object query Trigger queries on objects
Easily iterate through the results
Record locking Optimistic locking
Encryption Encode Database User Name and Password
Note: Encoding implemented only once (as
part of system set up).
Decode Database User Name and Password
Note: Used by persistence framework during all
database accesses.
Classes The Persistence Framework implements these services through the following Java or Visual Basic Classes:
Service
Java Class
AFPLPersistableObj This is the superclass of all Java Persistable Objects
in the application. Application developers create a
subclass for each Business Object and implement all
the abstract methods that this class defines.
AFPLExtent Provides the mapping between the business object
and its associated database table and manages
the database connection.
Visual Basic Class
VBPersistObj This is the interface class that all VB must
implement. Application developers create a subclass
for each Business Object implement all the methods
that this class defines.
VBExtent Provides the mapping between the business object
and its associated database table and manages
the database connection.
These classes are described in detailed in the following sub-portions of the description. AFPLPersistableObj The AFPLPersistableObj abstract class contains methods called by the application developer objects to manage attribute values common to all persistable business objects (user id and last update timestamp). In addition, the AFPLPersistableObj class represents the superclass of a persisted object. In order to persist a business class; the application developer extends AFPLPersistableObj and implements the AFPLPersistableObj abstract methods. The AFPLPersistableObj defines the following methods:
Method Description
addColumnNames Return the column names common to all
persistable business objects (user id and last
update timestamp). The application
developer invokes this method from the
constructor method of business object.
addPersistedAttributes Return attributes common to all persistable
business objects (user id and last update
timestamp). The application developer
invokes this method from the
getPersistedAttributes method of a business
object.
isEqual Abstract method that all Business Objects
must implement. If the passed in attribute
is one of the attributes common to all
persistable business objects (user id and last
update timestamp), compare the passed in
value to the currently held attribute value.
The application developer should also invoke
the superclass isEqual.
newFrom Abstract method that all Business Objects
must implement. Populate the Business
Object using the result set passed as an
attribute. The application developer should
also invoke the superclass newFrom method
to populate the UserId and lastUpdate
attributes.
attributeGet Abstract method that all Business Objects
must implement. Return the value of the
attribute passed as parameter
attributeSet Abstract method that all Business Objects
must implement. Set the value of the
attribute passed as parameter
setUserId Set the user id value
getUserId Return the user id value
setTimeStamp Set the last update timestamp value
getTimeStamp Return the last update timestamp value
setUserIdTimeStamptoObj Adds the last update timestamp value and
user id to the passed in persistable
business object. The application developer
invokes this method from the
setUserIdTimeStamptoObj method of a
business object.
getColumnNames Return the database table column names.
getPersistedAttributes Return all the attributes to persist. The
application developer invokes the
addPersistedAttribute method of the super
class to add user id and last update
timestamp attributes.
getKeyNames Return the primary key field name.
getKeyValue Return all the primary key values.
getKeyAttributeVector Return vector of all key attributes.
getKeyAttributes Return the array of all key attributes.
getTableName Return the name of the database table
associated with this business object.
columnList Returns a comma-separated list of all
columns corresponding with this class.
attributesForInsert Returns a comma separated list of attribute
values for SQL insert command.
attributesForUpdate Returns a comma separated list of attribute
name = attribute value pairs for SQL update
command.
conditionForUpdateRemove Returns the `where` clause for SQL update
or remove command (both are equal).
AFPLExtent The AFPLExtent class provides the mapping between the business object and its associated database table. In addition, the AFPLExtent class represents the domain defined by the visible part of the database table for the specified user. This class holds the passed in database URL, username and password used during the access to the database. Lastly, the AFPLExtent class manages the database connection. Methods The AFPLExtent class implements the following methods used by the application developer from business factory objects:
Method Description
Select Return all business objects matching the search criteria.
Update Update all business objects matching the search criteria
Delete Remove all business objects matching the specified criteria
Insert Insert new business object(s)
VBPersistObj The VBPersistObj interface class contains methods that need to be implemented on every VB Business Object. The application developer implements the following methods from their business object:
Method Description
newFrom Create a new instance of that class using the
result set passed as parameter
GetValue Returns the value for the attribute passed as
parameter.
SetValue Sets the value for the attribute passed as
parameter.
GetColumns Return the database table column names.
GetTableName Return the Table Name where this class is
stored in the database.
attributesForInsert Returns a comma separated list of attribute
values for SQL insert command.
attributesForUpdate Returns a comma separated list of attribute
name = attribute value pairs for SQL update
command.
conditionForUpdateRemove Returns the `where` clause for SQL update
or remove command (both are equal).
VBExtent The VBExtent class provides the mapping between the business object and its associated database table. In addition, the VBExtent class represents the domain defined by the visible part of the database table for the specified user. This class holds the passed in database URL, username and password used during the access to the database. Lastly, the VBExtent class manages the database connection. Methods The VBExtent class implements the following methods used by the application developer from business factory objects:
Method Description
Select Return all business objects matching the search criteria.
Update Update all business objects matching the search criteria
Delete Remove all business objects matching the specified criteria
Insert Insert new business object(s)
SESSION FRAMEWORK DESIGN FIG. 18 illustrates a method 1800 for persisting information during a user session. First, in operation 1802, a session is initiated upon a user accessing a predetermined starting page. A current page accessed by the user is then tracked in operation 1804 while browsing a plurality of pages during the session. In operation 1806, a record is maintained of a page previously accessed by the user during the session. Information is persisted in operation 1808. This information is selected from a group of items such as user identifier, a time of a most recent user action during the session, activity components accessed during the session, and business components accessed during the session. During the session, the current page, previous page record, and information are provided to at least one activity component in operation 1810. Also in operation 1810, the activity component generates output based on input provided by the user via the plurality of pages. In one embodiment of the present invention, the activity components to which the current page, previous page record, and information are provided may be selectively determined. In addition, the activity component may be provided an indication as to whether the user is permitted to access each of the pages. In such a case, the activity component may also be provided the indication as to whether the user is permitted to access each of the pages based on the previous page record. In another embodiment of the present invention, the information may also include the user identifier. In such an embodiment, user preferences may be looked up based on the user identifier with the information including the user preferences. Also, in order to identify the persisted information, references to activity components, business components, a user component, a tracking manager component, a system preference component, and an event handler component may be employed. The following material provides a more detailed description of the above-described method. This portion of the present description details the ReTA Session framework design from the perspective of the application developer. The primary role of this framework is to provide services to handle the stateless nature of Internet. By default, the Internet does not provide services for maintaining information between pages. Without these services, it would not be possible to implement most eCommerce functionality. For example, session level state is necessary to implement eCommerce functionality where a customer can select products on multiple product description pages and then submit a complete product order request from a confirm order page. The ReTA Session framework leverages the Internet Information Server/Active Server Page (IIS/ASP) session object, which is automatically created when a user who has no open IIS sessions requests a Web page. Session Framework Description FIG. 18.1 illustrates a Session Flow Diagram--On Session Start. As shown, a Session framework 1830 operates in the MTS Runtime Environment 1832. FIG. 19 illustrates a Session Flow Diagram--On Start ASP Page. Again, the Session framework 1900 operates in the MTS Runtime Environment 1902. The ReTA Session framework provides services required throughout a user session. The user creates the Session framework at log on and removes the Session framework at log off. During the lifetime of the user session, application and architecture components require certain data to persist. This framework provides services to store and retrieve all information needed for a particular user session. This information may persist throughout the user session. The Session framework also provides services to uniquely identify the user and enforce access rights. The user information that the Session framework persists, in memory, between Active Server Page requests includes: User id Identifies session user Last page Last page accessed by the session user. Current page Current page accessed by the session user. Last connection time: Session user's last connection time. Current activity: Activity currently being executed by the session user (refer to activity framework design) Activity Components All activity components accessed during user session Business Components All business components accessed during user session required by multiple activity components. Note: This framework uses the Active Server Page's Session Object. Thus, the framework only works with browsers that accept cookies. For other browsers (or if cookies are disabled), a new ASP Session Object may start for each web page. Services The Session Framework provides the following services:
Service Detail
Security User identification
Page access authorization - Session scope
Automatic abort - timeout
Customized information Customized user interface
delivery Customized application access
Manage user session Inform user on session status
Abort session
Flow control Page to open on action
Pages of activity
Maintain context Activity Component context
Business Component context - shared among
activities
Message Broacast Register listener
Broadcast Message to registered listeners
Encode Database User Name and Password
Encryption Note: Encoding implemented only once
(as part of system set up).
Decode Database User Name and Password
Note: Used by session framework during
all database accesses.
Components The Session Framework implements these services through the following COM objects:
Component Service
AFSession Manages current user session
AFSystemPreferences Contains System Preferences from database table
T_AF_SYSTEMPREFERENCES
AFTrackingManager Contains security and flow control info from
database tables T_AF_PAGESOFACTIVITY,
T_AF_AUTHDESTINATIONPAGE
T_AF_AUTHSOURCEPAGE
T_AF_DESTINATIONFORACTION
AFBrowserInfo Contains current user's web browser information
These components are described in detailed in the following sub-portions of the description. AFSession The AFSession component maintains the user's session state information. To maintain the state information, this component holds references to activity components (logical units of work--application flow logic), business components (business logic required across activity components), user component (user information), tracking manager component (web page access security and web page flow control information), system preference component (system preference information) and event handler component (event handler) created during the user's session. From the application developer's perspective, the state maintenance work performed by the AFSession component is transparent. The application developer leverages the session services through populating the database tables with the client specific information. Methods The IAFSession, IAFEventBroadcaster and IAFContext interfaces define the access to the AFSession component. These interfaces support the following methods:
Method Description
AFSession
Start
Start session - Called by ASP (global.asa
Session_OnStart).
Stop Stop session - Called by ASP (global.asa
Session_OnStop).
StartPage This method is called by ASP script logic at the
start of each page. It is used to broadcast a
pageStart event to all the listeners (activity
components) that have registered as interested in
pageStart events. It also stores this page as
the current page and moves the existing current
page into the last page (information held by the
session's "tracking" object).
StopPage This method is called by ASP script logic at the
end of each page. It is used to broadcast a
pageEnd event to all the listeners (activity
components) that have registered as
interested in pageEnd events.
Abort This method is called when the session is to
be aborted. This method calls the abort method
on all activity components known to session
(held by the session's "activity context" object).
SetCurrentPage Sets the current Active Server page (held by the
session's "tracking" object).
GetCurrentPage Returns the current Active Server Page (held in
the session's "tracking" object).
GetLastPage Returns the last Active Server Page accessed in
the session (held in the session's "tracking"
object).
SetSessionId Update the sessionId attribute.
GetSessionId Returns the current session Id.
SetCurrentActivity Sets the current activity Page (held in the
session's "tracking" object).
GetCurrentActivity Returns the instance of the current activity (held
in the session's "tracking" object).
GetActivity Returns the instance of the requested activity
(held by the session's "activity
context" object).
IsActivityInContext Ask session if it has a reference to the requested
activity (held by the session's "activity context"
object). If found, returns true, else returns false.
AddActivity Add the requested activity (references held by the
session's "activity context" object). Set the
requested activity to the current activity (held in
the session's "tracking" object).
RemoveActivity Remove the current activity (held by the session's
"activity context" object).
GetNextPage Returns the next web page to access for the
current activity (information held by the
"tracking manager" component).
GetAFUser Returns the "user" component (information
associated with the current logged in user).
SetAFUser Sets the user for the current session. Returns an
integer indicating success or failure.
GetTrackingManager Returns the "tracking manager" component.
GetEventHandler Returns the "event handler" component.
GetSystemPreferences Returns the "system preference" component.
AddObject Add a business object (held by the session's
"business object context" object).
GetObject Returns the instance of the requested business
object (held by the session's "business object
context" object).
RemoveObject Remove the instance of the requested business
object (held by the session's "business
object context" object).
ContainsKey Returns true if the "label" of the requested
business object exists (held by the session's
"business object context" object).
GetKeys Returns all business object "labels" (held by the
session's "business object context" object).
AFEventBroadcaster
AddListener Add the requested listener (activity component)
to list of interested listeners. If an activity
is interested in a StartPage event (i.e., needs
to capture user modified data from the previous
web page), this method is called by
ASP script logic at the start of the page.
RemoveListener Remove the requested listener (activity
component) from list of interested listeners.
BroadcastEvent Invoke the receiveEvent method on all registered
listeners (activity components). Refer to activity
framework design for the automated user data
capture functionality.
AFSystemPreferences The AFSystemPreferences component contains system preferences (held during the session). This component uses the ReTA persistence framework to read the system preferences from the database ("system preferences" table). Methods The IAFSystemPreferences interface defines the access to the AFSystemPreferences component. This interface supports the following methods:
Method Description
Start Reads and stores "system preference" data from "system
preferences" table.
GetRootAsp Returns the application's ASP root location (as defined in
from "system preferences" table).
AFTrackingManager The AFTrackingManager component provides page-sequence security, dialogue flow and activity flow functionality for the session framework. Page Sequence Security The page sequence security is defined in the following tables: Table "Authorized Destination Page" 1834: Define for each page, the pages that are allowed to be accessed. If no authorized destination pages are defined, the page is authorized to access any page.
Column name Description
Id Unique id
CurrentPage Name of the current page
DestinationPage Page which is authorized to be access
Table "Authorized Source Page" 1836: Define for each page, the pages that are allowed to access it. If no authorized source pages are defined, the page is authorized to be accessed by any page.
Column name Description
Id Unique id
CurrentPage Name of the current page
SourcePage Page authorized to access the current page
Dialogue Flow The dialogue flow is defined in the following table: Table "Destination For Action" 1838: Define the action flow between the web pages (i.e., which ASP is open when a specified push button is clicked during a specified activity).
Column name Description
Id Unique id
CurrentPage Name of current page
Action Name of the UI widget, which triggers the action.
Acitivity Name of the activity where the event is triggered
DestinationPage Name of the page to open
Activity Flow The activity flow is defined in the following table: Table "Page Of Activity" 1840: Define the automated activity switching when the user jumps from one web page to another.
Column name Description
Id Unique id
Activity Name of the activity
Page Name of the page belonging to the activity
Methods The IAFTrackingManager interface 1904 defines the access to the AFTrackingManager component. This interface supports the following methods:
Method Description
CheckAuthorizedSourcePage Determines if the previous page is in
the list of allowable sources for this
page (as defined in "Authorized
Source Page" table). If access
is allowed, returns true.
Else, returns false.
CheckAuthorizedDestinationPage Determines if this page is in the list
of allowable destinations for the
previous page (as defined in
"Authorized Destination Page"
table). If access is allowed, returns
true. Else, returns false.
GetDestination Returns destination page for
requested action, activity, and source
page (as defined Destination
For Action" table).
IsPartOfActivity Determines if this page is part of
requested activity (as defined in
"Page of Activity" table).
If page is part of activity, returns
true. Else, returns false.
Start Reads and stores the Authorized
Destination Page, Authorized Source
Page, Destination For Action and
Page of Activity tables.
AFBrowserInfo The AFBrowserInfo component contains the user's browser information. Methods The IAFBrowserInfo and IAFEditable interfaces define the access to the AFBrowserInfo component. These interfaces support the following methods:
Method Description
GetBrowserName Returns the name of the browser that the
user is currently running.
GetBrowserVersion Returns the version of the browser that the
user is currently running.
IsPluginSupported Note: not implemented
IsCustomPluginSupported Note: not implemented
IsMimeSupported Note: not implemented
SetValues Sets the requested attribute's value.
GetValue Returns the requested attribute's value.
USER INTERFACE FRAMEWORK DESIGN FIG. 20 illustrates a method 2000 for generating a graphical user interface. A form is initially created in operation 2002. The form includes a plurality of attribute rules dictating a manner in which user interface objects are situated thereon. In operation 2004, a plurality of user interface objects are selected. A page is generated in operation 2006 with the selected user interface objects situated on the page in accordance with the attribute rules of the form. JavaScript actions are attached to the selected user interface objects in operation 2008. The JavaScript actions are capable of being executed upon detection of a user action involving one of the user interface objects. The user interface objects may include one or more of the following: a push button, a text box, a text area, a radio button, a check box, a drop down, a blank item, a user interface list, and a static table. The user action may include at least one of clicking on one of the user interface objects, changing text in one of the interface objects, exiting a text box of one of the interface objects. Further, the user action involving one of the user interface objects may cause a predetermined event. Optionally, the page may be an HTML page. The following material provides a more detailed description of the above-described method. This portion of the present description details the ReTA User Interface (UI) framework design from the perspective of the application developer. The role of this framework is to provide services that generate the HTML code for UI widgets and attach Javascript actions to UI widgets. The UI framework exposes these services through a set of Component Object Model (COM) objects. The application developer uses these UI COM objects and their services through scripting logic added to the application's Active Server Pages (ASP). User Interface Framework The User Interface framework provides components for generating HTML. An HTML page is generated from a combination of the various UI Components. FIG. 20.1 shows the steps for generating a HTML page consisting of a form 2030 with a TextBox 2032, a DropDown list 2034 and a PushButton 2036. The User Interface Framework provides the following services:
Service Detail
Generate UI Items Form
Push Button
Text Box (single-line entry field)
Text Area (multi-line entry field)
Radio Button group
Check Box
| ||||||
