Rich Internet Application (RIA) to visualize a rule-based ...



Rich Internet Application (RIA) to visualize a rule-based Health of a Project

Final Report

Version

Faculty Advisor

Dr. Kwok-Bun Yue

Mentor

Mr.Abbasi Dhilawala

Team Members

Karthik Nittala

Rachana Mandava

Satya Veni Achanta

Srinivas Veesam

Acknowledgement:

We take the opportunity to thank our instructor Dr. Kwok-Bun Yue and mentor Mr. Abbasi Dhilawala for the valuable guidance and encouragement they have provided us in bringing out this project successfully.

We would also like to thank Mr. Nicholas Davis for helping us getting started with Flex. We would also like to thank all the people who helped us in this project and whom we might not have mentioned here.

Abstract

Tietronix Software, Inc. had developed a software project management tool called SDA. The User Interface of this tool was built using Scalable Vector Graphics (SVG). This tool is currently being used by Tietronix and a few other Government organizations. They feel that a richer UI would look good when launching this product into the market. Tietronix wants to upgrade the software to use a richer UI built using Flex, an environment for developing Rich Internet Application (RIA).

The existing system displays a color representation of the status of each activity in the process flow diagram based on simple metrics- the start date, the end date and percentage work complete of each activity. An activity that is running late by ten days is represented by the same color as an activity that is late by a day. This representation doesn’t give the user a numerical representation of the status of the project. Tietronix wants to compute the health of the project which gives a clear picture about the status of the project at various stages of its lifecycle. In addition to the simple metrics they have been using to display the status of an activity, our application would consider factors such as risk tolerance, software class designation, and threshold values for alerts. This computation of the health would be carried out using a set of rules implemented as JBoss rules.

Our project emphasizes on the display and animation of the software process flow diagram that contains ‘flow’ activities. Each activity represents some kind of work that needs to be performed by a person on the software lifecycle team. For each of the activities, ‘n’ number of data points will be provided. Our aim is to run through these data points, calculate project status using rules and then animate the process flow to update the project status as it progresses through the data points.

Table of Contents

1. Introduction………………………………………………………………………….1

2. Requirements of the project………………………………………………………….3

3. Required Technologies…..……………………………………….………………….7

4. Design and Implementation of the Solutiion

4.1 System Architecture Diagram……….…………………………..……........11

4.2 Use Case Diagram……………………………………………...….……….12

4.3 Implementation issues…………………………………………….….…….13

5. Evaluation of solution

5.1 Solution to the problem……………………………………………..…......14

5.2 Design of solution………………………..…………………………..........14

5.3 Functionality of the solution…………………………………………........15

5.4 Performance of Solution prototype…………………………………....…..15

6. Lessons learnt………………………………………………………………………16

7. Future enhancements……………………………………………………….………17

8. Tasks we have completed…………………………………………………....……..18

9. Conclusion……………….………………………………………………………….18

10. References……………………..………………………………………………….19

Appendix - A

A.1. Project Management

A.1.1 Time line of our project………………….……………………..20

A.1.2 Team information………………………………………………20

A.1.3 Task Distribution……………………………………………….21

Appendix - B

B.1. Downloaded Technologies…………………………….…………………23

B.2. How to deploy the software ………….…………………..……………...23

B.3. How to use the software ………………………………………………...30

Appendix - C: Screen shots…………………………………………………………..34

1. Introduction

“SDA is a software process enactment platform that guides software teams through their project specific standards, processes and procedures.  Software projects are decomposed into all of their required process steps or tasks.  Each task is assigned to project personnel.  SDA orchestrates the performance of work required to complete all project tasks in the correct sequence.  SDA notifies team members when they may begin work on their assigned tasks and then provides all of the tools, instructions, reference materials, and supportive artifacts which allow users to efficiently and compliantly perform their work.” [1]

SDA has been built by Tietronix using Scalable Vector Graphics (SVG). SVG is an XML specification for two dimensional graphics. This product is being used by Tietronix and a few other Government organizations. With an intent to release it into the market, Tietronix now wants to upgrade this software to use a richer user interface built using an open source Rich Internet Application (RIA) development environment Flex.

