TieFlow Process Editor - University of Houston

TieFlow Process Editor
CSCI 6839 Capstone Project
Technical Report
Version 1.0
University of Houston – Clear Lake
Spring 2009
Submission Date : 4/22/2009
Project Guide
Team Members
Dr. Alfredo Perez Davila
Vishal Jadhav
Doyle Rodrigues
Project Mentor
Scott Hetherington
Pratik Zirpe
Shardul kale
1
Abstract
The TieFlow Workflow Toolkit is a web-based electronic workflow system used to automate
manual, form-based processes. The processes are currently defined in a Java-based desktop
graphical editor that consumes and produces (eXtensible Markup Language) XML according to a
Document Type Definition (DTD) created specifically for the Workflow Toolkit. The graphical
Workflow Editor allows a user to graphically create, display, and modify process definitions. The
Workflow Engine uses this XML document to load its database tables with the process
definition so that the process may be executed.
The Team will be involved in fixing a few deficiencies in the editor, and also adding a couple of
new features to the editor. Namely making the time-based simulation more like a wizard with a
better more user friendly feel to it. Adding the Dynamic repeat feature to the editor, ie. the
enabling the editor to be able to read the dynamic repeat element from the xml file given by
the engine and convert it into the diagrammatic representation of the editor, also the editor
must be able to write the dynamic repeat element to the xml file, also building the user
interface to support the repeat element. And finally adding the Copy feature to the editor that
will enable the editor to copy an entire process along with all its children as another new
process identical the process that was copied.
2
Acknowledgements
To Instructor Dr. Perez Davila, a teacher and a guide, to always be there for us and ready to
meet inspite of being on a very busy schedule. We thank you for providing us with all the
valuable input and all the suggestions without which we would be lost and have not have the
right direction in which we needed to proceed. On a further note, the regular meetings helped
us keep up with the project and ensure a proper communication with you the mentor and the
team.
To the Mentor, Mr. Scott Hetherington for spending his valuable time with the team. Answering
all of our doubts in full detail and pointing out mistakes and showing us how to solve the
problem or do it the correct way. Setting up meetings to our convenience and always explaining
things in the simplest possible way. I am sure that we have turned out much better individuals
right now than we were when at the beginning of the project. It was only with his guidance and
support that we were able to complete this project in accordance to the given requirements.
As a project team, we were up against very difficult challenges that sometimes seemed
impossible, but with the help of the instructor and the mentor we learned how to overcome
them. We are really grateful that we were given hands-on experience on a live project, that will
be very useful to us when we step-out into the industry. The Capstone project was in all a very
rewarding experience that we will always cherish. And we wish that we had more opportunities
like the capstone project to gain more industry exposure.
3
Table of Contents
Keywords....................................................................................................................................................... 5
Dynamic Repeat ........................................................................................................................................ 5
Time-Based Simulation ............................................................................................................................. 5
Summary View .......................................................................................................................................... 5
Copy .......................................................................................................................................................... 5
Clone ......................................................................................................................................................... 5
1.
2.
Introduction .......................................................................................................................................... 7
1.1.
Problem Statement ...................................................................................................................... 9
1.2.
Proposed Solution ........................................................................................................................ 9
Project Methodology ......................................................................................................................... 10
2.1.
Phase 1 : Analyze and Bug fixing................................................................................................ 10
2.1.1.
2.2.
Bug Fix the Activity Assignee Element and Email Address Bug ........................................ 11
Phase 2 : Research on Development ......................................................................................... 11
2.2.1.
Dynamic Repeat ................................................................................................................. 12
2.2.2.
Time-Based Simulation ...................................................................................................... 12
2.2.3.
Process Copy ....................................................................................................................... 15
2.3.
Phase 3 : Development .............................................................................................................. 16
2.3.1.
Dynamic Repeat ................................................................................................................. 16
2.3.2.
Time Base Simulation ......................................................................................................... 17
2.3.3.
Copy Process ....................................................................................................................... 20
3.
Lessons Learned ................................................................................................................................. 21
4.
Conclusions and Future Work ............................................................................................................ 21
5.
References .......................................................................................................................................... 22
Appendix A: Project Management ............................................................................................................ 23
Project Management: Work Breakdown Structure ............................................................................... 23
Project Management : Gantt Chart ........................................................................................................ 24
Team Information ...................................................................................................................................... 25
Appendix B: Major Tasks and Contributions ............................................................................................. 26
Tasks and contributions .............................................................................................................................. 26
4
Keywords
Dynamic Repeat
This is a feature that only existed in the engine. The Dynamic repeat can take the repeat value
from the database or a content area field. It can then set the repetition of the element for the
specified time. The editor can now read, the dynamic repeat element to the editor, the editor
has the GUI to display the dynamic repeat fields and modify them, and it can also write the
dynamic repeat element to the xml file.
Time-Based Simulation
Time-Based Simulation simulates a process, and has the capability of defining a simulation in
which resources can be allocated to roles an the process can be simulated. The project team
will be working on this part of the editor, refining it in terms of the usability and adding a few
features.
Summary View
It is a report of the Time based simulation that states on a single page all the parameters such
as the start-up values that the user chose right from the beginning of the simulation. The user
can step to the previous steps to change a particular value after viewing the summary report.
Copy
The copy feature that will be implemented in the editor, will enable the editor to copy an entire
process which will include all its children, branches and properties. The copied process will have
a default name as “copy_(name of original proc)”
Clone
To implement the copy feature in the editor, we have utilized the clone() method for object
duplication. Object in java is manipulated through reference variables, there is no direct way to
5
copy an object. clone() provides some similar functionality, it calls the clone method of its
superclass to obtain a copy, until eventually it reaches the objects clone method. The clone
method that is in the base class provides a standard mechanism for duplicating objects. [1]
6
1. Introduction
The TieFlow Workflow Toolkit is a web-based electronic workflow system built by Tietronics
and used to automate manual, form-based processes. The processes are currently defined
in a graphical editor that has the ability to build processes graphically.
The processor is capable of reading xml (eXtensible Markup Language) documents that are
built on the basis of the DTD (Document Type Defination) and is capable of saving the
process in the form of an xml document that can be used by the engine. The processe are
currently defined in a Java-based desktop graphical editor that consumes and produces
(eXtensible Markup Language) XML according to a Document Type Definition (DTD) created
specifically for the Workflow Toolkit. The graphical Workflow Editor allows a user to
graphically create, display, and modify process definitions. The Workflow Engine uses this
XML document to load its database tables with the process definition so that the process
may be executed.
The TieFlow editor is built in Java with no third party dependencies, using no third party
dependencies or libraries.
In the present version of the TieFlow Process editor, there are a few deficiencies that need
to be rectified. For example the email address of the assignees element could not be
removed through the editor. The editor has some limitations that needs to be improved.
The limitations could be listed as follows.
7
a) The editor cannot take database values of content text values as input for repeating
the timer. The editor cannot handle the dynamic repeat element.
b) The editor cannot copy an entire process. Currently the editor is unable to copy an
entire process with its children.
c) The current time based simulation of the editor, had too many input fields and we
too cramped which made it very confusing for the user to use the time based
simulation. The simulation does not have the feature of stepping back to the
previous step to correct a mistake. Also after the simulation is complete it would not
show all the values selected before proceeding.
Thus appropriate changes need to be made to ensure that the email address would be
removable from the editor.
At present the editor is not able to read the dynamic repeat element from the xml, that is
made on the basis of the given DTD. It is only able to read hard coded values that a fed
through the editor. It does not have the GUI to support the dynamic repeat feature and it
not able write the dynamic repeat element to the xml file when a process in the editor is
saved. Hence to add the dynamic repeat feature needed to be done on three different
levels. Firstly, the parser will need to have the capability to read the dynamic repeat
element. Secondly, the GUI will have to be added to display and allow the user to make and
view the xml file opened to the editor. and finally the tee file will have be modified to write
the dynamic repeat element to the xml file.
Coming to the copy feature, the editor has the capability of building complex process
structures that comprise of many features and children. It would be more productive if a
8
user could just make a copy of a process rather than build another process structure. To
overcome this, the editor should be able to copy an entire process, with all its children and
features and be able to display it as a copy of the original process.
And finally is the Time based simulation, which involves additions in three areas. The first it
the addition of a “back” button on every screen to enable the user to step back and make
changes if necessary. The second is making the time-based simulation more user friendly,
ie. ensuring the flow of forms is more like a wizard asking of lesser information in every
step. And lastly is showing a summary view of all the fields selected by the user during the
entire process.
1.1.
Problem Statement
This project aims to enhance some of the already existing features of the TieFlow
Process editor and also add a few new features like the Dynamic Repeat element.
1.2.
Proposed Solution
The project was divided into a 3 phases the first involves the fixing of bugs and study of
the code, its understanding of how it functions and understanding the inheritance of
the java classes that were concerned with the particular bugs that needed to be fixed.
The phase that followed next was to understand the classes that made up the Time
Based simulation, Dynamic Repeat and the Copy feature. Each of these modifications
and additions to the editor required an in-depth study and understanding of what
classes need to be added, or modified to get the required result. And probably the
understanding was the most challenging part of the capstone project. The Final phase
9
mainly consisted of implementing and trying what we decided and researched about,
adding classes, making changes to the GUI, making change to the parser, makinging
changes to the tee file, etc.
2. Project Methodology
To proceed with the project in an orderly and systematic fashion it was important to divide
the project into phase and go into each phase in the proper order, to ensure that it was a
foundation for the next. Initially we started with Phase 1 and planed to continue with the
next phase as soon as we had finished the first, however Phase 1 took longer time than we
anticipated, hence we started with Phase 2 simultaneously. After we started with Phase 2,
we realized that it was very challenging than we had earlier, and the only way to proceed
was to start with all three parts of Phase 3 simultaneously, along with Phase 2 and in that
way we could implement as we went through the code.
2.1.
Phase 1 : Analyze and Bug fixing
The requirements consisted of bug fixes, to rectify the bugs a proper understanding of
that aspect of the editor was required.
After the code and the problem was
understood, we were able to pinpoint the exact location of the code that required
attention and what was the modification that was required. The biggest challenge in
this phase was understanding the code. The entire module needed to be debugged step
by step to understand its functionality.
10
The following bugs were rectified:

