Upload
russell-searle
View
714
Download
5
Tags:
Embed Size (px)
DESCRIPTION
Guided tour of a work flow application built with ChronoForms v4 on Joomla! 1.7. Presentation for Melbourne Joomla! User Group on 25 Jan 2012.
Citation preview
Guided tour of a work flow solution
in Joomla! 1.7 and ChronoForms v4
Russell SearlePrincipal Consultant, Psicom
Melbourne Joomla! User Group
25 Jan 2012
Agenda
• Initial business requirement and preliminary solution• Flying tour of ChronoForms• Building a simple form in ChronoForms• Complete business requirements and solution design• Final HR Leave Application product and code
Initial business requirement
• Provide on-line forms for registered users to enter applications for annual, sick and long service leave• For each type of leave, users can select one or more of a
few payment options• Mail notifications of new leave applications:• Acknowledgement to the applicant• Notify the Payroll Administrator, who will extract and maintain
leave details on an Excel worksheet
Preliminary solution
• Single RSForm! Pro form:• Slick, comprehensive form-mail builder• Easy, fast development• Good enough reporting, through back-end access• Optionally maps to custom database tables
… but …• Could not retrieve/update a record• Could not support a business process work flow
What is a work flow application?
• Process that can be drawn on a flow diagram• Often modelled in BPM tools• Two major features:• State variables• System-produced email messages
• User interfaces:• Email client• Active views• Dashboards
Work flow patterns
• Business process automation• Forums / Discussion• Authoring / publication• Document library / Q&A• Team room• Project collaboration• Wiki• e-Learning• Mail-in databases
ChronoForms v4
• Drag and drop form builder• Wizards for basic and complex forms• Basic set of configurable input elements, plus custom element• Extensive set of configurable form actions• Custom callable events• Pluggable architecture• Extremely customisable and programmable• Best for back-end developers: HTML, PHP, JavaScript, CSS, AJAX• Developed by Max (ChronoMan), supported by Max and Bob Janes
(author of Packt book)
Two types of forms CCK
• “Vertical” data storage• Multiple physical records per logical record• Fixed table and column names, fixed key and indexes
Form builder RSForm! ProTable #__reform_submission_values
SubmissionValueId FormId SubmissionId FieldName FieldValue1 1 1 name Joe Blow2 1 1 email joe@[email protected] 1 1 address1 1 Fred Street4 1 1 address2 5 1 1 suburb Carlton6 1 1 state Vic7 1 1 postcode 30848 1 1 country AU9 1 1 phone 03 5555 1234
Two types of forms CCK
• “Horizontal” data storage• One physical record per logical record• Custom table and column names, custom key and indexes
Form builder ChronoFormsTable #__chronoforms_data_mailusers
name email address1 address2 suburb state postcode country phoneJoe Blow joe@[email protected] 1 Fred Street Carlton Vic 3084 AU 03 5555 1234
Two types of forms CCK
Feature “Vertical” storage “Horizontal” storage
Flexibility Very flexible Rigid structure
Adaptability Highly adaptable Slow to adapt
Extensibility Easy, fast extension Painstaking extension
Efficiency, performance ? OK for small-medium DBs High performance
Scalability Limited, constrained Practically unlimited
Joins and views Hopeless Practically unlimited
Report production Poor reporting support Strong reporting features
Processing complexity Limited to simple apps Highly complex DBs/apps
Data typing Weak typing Strong typing
Building a simple form
Demonstration
Complete business requirementsThe new online leave application process works as follows:•You must log in to the intranet to gain access to online Leave Application facilities.•Begin the leave application process by clicking the Apply for Leave link in any one of:
• The Business Systems module• The Leave Applications - Apply for Leave option in the HR drop-down menu from the top menu bar• The Leave Applications - Apply for Leave option in the blue HR section menu in the left sidebar
•First you will be asked which type of leave you are applying for: Annual, Sick, Long Service or Bereavement leave.•If you are a manager who has the authority to submit leave applications on behalf of your staff, you will also be asked whether you are submitting the leave application for yourself, or on behalf of one of your staff members.•Fill out and submit the Leave Application form. Required values have labels marked with *. There are pop-up calendars for the starting and ending leave dates. Please be sure to enter the correct number of working days off. You must apply for a minimum of one day's leave.•For sick leave applications, please upload a scanned copy of your doctor’s certificate. For bereavement applications, please identify your relationship to your deceased relative.•When you submit the form, three e-mails are sent:
• You receive an acknowledgement e-mail at your registered e-mail address.• The Payroll Administrator will receive a request to check and confirm your available balance of the type of leave you have requested.• The manager who approves your leave applications will receive a copy of your application, for planning purposes.
•When the Payroll Administrator checks your leave balance, another e-mail is sent to the manager who approves your leave applications:• Your manager will be asked to review and approve your leave application. The manager may refuse your application, but if so, he or she must
record a reason.• If your manager is unable to review your leave application for some reason, the Payroll Administrator can review and update your application on
behalf of your manager.•When your manager reviews and updates your leave application, two more e-mails are sent:
• You receive an e-mail advising the manager's decision. If your leave application is refused, please discuss the matter with your manager.• If your application is for Long Service leave, the Managing Director will also receive a copy of your manager's decision on your leave application.• The e-mail to you is also copied to the Payroll Administrator, for management purposes.
Final solution design
• Actors• Applicant• Approver• Delegate• PayrollAdmin• ManagingDirector
• Entities = Tables• LeaveDefinition• LeaveRule• LeaveApplication
• Relations• LeaveApplication -> LeaveDefinition• LeaveApplication -> LeaveRule
• Major Attributes• LeaveDefinition
• name, value, description• LeaveRule
• rule, factors x 4, results x 2• LeaveApplication
• applicantType• leaveType
• leaveOption
• stage• checkBalance• approved• All actors• etc …
Final solution design
Leave Application Forms List
Stage Process Seq Name Type Use Case Next Seq
Control 1 LeaveDefinition Form Defines entity-level parameters for Leave Application forms 2, 3
2 LeaveDefinitionList View List Leave Definitions for add or update 3
Control 3 LeaveRule Form Defines combination rules to populate LeaveApplication forms 4, 5
4 LeaveRuleList View List Leave Rules for add or update 5
Apply 5 LeaveApplicationMaster Switch Present Approver options or Applicant Leave Type option 6 or 7
6 LeaveApproverOptions Form Approver chooses Leave Type and either LeaveApplicationSelf or LeaveApplicationProxy 8 or 9
7 LeaveApplicantOptions Form Applicant chooses Leave Type 9
9 LeaveApplicationSelf Form Leave Application for Self 10
8 LeaveApplicationProxy Form Leave Application for Employee 10
CheckBalance 10 LeaveCheckBalance Form Payroll Administrator approves available Leave Balance 11, 12
11 LeaveCheckBalanceList View Payroll Administrator reviews and updates all Leave Applications awaiting Leave Balance approval 12
ApproveLeave 12 LeaveApproval Form Approver approves Leave Application 13, 14
13 LeaveApprovalList View Approver reviews and updates all Applications awaiting his/her Leave approval 14
Control 14 LeaveApplicationAll Form Payroll Administrator updates any Leave Application 15
15 LeaveList View Payroll Administrator reviews and updates all Leave Applications end
Final HR Leave Application product
Demonstration
References
• ChronoForms product site:• http://www.chronoengine.com/
• Bob Janes’ support site:• http://greyhead.net/
• Bob Janes’ ChronoForms 3.1 Cookbook:• http://www.packtpub.com/chronoforms-31-joomla-site-cookbook/book
• MooTools:• http://mootools.net/
• FormCheck class:• http://mootools.floor.ch/docs/formcheck/files/formcheck-js.html