The status of each activity in the process flow diagram is displayed as a color representation based on simple metrics such as start and end dates , and the percentage work complete. The lack of a numerical representation of the status of an activity fails to give the user a clear understanding of the status of the project. Tietronix would now want to incorporate this numerical representation, called the health of the project into the existing application in addition to upgrading the UI. The health of the project is calculated based on a set of rules implemented as JBoss rules. The data for the rules will be provided by the already existing TieSPA database.

The major tasks of the project are:

• Understanding the requirements

• Building rules in JBoss

This task is the heart of the project. Computation of the health of the project is implemented as a set of rules. For different states of an activity, a different formula for calculation of the health was to be implemented.

• Developing User Interface in Flex

To accommodate large amounts of data in the space we have, we have decided to use 3d objects. Each activity is represented by a cube, containing data relevant to the activity on four sides of the cube. Data that is displayed include start and end dates, percentage work complete, alerts, resources assigned.

• Integrating Flex and JBoss

The UI and the rules need to exchange data i.e. data from the UI has to be sent to the server components wherein the rules are triggered and the health is calculated. The server component needs to send back data to the UI for display.

• Report and other Documentation

2. Requirements of the Project

This project involves the (RIA) display and animation of a software process flow diagram that contains ‘flow’ activities. Each flow activity represents some kind of work that needs to be performed by a person on the software lifecycle team. For each of the activity ‘n’ number of data points will be provided. The intent of the capstone is to run through those data points, calculate project status via rules and then animate the process flow to update the project status as it progresses through the data points.

Every time status info is supplied the process flow diagram is modified and animated to reflect the new overall status. Each individual flow activity will use color to represent the schedule status – for instance red will represent a process flow that is behind schedule. Also, each flow activity will use fill levels to represent % complete. An example would be if a process activity at time T is 60% complete, then that process activity graphic representation will be ‘filled in’ with color that covers 60% of the area of the graphic – filled in from left to right. The color of the fill will be the color that reflects the schedule status (again, a red color would reflect a ‘late’ status). For each unit of time that data is supplied the following things will occur:

• Animation of the process flow – as discussed above

• Process metrics are compiled (via rules)

• System alerts may be generated and logged

Tietronix will generate several data sets for this application to operate upon. The intent of the rules is to allow a generic system so that parameters can be changed to reflect the change in how things are done. To help with this the capstone will generate an interface for the initialization of the project. The initialization will take in various parameters that allow finer tuning of the rules.

Setup & Initialization:

1) User is prompted for and enters dataset identifier for a run

• Tietronix will prefabricate several dataset inputs for this application

• They should be available to select with a dropdown menu populated w/their names

• The selected data set should be used for all further calculation.

2) Initial settings are displayed and the User will be allowed to modify:

• Software class designation (Valid values are A, B, C, D and E with C as the default)

• Risk tolerance (Valid values are Low, Moderate, High with Moderate as the default)

• Threshold range for status calculations

i. Very Late (default 0.2)

ii. Moderately Late (default 0.7)

iii. On time (default 1.0)

Process Flow Animation:

1) After initial settings are finalized – User pushes a start button to begin a run

2) For each time T=1 to n

a. Compute the status for each activity in the flow based on several parameters. The computation will occur in the rules. The rules will take in attributes like

i. Planned start, planned end

ii. % complete

iii. Process state (active, inactive, completed etc)

iv. The user defined parameters (risk tolerance, software class etc)

b. The rules should store the computed into a local storage (database, file etc)

c. The rules will also generate alerts based on certain conditions (see Rules section below)

d. The application then streams the data to the Flex UI. This stream includes data like the computed status, % complete, Resources assigned, alerts created etc.

3) There should be some mechanism and interface to conclude a run and begin another

4) There should be some mechanism and interface to conclude a run and end the application

5) If alerts were issued for any process activities have some kind of alert bar underneath each activity that is somehow lit up reflecting one or more alerts were triggered during this ‘time’ (see next section labeled Rules)

6) Display the estimate of the total time left to complete the process flow somewhere on the process flow (see next section labeled Rules)

Rules:

Rules for process flow display:

1) Compute schedule status

a. For each process activity that is active