Email Address
The TieFlow Editor allows the user to right click the email address element and
select the Remove option, however the email address is not removed.

Activity Assignee Element
TieFlow Editor allows the user to right-click on the ActivityInstanceAssignees
element and select Remove, but the element is not removed.
2.1.1. Bug Fix the Activity Assignee Element and Email Address Bug
We observed that both of these elements don’t have a removefromParent ()
overridden class definition. As in email address it is directly inherited from
DefaultPackageElement it does not have any different implementation for the
removefromParent () method. While for Element Activity Instance Assignee is
inherited from ElementActivityInstance which didn’t have any overridden method
for removefromParent ().
We
have
added
a
definition
for
removeFromParent
()
in
the
ElementActivityInstance class.
2.2.
Phase 2 : Research on Development
This phase consisted of the study and analysis of the features that needed to either
enhanced or developed in the TieFlow Process editor.
The Editor required
11
development of 3 major parts. Dynamic Repeat, Time-Based Simulation and Process
Copy.
2.2.1. Dynamic Repeat
The Dynamic Repeat is a feature that needed to be implemented in the editor.
There has been no previous work that has been done to the editor in this respect.
The Dynamic repeat element specification exists in the DTD but there was no code
in the editor to support it. The task here was to ensure that the editor was able to
read the XML file with the Dynamic Repeat element and parse the dynamic repeat
element and load it in the memory. Also get its values and display it in the GUI of
the editor, allowing the user to make changes if necessary. The editor must then
have the capability to write the XML file along with the Dynamic Repeat element
using the DTD and the process model the user built in the editor.
A Dynamic Repeat will have two types of elements in which it can specify its
attributes namely Dynamic Repeat Period and Dynamic Repeat specification in a
implied way. The Dynamic Repeat period will specify interval after which the timer
should repeat again. While the Dynamic Repeat Implied element will schedule the
timer to be fired on particular date and time.
2.2.2. Time-Based Simulation
The Time-Based simulation is a feature that already exists in the editor and had to
be modified, but there lied the challenge. The current Time-Based simulator has a
lot of input fields on each screen. It is too complicated for a user as to how many
inputs need to be feed to the simulator to get the simulation started. The task with
12
the Time-Based simulation is to make the entire procedure of simulating a process
easier for the user to understand and more practical to use.
Approach to solution
The second part of the Time-Based Simulation requires is that we implement a
summary view; where in the user will be able to see in a single glance all the Startup conditions, Resource Assignments, etc. The user will then be able to make a
choice if he wanted to keep the existing assignments or move back and make
changes to what was set earlier. The stepping back to a pervious stage of the
simulation was not present in the earlier version of the Time-Based Simulation.
With this the user can now go back, make a change and proceed to simulate only
when the user has the desired attributes for the Time-Based Simulation.
13
Flow of the Time-Based Simulation
14
2.2.3. Process Copy
The final implementation this project will deal with is the implementation of the
copy process. The copy feature will allow the editor to make a copy of an entire
process, along with all its children, resources and attributes. This will enable the
user to make a process similar to the existing process without manually making
one.
The Copy feature will make use of the clone() method. The clone function will be
used to make clones of the objects itself and not the reference to the objects. In
doing so we will have a complete copy of the original process, including the
resources and all the attributes and children.
15
2.3.
Phase 3 : Development
In this section will show the development that has been done on the editor.
2.3.1. Dynamic Repeat
The Dynamic Repeat as was a completely new functionality we decided to break it down
it in different phases. With discussion with our Mentor we decided it to be implemented
in the following steps:1. Building the model classes for the two elements of Dynamic Repeat Time Period and
Dynamic Repeat Time Implied.
2. Modifying the PackageParser.java the file responsible for parsing all the XML
elements to support Dynamic Repeat elements.
3. We also need to have sub classes to represent the elements of Dynamic Time
Implied and also classes to represent the user interface elements of Dynamic Repeat
in the editor.
4. Modifying other classes such as Expression element Factory, Expression Element
Container and others to support the Dynamic Repeat Element.
5. The final step is to modify the Package.tee file to write out the parsed Dynamic
Repeat element when a process specification will be saved.
We have written two completely new classes for representing the Dynamic Repeat element
namely ElementDynamicRepeatTimePeriod.java and ElementDynamicRepeatTimeImplied.java
16
Also we have modified the Package Parser by addition of Dynamic Repeat tags, Dynamic Repeat
Parsing functions and some other changes. The Parser is able to recognize the Dynamic Repeat
element and able to call the respective function to take care of the parsing. It also is able to get
and store the values for the Dynamic Repeat Element. Currently the Dynamic Repeat time
period element is being parsed completely by the Package Parser. We are also able to get and
store the values for those elements and display them in the user interface. The Dynamic Time
Implied elements are being parsed but there are still issues with them and are not able to
completely parse it with all types such as the Constants and Content Data Value elements.
We also have added new classes in the editor ElementDynamicRepeatTimePeriodProps.java
and ElementDynamicRepeatTimeImpliedProps.java to represent the elements graphically in the
editor.
Some of the earlier classes mentioned have also been changed to support the Dynamic Repeat
such as ExpressionElementFactory.java and ExpressionElementContainer.java
2.3.2. Time Base Simulation
1 Define or load a Resource
17
The first diagram shows a window is for loading the resource or defining a new one. The same
window can also assigning these resources to different roles.
If an assignment is made to a role it can be removed by Remove Assignment button which was
provided.
The button View Resource Assignment button gives a tree view showing roles as nodes and
resources assigned to it as its children in a separate window.
2 Shows Assignments to Resources
18
The Second Diagram shows a window that gives tree view showing the assignments of
resources.
3 Modified window without the Save Button
This diagram shows a window which earlier had a “Save” button through which the user could
save the whole simulation.
Next button on this window when clicked, a summary view is shown to the user.
The “Save” button is moved to Summary View window.
19
4 Summary View Window
The Above diagram shows the implementation of the summary view.




It shows all the startup conditions which were set for the simulation.
It has the back button through which one can go back to previous window
and make necessary changes in the simulation.
It has Save button through which we can save the simulation.
Report button is moved to this window, which shows the report of
simulation.
2.3.3. Copy Process
The copy feature of the editor will be implemented using the clone() method. The concept is to
use Deep Copy. We have already cloned a process that has to be copied and we have the
reference of that process
We need to use the reference of the object to trigger the cloning of all the associated objects. It
will be similar to the creation of a new process but using a different ID.
20
3. Lessons Learned
The Team selected this project with one thing in mind that we wanted to work on
something that was related to java. Also ,because xml is a common interest and we have
never worked on xml before. Ever since we took this project, we were aware that the
project would involve a lot of work in terms of learning how to parse xml back and forth to
the editor. However what we did not anticipate was the time it would take for us to
understand the editor.
Each member of the team has spent all our available time in debugging the code. After we
understood the inheritance, making changes was pretty simple, but at the same time
consuming, as the changes need to be done in many class files.
4. Conclusions and Future Work
The bug removal took longer than we had originally expected. The problem was that the
level of inheritance was so deep that we spent a lot of time only understanding the code.
Due to time constraints, the copy feature of the editor could not be implemented in full,
this was due to the sheer complexity of the project and the fact that when we clone an
object we will need to clone the object and not a reference to that.
21
5. References