i. Compute the activity status by a formula

ii. Compute the status based on the following:

1. < (very late) THEN color=red

2. Inbetween (very late) and (moderately late) THEN color = yellow

3. Inbetween (moderately late) and (on time) THEN color = green

4. > ontime THEN color = gold

iii. Create alerts for the following conditions and send to the alert log

1. Very late or moderately late condition

2. % complete backs up from the last time

3. % complete does not advance in 5 time increments

4. Person responsible for process activity changes or is unassigned

b. End the loop

Main Displays

1) Initialization form

2) Process flow – animated during data run

3. Required Technologies:-

Our project is implemented as a three tier application using Flex for the presentation layer, JBoss, Java and XML for the business logic and MS SQL Server 2000 for database. We have also used papervision3d to render 3D cubes in to flex.

Flex:

Flex is a highly productive open source framework for building and maintaining more responsive web applications. It gives the user a rich experience in building dynamic web pages and makes web application look like windows application. It doesn’t have cross browser compatibility issues like AJAX, as it uses flash player to run. Flex can handle large data sets on the client-side. Thus runtime and data manipulation time are significantly less when compared with other RIA technologies.

JBoss Rules:

A rule based inference engine is open-source software that can apply one or more rules to one or more facts; utilize the knowledge from an expert system to make decisions and provide resulting consequences. It works by decomposing large sets of rules into a very efficient network of nodes that can process and react to facts far more efficiently than programmed manual.

The three most important aspects for specifying the system are facts, patterns, and the rules themselves. Facts are just bits of information that can be used to make decisions. Patterns are similar, but can contain variables that allow them to expand into other patterns or facts. Rules are (normally) written in the "drl" language. Finally, rules have predicates/premises that if met by the facts will fire the rule which allows the action to be performed (or conclusion to be made).

[pic]

This Rule Base inference engine takes input elements like software class designation, percentage work complete, planned start, planned end, actual start, actual end and risk tolerance against a set of business rules (written in health.drl) and triggers an action (calculating activity status) if the rules evaluate it to be true.

Implementation details of JBoss:

1. Creation of framework to run JBoss rules:

PackageBuilder builder = new PackageBuilder

2. Load rules from a ‘drl’ file:

final Reader source = new InputStreamReader(Health.class.getResourceAsStream("Health.drl"));

3. Add rules to a package:

RuleBase ruleBase = RuleBaseFactory.newRuleBase ()

ruleBase.addPackage (pkg)

4. Working Memory creation:

StatefulSession session = rulebase.newStatefulSession ()

1. Insert data into session so as to check against rules:

session.insert ()

6. Fire all rules and dispose session:

Session.fireAllRules ()

Session.dispose ()

Advantage of JBoss Rules:-

• Logic and Data Separation:

Rules engines simplify applications by separating business policy or rules logic from process, infrastructure, and presentation logic. This modularity enables business analysts, rules developers and auditors to develop, deploy, modify and manage a business process rules with much greater ease and speed.

• Speed and Scalability:

The Rete algorithm provides very efficient ways of matching rule patterns to the domain object data.

• Centralization of Knowledge:

Rules can create a repository of knowledge (a knowledgebase) which is executable.

• Tool Integration:

Tools such as Eclipse provide ways to edit and manage rules and get immediate feedback, validation and content assistance. Auditing and debugging tools are also available

4. Design and Implementation of the solution:

4.1 System Architecture Diagram:

The system has been built as a three tier web application. The UI Component is built using an open source rich internet application development framework, FLEX. Inputs from the user interface are sent to the JSP in the middle layer via HTTPRequest. The JSP then calls a method calculateHealth, which triggers the rules in the Rules component.

[pic]

Values required for the calculation of the activity status are picked up from the database and the calculated activity status is stored in the database. The GenerateXML method is then called from the JSP, which retrieves required information from the database in the form of am xml string. This xml string is sent back to the user interface as HTTPResponse.

4.2 Use Case Diagram:

The user is a member of software life cycle team. This application helps the user to know the status of the project. A user is able to calculate the health of the project by selecting some of the metrics such as software designation, risk tolerance.

[pic]