http://www.java2s.com/Code/Java/Language-Basics/Demonstrationofcloning.htm

http://forums.java.net/jive/forum.jspa?forumID=74

http://www.java-forums.org/java-tutorials/3180-java-swing.html

http://en.wikipedia.org/wiki/Clone_(Java_method)

http://www.java2s.com/Code/Java/Language-Basics/Demonstrationofcloning.htm

http://xerces.apache.org/xerces-j/

http://xmlwriter.net/user_tools/xerces_java.shtml

http://projects.apache.org/projects/xerces_java_xml_parser.html

http://www.java-tips.org/java-se-tips/java.lang/use-of-clone-method-cloning-objects2.html

http://www.W3.org/TR/xpath/

http://forums.sun.com/forum.jspa?forumID=57

http://java.sun.com/docs/books/tutorial/uiswing/
22
Appendix A: Project Management
Project Management: Work Breakdown Structure
23
Project Management : Gantt Chart
24
Team Information
Team URL: http://dcm.uhcl.edu/caps09g2
Name
Email
Phone
Major
Role
: Vishal Jadhav
: [email protected]
: 281-282-0026
: Computer Science
: Programmer/ Team Leader
Name
Email
Phone
Major
Role
: Doyle Rodrigues
: [email protected]
: 281-282-0026
: Computer Science
: Programmer/ Documentation
Name
Email
Phone
Major
Role
: Pratik Zirpe
: [email protected]
: 281-282-0026
: Computer Science
: Research/ Programmer
Name
Email
Phone
Major
Role
: Shardul Kale
: [email protected]
: 281-461-6320
: Computer Science
: Programmer / Tester
25
Appendix B: Major Tasks and Contributions
Tasks and contributions
Sr No
Tasks
Vishal
Doyle
Pratik
Shardul
1
Website Creation and Maintenance
30%
20%
30%
20%
2
Individual, Mentor and Group Reports
20%
40%
30%
10%
3
Research for suitable editor
20%
20%
30%
30%
4
Loading of Code into editor
10%
20%
40%
30%
5
Generating of JDocs
30%
10%
20%
40%
6
Fixing the Bugs
30%
20%
40%
10%
7
Debuging the code
30%
30%
30%
10%
8
Modifying the Parser for Dynamic Repeat
40%
40%
10%
10%
9
Adding the necessary interface
40%
40%
10%
10%
10
Modifying and adding new classes
30%
30%
20%
20%
11
Modifying the tee file
30%
25%
25%
20%
12
Researching the Time-Based Simulation
20%
20%
40%
20%
13
Analyzing the flow of forms
15%
15%
50%
20%
14
20%
20%
40%
20%
30%
30%
30%
10%
16
Adding and modifying classes to support
the new flow of forms
Changing the existing GUI for time-based
simulation
Research for Clone method
20%
20%
20%
40%
17
Clone for a single Process
20%
20%
30%
30%
18
Documentation
20%
40%
20%
20%
15
26
27