User can also view alerts, resources, start and end dates in the process flow diagram. Alerts for each activity are generated by rules, which in turn use threshold values. Resources are the assignees of that particular activity, and dates indicate the start and end dates of the activity. All the data required for this is retrieved from the database.

4.3 Implementation Issues:

Papervision3d is an open source real time 3d image rendering engine. We have used this to render 3d cubes. Each cube represents an activity in the process flow diagram. Not much documentation as to where to get the libraries is available for papervision3d. The latest release of papervision3d dates back to November 2007. We had to download the latest libraries using subversion, for any of the examples we found to run. Figuring this out took a long time.

5. Evaluation of Solution

5.1 Solution to the problem

Our task is to animate the process flow with health of the software project. We have used three dimensional cubes to represent each activity. We have displayed different colors to reflect the status of each activity and the amount of percentage completed is graphically depicted using progressive bar.

We have come up with a set of rules that calculates activity status. We have also written rules for generating alerts based on threshold settings.

5.2 Design of the solution

We have divided our entire project into three components:

• User Interface component

Built using Flex.

• Rules component

This component consists of a Java class that inserts facts and then triggers the rules. The result of the rules is put in the database.

• Communication component

This component consists of a JSP which receives a HttpRequest from the UI, triggers the rule component and then picks up required data from the database and returns an xmlstring to the UI as HttpResponse.

This division enhances the system flexibility enabling the developer to modify either of the components without affecting the other.

5.3 Functionality of the solution

The basic functionality of this project is to use a rule-based technology to compute the activity status, generating alerts based threshold setting and animating the process flow.

5.4 Performance of the solution prototype

We have demonstrated a reliable prototype that calculates activity status within a minimal time frame and animates the process flow after every polling interval. Hence we believe that our solution has met the given requirements and will be able to cope with future enhancement.

6. Lessons Learnt

Importance of Research

As we are new to the technologies such as Flex and JBoss, learning them in detail required lot of research. We understood how important it is to thoroughly research topics and learn them on which we have no clear idea before trying to implement them.

Team Work

We also understood the importance of team work. Coordinating as a team with different people is very challenging. Through out this project we have learnt a lot about team coordination, planning, communicating through emails, presentation and developing personal attitude towards teamwork.

Time Management

Another important lesson we have learnt while working on this project is the importance of time management. Without time management it is hard to complete things on time. Meeting the various deadlines set by the instructor was a bit tough but on the other hand gave us a valuable experience of how to effectively manage time.

Gained Valuable Experience

We have gained valuable knowledge and experience working on this project. We learnt new technologies like JBoss Rules, Flex and establishing communication between the client and server. We also learned to work in a professional way which will help us in the future.

We have not given much importance to performance of the system, but it did go unnoticed with the project as the application was relatively light. Querying the same table in the database multiple times does affect the performance of the system and has to be avoided.

7. Future Enhancements

• With the effective simulation of the process flow, the process flow diagram need to be generated automatically

• Making the user interface look richer using the rich internet application, providing users with easy navigation and thus, enhancing the user experience.

• The client requirements for the rules were rather simple and more complicated rules need to be added as the project is being enhanced.

8. Tasks we have completed

1. Developing the user interface with 3d objects using paper vision 3d and flex.

2. Writing JBoss rules which are used to calculate the health of the project in a logical way.

3. Calculating and displaying the health of the project

4 Each cube representing an activity displays information on every face of the cube such as activity name, activity status in a progress bar, start and end dates of the activity, resources and alerts.

5. Establishing the communication between flex and database and vice versa.

6. Generation of alerts for each activity based on the user input values.

7. Simulation of the process flow using the test data given and came up with a working end product.

8. Report and other Documentation.

9. Conclusion

We have developed the rich internet user interface making it more effective to the users using 3d objects. The simulation of the process flow diagram is done by calculating the health of the project in a more logical way using JBoss rules. Our current work enables the user to know the status of the software project based on some input values such as software designation, risk tolerance and threshold. Hence, our solution using a rule based approach and rich user interface proves to be very efficient to know the status of the software project. In conclusion, the team has successfully completed the requirements and ended with a successfully working prototype.

10. References:

1.

2. Getting started with flex:

3. Help in flex:

4. JBoss Rules:

5. Wikipedia:

6. Documentation:

Appendix-A

A.1 Project Management

A.1.1 Time Line of our Project

Show below are the various tasks performed in respective time limits.

[pic]

A.1.2 Team Information

Karthik Nittala (Team Leader) – Involved in Research, Architectural Design, coding, DBA, testing and documentation. Coordinated the team and assigned tasks.

Rachana Mandava – Involved in Research, Web Master, coding, debugging and documentation.

Satya Veni Achanta – Involved in Research, Web Master, coding, debugging, and documentation

Srinivas Veesam – Involved in Research, Architectural Design, coding, testing, and documentation

A.1.3 Task Distribution:

The project was divided into tasks depending upon the phase of development. Each task has been assigned to the team members as follows:

|Team Leader |Karthik Nittala |

|Research and Design |All |

|Webmaster | Satya Veni Achanta (50%), Rachana Mandava(50%) |

|Flex | |

| 3d objects |Karthik Nittala(55%), Satya Veni Achanta(45%) |

| Layout |Srinivas Veesam(55%), Rachana Mandava(45%) |

| Implementation |All |

|JBoss Rules |Satya Veni Achanta(50%), Karthik Nittala(50%) |

|Communication between Flex and server components |Srinivas Veesam(50%), Rachana Mandava(50%) |

|using XML and HTTP | |

|Testing and Debugging |All |

|Technical Report |All |

Appendix – B

B.1 Downloaded Technologies:

1. FLEX Builder 3 from

2. Eclipse Classic 3.3.2 from

3. Papervision3d from

4. Drools 3.0.6 from

5. Apache Tomcat 5.5.26 from

6. MS SQL Server 2000 from

B.2 How to deploy:

• Download and install apache tomcat 5.5.26 on port 8080(it is the default port number).

• Unzip Team4_final_deliverables.zip.

• Copy the contents of Team4_final_deliverables\Tomcat 5.5\ common\classes to Program Files\Apache Software Foundation\Tomcat 5.5\common\classes.

• Copy the contents of Team4_final_deliverables\Tomcat 5.5\ common\lib to Program Files\Apache Software Foundation\Tomcat 5.5\common\lib.

• Copy the contents of Team4_final_deliverables\Tomcat 5.5\ webapps to Program Files\Apache Software Foundation\Tomcat 5.5\webapps.

• Install MS SQL Server 2000.

• Restore database set.

Unzip Team4_final_deliverables\testdata.zip. This zip file consists of backups of three databases: Capstone_SDA, Capstone_Liferay, and Capstone_workflow.

The data set is for a project named “TestProjectA”. The dataset contains 72 data points, each 1 day apart.

To restore the backup open up SQL Server Enterprise Manager

[pic]

Right click on databases and select “Restore Database”

[pic]

On the restore dialog type in the name of the database you want to restore (must match the names above) and select “From Device”.

[pic]

Then click on “Select Devices” to bring up the “Choose Restore Devices” Window

[pic]

Click Add and browse to the database files.(Team#4_final_deliverables\testdataset\Capstone_SDA). Select the appropriate File.

[pic]

Click Ok.

On the options tab make sure the log and data file are named correctly (${DATABASE_NAME}_Data and ${DATABASE_NAME}_Log

Also make sure the physical file paths are right (If you installed SQL server with default values the data and log stays on C:, If it was changed make sure the file paths are right)

[pic]

Click Ok

Repeat these steps for all databases.

IMP NOTE: When Installing SQL Server choose “Mixed Mode authentication”. If SQL Server has already been installed, check which mode it is. To do so right click on the SQL Server Name (Generally LOCAL but may also be the machine name) and select properties. On the properties window select the Security tab. The Authentication value should be “SQL Server and Windows”. If not select it and click ok.

• Start Tomcat.

• Open a web browser and enter: in the address bar.

B.3 How to use the software:

1. Select project Name in the drop down menu.

2. Select Software Class Designation.

Software’s are classified into five different categories- A, B, C, D and E.

The degree of relaxation of deadlines is the criteria for classification.

3. Select Risk Tolerance.

Risk Tolerance is defined as the degree of relaxation of deadlines of activities in the process flow diagram. Risk Tolerance can be one of "Low", "Moderate" or "High" and is selected from a dropdown list in the UI.

For example, If an activity is planned to be completed in 10 days, A risk tolerance of "HIGH" and a Software Class Designation "A" would suggest that the end date of the activity can be relaxed by ((10 * 1.5 * 1.5) - 10) = 12.5 days; where 1.5 is the risk tolerance value tied up with "HIGH" and s/w designation class value tied up with "A".

So, a combination of risk tolerance "HIGH" and s/w class "A" ensure that the activity which is planned to be completed in 10 days can be relaxed up to 22.5 days. i.e. the activity is shown to be running on time till the 22nd day after its start.

4. Input Threshold values for alerts.

Three threshold values for "Very late", "Moderately Late" and "On Time" are to be input to the UI. These values are used for the generation of alerts. The default values are: 0.2- very late, 0.7- moderately late and 1.0- on time. If the activity status of an activity is less than 0.2, an alert is generated, saying that the activity is very late.

5. Input Polling interval.

The intent of this software is to run through the given snapshots of the process and display the status of each activity. Polling interval specifies the time after which the UI has to poll the server to pick up data for the next snapshot. The default value for this is 10 seconds. Changing this value below 7 seconds is of no use as it takes at least 7 seconds for the server to respond to the request.

6. Start animation. (Click on "Start" button in the UI)

Once all the inputs are given to the UI, the user may start the animation by clicking on the start button.

7. Pause animation. (Click on "Pause" button in the UI)

Once the animation begins, data from the server is populated on four sides of the cube. Each cube in the process flow diagram represents an activity. So, each side of the cube consists of data relevant to that activity.

Contents of the Cube are:

1st side: Activity Name, progress.

2nd side: Dates.

3rd side: Resources.

Resources are classified into "Active", "Inactive" and "Complete".

This face displays the categories and the number of resources that fall in each category. Clicking on any of those categories displays the details of the resources working on that activity.

4th side: Alerts.

Alerts are categorized into "Severe", "High", "Elevated", "Guarded" and "Low". This face displays the categories and the number of alerts generated in each category. Clicking on any of those categories displays the details of the generated alerts. Once the user pauses the animation, the buttons on the cube are activated and can be used to navigate to other sides of the cube.

8. Resume animation. (Click on "Resume" button in the UI)

The user can resume animation once he is done with reviewing the contents of the cubes.

9. Stop animation. (Click on "Stop" button in the UI)

At any point of time in the animation, the user can stop the animation. He will have to start from the beginning if at all he wants to start again.

Appendix – C

Screen Shots:

This is the home page of project where the process flow diagram is hard coded. Each cube represents an activity and each activity represents some kind of work that needs to be performed by the individual on the software life cycle team. Each cube has four faces each one of it represents the activity name, dates, resources and alerts respectively. The users have an option to select the input values such as project name, software designation, and risk tolerance. The simulation can be paused to see the status of an activity.

[pic]

Once the user enters the input values and pushes the start button the simulation is done taking the test data as input. Here activity 1 starts and progress bar is filled with colors representing the status.

[pic]

The second face of the cube displays the actual start, actual end, planned start and planned end of each activity. The planed start and planned end are displayed initially where actual start is displayed when the activity starts and finally actual end is displayed once the activity is done, these two are done as a part of simulation.

[pic]

[pic]

The third face of the cube displays the name and status of the assignees assigned to the particular activity. Below screen shot shows the status of assignee as complete as the activity is complete. Clicking on the link it displays the name of the assignee, assignee status and comments are in the bottom

[pic]

[pic]

The fourth face of the cube displays alerts as shown. Clicking on the text it show all alerts for the current activity in the detail panel.

[pic]

[pic]

In the below screen shot activity one and two shows that the activities are complete and that is done on time. Activities three and four shows that the activities are complete and they are late based on the input values given by the user.

[pic]

Here all the activities are completed and they are done on time based on the inputs given by the user.

[pic]

By clicking on the help it displays a page as shown. This page helps an user to use the software much effectively. Once the user is done with help by clicking on back in the bottom navigates user to the main page.

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download