Home
ORD User Manual
Contents
1. 2009 2015 OpenRules Inc Such update events carry the names of the proper questions For example in the above table updateRules the condition C5 validates if the user selected a value from the combo box CASH1 and the proper update event CASH 1 was actually generated by ORD If yes then this particular update logic will reset all children questions of the question CASH to their defaults as described in the action A11 Linking Combo Boxes The updating rules allow you to link several combo boxes in such a way that when a user makes a selection in one combo box the choices in other combo boxes may be modified For examples let s define two questions Q35 Car Make BMW Lexus Acura and Q36 Car Model 5 Series X3 X5 GS 350 RL TL Each question is a combo box but when a user selects BMW for the first question we want to display only BMW s models as possible choice for the second question Here is one possible way to do it First we will add different car makes to the list of possible questions used to define Q35 Data PossibleAnswers possibleAnswers Data Answers answers PID Question Id Default Answer Possible Answers Employed Q21 11371 Unemployed Q31 MA Full Time Student Retired gender employmentT ypes Employed employmentTypes Female 035 CarMakes Yes yesno F BMW Car Makes BMW __ Lexus Both questions Q35 and Q36 will belong to Page3
2. Can somebody claim your question5 spouse on RadioButton their return Range 1000 Copyright 2009 2015 OpenRules Inc You may use any string as a question ID as long as all question IDs are unique There are no limits for question names but you should keep in mind that long names could affect automatically adjusted question section layouts The column Size allows you to change the size number of displayed characters in a TextBox s input field The default size 1s 20 The validation criteria are described below There are no limits to the number of questions and usually all questions for all sections are defined in the table with the name questions If there are too many questions you may split them in separate tables that look like this one but have different names for example questions1 and questions2 Then you have to add another table with the name questions that will invoke these two tables Method void questions Section section String questionld questions1 section questionld questions2 section questionld Question Types The current version of OpenRules Dialog supports the following question types Question Type Comment Example TextBox A regular question with a label name and an input field of a certain size Similar to TextBox but the ld Password entered text would be display as stars Jevveees Similar to the TextBox but the input field is automatically calcul
3. URL address ERROR SSN should have a format 999 99 9999 90 Copyright 2009 2015 OpenRules Inc Validates that the answer has a ERROR invalid credit card ee valid CREDIT Card Format number Validates if the answer matches the REGEX lt pattern gt regular expression defined by ERROR lt answer gt doesn t regular expression pattern e g match the pattern lt pattern gt SSN corresponds to the regular expression 0 9 3 0 9 2 10 9 145 Validates if the answer is a valid ERROR favalid user ID USERID user ID by calling a custom method validateUserl D Validates if the answer is a valid ERROR invalid password PASSWORD password by calling a custom method validatePassword More validation criteria could be added without programming see the file DialogForms xls Another way to validate user input is to add special conditions directly in the table navigateRules see an example in the Dialog1040EZ project Parent Child Relationships among Questions Some dialogs are hierarchical by nature when some questions should be shown only when their parent questions are shown and or have certain answers If you hide a parent question then all its children and all their descendants if any should also be hidden For example consider the following dialog Both Domestic X Greater than 530 000 Other eee Development income Both X It was created using the following table question
4. and use the product It also includes specific examples of different web based questionnaires MAIN CONCEPTS OpenRules Dialog ORD uses the following concepts to represent different business questionnaires as web applications Instead of forcing a questionnaire designer to learn different web development techniques ORD introduces the following basic concepts Dialog Pages Sections Questions Answers default and possible Automatically calculated responses Navigation rules Update rules All these concepts could be presented in one or several Excel files in simple tables with predefined structures Along with a predefined rich set of question types a user can easily extend the ORD functionality by adding custom question types and dialog actions Dialog When a user starts a web session to fill out a questionnaire there is always one instance of the object dialog that represents the current state of the interaction with a user The Dialog 30 Copyright 2009 2015 OpenRules Inc object always knows what page a user is currently accessing and what last action has been executed by a user e g clicked on the Next button selected Yes for a certain Yes No questions click on a certain hyperlink etc This information is used by the navigation and update rules defined in the ORD to refresh page content based on the latest answers or to hide show some sections questions calculated automatic
5. are defined in the file openrules forms lib css lib css but can be overwritten by project specific style sheets such as DialogCreditCard war css project css Customization and Integration Developer Notes You may essentially customize your application by changing only layout tables in the file Main xls You also may create your own version of the library openrules forms lib and completely change the look amp feel of the generated questionnaire web application You may integrate your questionnaire with any 3 4 party Java package by adding the proper import statements to the Environment table in Main xls If you want to use your own Java object inside your custom rules you may add these objects to the instance of the class Dialog that is inherited from the standard Java HashMap For example in the file index jsp you may create your own object customer and add it to the dialog as follows dialog put customer customer Then inside your Excel rules you can always gain access to this object by using an instance qd of the Dialog Customer customer Customer d get customer 310 Copyright 2009 2015 OpenRules Inc This mechanism gives you complete control over the integration of the Excel based questionnaire with your Java application If necessary ORD allows you to bring the entire power of OpenRules Forms see http openrules com docs man_forms html The project DialogType3 provi
6. responses etc As a questionnaire developer you rarely have to deal with the object dialog directly but it is effectively used by the ORD templates that specify the interaction logic Pages ORD considers any questionnaire as a sequence of web pages through which a user can navigate using actions Next and Prev usually presented as push buttons or any other application specific mechanism such as a menu Here is an example of the Excel table pages Rules pages extends pages Template Page 3 Page Title 3 Yes Page Titea section As you may guess this questionnaire consists of 4 pages Page 1 consists of 4 sections and section12 is allocated on the right of section11 while section13 goes under the section11 section14 goes under section13 etc Each page may have or may not have a title that will be shown on the top of the page You may use any string as a page ID as long as all page IDs are unique The order of pages in this table reflects the natural navigation order through them assuming that every page has navigation buttons Next and Prev When the order of pages depends on the entered answers or other factors these special cases can be described in special navigation rules see below Note The very first column is usually used for decorative purposes only it may contain a page order number that has no particular meaning or it may be left empty However you cannot remove this column or
7. sent to Check all that Sel apply Sea M What is the expected monthy dollar amount of outgoing international wires Select What s the purpose of outgome imternatsonal wires Check all that apply on YE What zs the expected monthly amounth of outgoing domestic wires 1 501 2500 What is the purpose of outgoing domestic wires Check all that apply 2 501 4 500 secify Other 4 501 7 500 z s 7 501 15 000 Greater than 15 000 Save Account Reset Account The complete sample application DialogType4 is included in the standard ORD installation see the folder openrules dialog 270 Copyright 2009 2015 OpenRules Inc CREATING YOUR OWN QUESTIONNAIRE To create your own questionnaire using the Eclipse IDE follow these steps 1 2 3 A 5 6 7 Copy and paste any template project DialogType lt X gt under your own name say DialogMy In the file buz d properties replace deploy name DialogType lt X gt to deploy name DialogMy In the file run htm replace DialogType lt X gt with DialogMy in the proper URL address Also you may adjust the title of your application in this simple html launcher If you acquired a commercial ORD license enter it as a parameter license lt your license code gt instead of license eval Double click to deploy bat to deploy your application on the Tomcat It should create the subdirector
8. OPEN All FOA MA A IL Oh OpenRu es Dialog Developing Web based Questionnaires with OpenRules User Manual ORD is a software product that allows business analysts to develop and maintain web based dialogs questionnaires with complex interaction logic This tutorial describes main product concepts and components and provides concrete examples of web based dialogs OpenRules Inc May 2015 Copyright 2009 2015 OpenRules Inc Table of Contents DTA Onee D ea nt nr es Gov EREE T RRE E E E 3 D aloa a A E AA E A EE EAE A EAA AA 3 BN e OEE E E ANE EE E E PA EAE N EAE EEA E A 4 MONS ETPA wt gar A ET E E PEPATE IE AAEE PET A E 5 Oee O ea E E E 5 Oreo T PE a E E A E EEE 6 put validat Oi essan E AEE a ER REE E A AEE EEEE 9 Parent Child Relationships among Questions cccccseccseccsscessceescceesecsseesseeseeesseuseeeses 10 Question Properties ssessessessesseesesseeseesersseseesseseeseoseosseseessesstssessrssesstssesessesseeseesesseeseesees 11 Answers to Multi choice Questions seeseeseeseeseeseessessessessessessrssrssessensensensensessesserseeseeseesees 11 Default and Possible ANSWersS seessssseeesssseeresssseresssseeresssseresssseresssseceesssseresssseceessseeresssses 11 Defining Combo boxes through Arrays ccccccscccscccssccusceuccsuccsuscsuccsucesucsaussaussaessacesaussas 12 Automatically Calculated Responses ccccccccceecceeccceseeesecusecuseeusecusecu
9. and are defined as a ComboBox However to make sure that Page3 will be updated every time a user makes a selection inside the Q835 combo box this question should be defined as ComboBoxSubmit To define the dynamic content of the question Q36 Car Model we will define 3 arrays of possible models for BMW Lexus and Acura Method String getAcuraModels Method String Method String getBMWModels getLexusModels return ArrayString getValues AcuraModels return ArrayString getValues return ArrayString getValues BMW Models LexusModels OPEN RULES 170 Copyright 2009 2015 OpenRules Inc DElteWalse Wacvialale Data ArrayString Data ArrayString BMW Models LexusModels AcuraModels ES 350 es Oo S5 To link these arrays to question Q36 to generate different answers for question Q35 we expand table UpdateRules as follows Rules updateRules extends updateDialogTemplate Current Page Stata coe tis Renta ee ae Cot Male T en aae e f Rees e o afere ie e B sk a fon Another action A7 was used in the last three rules that say exactly what we need e g IF Answer to Question Q35 1s lt BM W gt THEN Limit Answers to Question Q36 to Array lt getBMWModels gt See the sample project DialogType0 for the actual implementation Similarly we can connect more combo boxes More sophisticated ways to define complex inter question relationships are under development and wil
10. articular in the DialogType4 there is one main page that represents a list of customer s accounts When a user selects an account its content is being downloaded and based on the account type different contents of the page will be displayed This sample demonstrates how to Load Save the selected data 26 Copyright 2009 2015 OpenRules Inc Refresh the main page without necessity to create a separate page in the standard ORD table pages Hide Show Reset different questions based on the user answers to the parent questions Handle user specific update events ah OpenKules based Example of Dynamically Modified Web Dialog Customer OpenRules Summary of Accounts Select Account Account Name Comments 00012 Business Checking 3 more questions remains O 00014 Business Saving to be ined Selected Account 00012 Business Checking CASH ACTIVITY MONETARY INSTRUMENTS WIRE TRANSFERS What type of wire transfers do you anticipate in this account Boh v What type of wires do vou anticipate receiving in this account Domestice What ts the expected monthly dollar amount of incoming domestic wires Greater than 530 000 v What is the source of incoming domestic wires Check all that apply Other Specify Other Development income What type of wires do you anticipate sending from this account Both a Which country s will outgoing mtemational wires be
11. as in the following view 2 29 2004 DialogType3 new question on top of the page This is a different type of dialog the layout was proposed by Ronnie Barkan While supporting the same capabilities as the DialogType2 template this dialog allows a user o To enter one question at a time This new question is always shown on the top of the current page o To show already answered questions at the bottom of the page starting with the last answered question Additionally DialogType3 demonstrates how To assign properties such as Country to different questions and to ask only questions with certain properties 25 Copyright 2009 2015 OpenRules Inc To generate a results page that displays all answered questions and possibly gives additional information associated with those questions properties Here are typical views DialogType3 Aswreces 14 ont of pondi 15 quartic Next gen DialogT ype3 Page 1 Question6 Yes C No Aawrers 14 cut of poasinie 15 qoentton aw Answered Questions if omments Comments for Page 1 Question 1 mei Page Quentin ver fom e aMi n Page 1 Question eo 25 Employment Type ComboBoxSubmit Employed ae ee ae _ __ DialogType4 dynamically changed dialog with parent child relationships This type of dialogs consists of a single highly dynamic page that may constantly modify its content based on the user selections In p
12. ated G TOTAL a sum of lines E and F vs000 SS and cannot be changed indicated by a slightly different background ReadOnly Azure TextArea Similar to the TextBox but the input field may consist of several lines 60 Copyright 2009 2015 OpenRules Inc Question Type Comment Example Label with input that allows selection from ComboBox possible answers ComboBox The same as a regular ComboBox but refreshes Submit th lecti SEAE oper eee oe pee Selection of Yes may show a hidden information for an additional card You may specify the question s domain as 1 Yes 0 No Then the combo box will look like above but when a user selects Yes the actual Similar to ComboBox but ComboBox allows you to define Domain different display and actual p ay answer is 1 When a user selects No the actual choices answer is 0 Allows the selection of one or more multiple alternatives Each alternative should be defined by a separate check CheckButton alon The question s name is used as the check button text The question s ID is used as a part of the name of the proper action e g Check Aviation or Uncheck Aviation Allows the selection of one RadioButton choice from among multiple alternatives RadioButton The same as a regular Vertical RadioButton but places the choices vertically 70 Copyright 2009 2015 OpenRules Inc Question T
13. d return ArrayOfStrings d get id is used within above table questions to define possible answers for combo boxes Automatically Calculated Responses Answers to some questions could be automatically calculated based on the answers to other questions and possible other information for example data coming from a database The rules for such auto responses should be placed in the table autoResponses that may look like this one EN RULES 130 Copyright 2009 2015 OpenRules Inc Rules autoResponses extends autoResponses Template Question Id Auto Response double wages d getDoubleAnswer Wages double taxablelnterest d getDoubleAnswer Taxablelnterest double unemploymentCompensation d getDoubleAnswer UnemploymentCompensation double answer wages taxablelnterest unemploymentCompensation AdjustedGrossIncome format answer A double wages d getDoubleAnswer Wages format wages 250 cisformat 750 s sSsSSa i double a d getDoubleAnswer A out A a double b d getDoubleAnswer B out B b format Math max a b double answer 4750 Question marriedFillingJointly d getQuestion MarriedFillingJointly if marriedFillingJointly isAnswerTrue answer 9500 format answer Navigation Rules ORD provides a built in support for navigation between pages The order of pages in the table pages reflects the
14. d file Dia logRules x s Hide Show Pages Sections Questions The updating rules allow you to effectively implement hide show features on any level page section or question The standard Dialog object d supports the following methods e hidePage String pageID e showPage String pageID e hideSection String sectionID e showSection String sectionID e hideQuestion String questionID e showQuestion String questionID You may invoke these methods as a code in the column Execute Code or use more convenient columns Hide Show Page Hide Show Section and Hide Show Question Naturally when you invoke the method hidePage it hides all sections in this page When you invoke the method hideSection it hides all questions inside this section Conversely when you call showSection it shows all questions from this section unless some of them were specifically hidden earlier 150 Copyright 2009 2015 OpenRules Inc You may also use this table to respond to a question X with an answer Y set the dialog status and much more see the template updateDialogTemplate in the file dialogRules xls Note For efficiency reasons the hidden pages sections or questions are not analyzed during the page refresh that occurs during a user session whenever ORD delivers a new page or updates the current one Hide Show Reset Children Questions When you hide a question all its ch
15. des a good example of how to do it 32
16. fined signature but the actual implementation depends on the way you want to keep you user identification information For example in the template project Dialog Type2 EN RULES 20 Copyright 2009 2015 OpenRules Inc we use the following implementation placed in the file Main xls First we define the datatype DialogUser Datatype DialogUser String password Then we create the table users that contains different pairs UserID and Password Data DialogUser users UserID Password Our validation methods should try to find the answers to the questions ID and Password in the array users To find out if a user with a certain ID is located in the array users we created a simple method Method DialogUser findDialogUser String id for int i 0 i lt users length i if users i id equals id return usersf i return null Now we can implement the method validateUserID as follows Method String validateUserlD Question question Dialog d question dialog string msg if disAction Init return msq DialogUser user findDialogUser question answer if user null d addError msg ERROR Invalid User ID return msg If there are no users whose ID corresponds to an answer to the question ID this method will add the proper error to the Dialog and this error will be displayed during Login OPEN RULES 010 Cop
17. ht 2009 2015 OpenRules Inc Question Type Comment Example Displays a text defined as Message the question name Creates an empty question that can be used as a cell filler Empty This question can be defined by a customer using the rules table Custom This custom hyperlink generates and displays a customQuestions PDF document base on the answered questions Input Validation You may associate a validation criterion with any TextBox see for example SSN and Range 1000 100000000 in the above table questions ORD will compare the entered answer with the question s validation criterion and if it is violated ORD will place an error message in red right below the invalid answer Here is the list of currently supported validation criteria Validation Criterion RANGE lt from gt lt to gt Comment Validates that the answer to the question is an integer or real number that should be within the interval from to Validates that the answer is a valid date for the current locale e g 20 5 2009 is invalid for the US locale Validates that the answer is a valid email address Validates that the answer is a valid URL address Validates that the answer has a valid Social Security Number format Example of the Error Message ERROR The answer should be within 1 and 100 ERROR invalid date format for the current locale ERROR invalid email address ERROR invalid
18. ildren and grand children also will be hidden The following updateRules table shows different conditions and actions available to you to express your own business logic for hiding showing or resetting questions and its descendants Rules updateRulesForPageAccounts3 extends updateDialogT emplate CS _ as upd j Ka Answer to Is or Question IsNot eash casi e Outgoing Hiding and resetting actions work recursively for all children and grandchildren questions For example the action Hide CASH1 1 in the column A1 will hide the questions CASH1 1 and all its descendants The actions Hide CASH1 in the column A6 will hide all children of the question CASH1 but not the question itself The actions in the columns A10 allow you to reset default answers to a question and all its children for A10 but the actions in the column A11 reset only the children descendants of the question You may see various examples of such rules in the standard sample project DialogType4 Handling Update Events During an interaction with a user your application may catch certain update events initiated by an end user The updating rules allow you to validate if some questions were answered during the latest interaction cycle by selecting values from a combo box or by clicking on a radio button The following questions produce update events ActionButton ComboBoxCommit RadioButtonCommit YesNoSubmit 160 Copyright
19. ion software developed by Big Faceless Organization BFO see http big faceless org An evaluation version of the BFO software is included However for production implementations you will need a commercial copy of the BFO software that could be purchased directly from BFO or from OpenRules Authorized Access to Questionnaires Usually an authorized access is provided through Login Logout functionality Here is an example of a Login screen 190 Copyright 2009 2015 OpenRules Inc DialogType2 Welcome to ORD Login Id Robinson Password e TTT ERROR Invalid password Restore previous dialog session Yes ft No Login Openkules This screen can be easily implemented as the very first page of your questionnaire with one section Login Password New OlDialog Login a Password Password Password PASSWORD o gin Yatton a E store previous dialog session RadioButton S There are two special validation criteria USERID and PASSWORD that are associated with two custom user defined validation methods These methods should be specified in a separate rules table custom Validate in the file Main xls Rules customValidate extends validateAnswerTemplate IF AND THEN Validation Pattern Answer Defined Validation Result password valdatePasswordla Jno oaei Here we used two validation methods validateUserID and validatePassword These methods have a prede
20. l be provided in the next ORD releases Custom Questions and Actions Along with predefined question and action types you may create your own questions actions using type Custom To do this you have to define the proper layout in the table custom Questions similar to the following Excel tables EN RULES 189 Copyright 2009 2015 OpenRules Inc Rules customQuestions extends customQuestionT emplate Question Id Custom Question Layout GeneratePDF layoutGeneratePDF q dialog Layout TableLayout layoutGeneratePDF Dialog d lt a href makePDFHref d target _blank gt Click here to Preview and or Print Your Tax Return using Adobe Acrobat lt a gt This layout invokes a separately described Excel table makePDFHref that actually maps the answered questions to the proper PDF form Your layout may execute your own methods such as any java method Generating PDF Documents OpenRules Dialog includes a special module pdfgen that allows you to generate PDF documents based on your filled out questionnaire You may look at the sample project Dialog1040EZ that explains how to generate a pdf document This example is based on the well known US tax form 1040EZ The application takes the standard 1040EZ pdf form publicly available from the IRS web site and fills it in after an interactive session with a taxpayer The detailed tutorial Dialog100EZ can be found here The pdfgen module uses 3rd party PDF generat
21. merge cells inside it 40 Copyright 2009 2015 OpenRules Inc Sections The previous table pages defines a relative layout for sections inside every page The sections themselves are defined in the Excel table sections and may look as follows Rules sections extends questions I emplate Section Question Question Question Name Column 1 Column 2 Column 3 ra section11 wes Favestons wes As you can guess this table defines all sections and their content questions For example the section11 consists of 4 questions Question2 will be placed on the right of the question1 question3 on the right of the question2 and question4 goes under the question1 Each section may have or have not a title that will be shown on the top of the section You may use any string as a section ID as long as all section IDs are unique The column is similar to the one for pages and can contain any information or be empty Questions The previous table sections defines a relative layout for questions inside every section The questions themselves are defined in the Excel table questions and may look like the following one Rules questions extends questions Template Question Question Question a ee question Firstname TextBox 18 o o Middle initial TextBox 2 o question3 Lastname TextBox 20 o su Spouse s question4 social security TextBox number
22. n on top of the page ccccccccceccceccceesceceeceeceeceeseeseeuseeseeees 25 DialogType4 dynamically changed dialog with parent child relationships 46 26 Creating Your Own Questionnaire seiscosssisiorrsre is derrr ners OASTE EEEE E 28 Technical Inforial lOi orereta ere EE EEEE EEE EEE EEIN REEE ANTEA EEEE EE TEE 29 Installation and Conii oural ON eae eee eennneee meee on eee nn ome nee is Nene rt me en eer 29 Supporting Rule Templates and FormS cc cc cccccccccceecceeccecceecceuceeuceuceeuceusseucsenceeueseneeanes 31 Customization and Integration Developer Notes cccccccccccceecceecceecsensceeseesssessseeseeeeees ol 20 Copyright 2009 2015 OpenRules Inc OPENRULES DIALOG How to Build Web based Questionnaires OpenRules Dialog ORD is a software product built on top of the open source Business Rules Management System OpenRules It allows non technical people to develop and maintain web based questionnaires dialogs using only Excel and without any necessity to learn different web programming techniques A questionnaire is a web application that can be described in terms of pages sections and different types of questions Layouts of pages sections questions and complex relationships between them can be expressed in a very natural way using simple and intuitive Excel tables This document describes the main concepts and provides concrete instructions that help you to install
23. natural navigation order assuming that every page has navigation buttons Next and Prev When the order of pages depends on the entered answers or other factors these special cases can be described in special navigation rules table navigationRules that may look like the tables below Rules sail extends nn C1 At IF S THEN Current Page is i nswer to Go to Page Tapay rcengra Next MarriedFillingJointly IsNot Yes IncomeData Information ai TaxpayerGeneral IncomeData Prev MarriedFillingJointly IsNot namaen RULES aO Copyright 2009 2015 OpenRules Inc You may create different navigation conditions and actions from the template navigateDialogTemplate described in the configuration file DialogRules xIs Update Rules ORD allows a questionnaire designer to define special conditions and execute the proper actions when the content of certain pages is updated by a user For example the update rules define conditions when some pages sections or questions should be hidden or shown The updating logic can be defined in the decision table updateRules that may look like this one Rules updateRules extends updateDialogl emplate C1 C2 C3 IF AND Current Page is Action is Answer to Is or Val Question IsNot al a ee ee pea me aw em S p fest et rete race ones Fee idem he idee secs This decision table is created based on a template updateDialogTemplate defined in the standar
24. nother way to define possible answers for combo boxes Possible answers may be defined in Data array using predefined Data types such as ArrayString see http openrules com docs man_data html Predefined Datatypes Data ArrayString LOBs value PO 120 Copyright 2009 2015 OpenRules Inc You may have many arrays like this one and they can be used as possible answers for some combo boxes in the following way Rules questions extends questions Template O U a es ee ee m l Q1 LOB ComboBox NO EMPTY getArray d LOBs NO EMPTY getArray d nOutNetworks ComboBox NO EMPTY getArray d SericeLocations INO EMPTY getArray d Services Here the table questions uses an optional column A3 from the template questionsTemplate It requires that the cells in this column have the standard OpenRules type ArrayOfStrings You may convert arrays like LOBs to the type ArrayOfStrings using the method getArrayOfStrings defined in the Dialog xls Then for efficiency reason and for better expressiveness you may add them one table with unique names Rules void createArraysOfAnswers Dialog d ArrayO Strings array ary af Sings getArrayO trings LOBs InOutNetworks getArrayOfstrings inOQutNetworks GSeniceLocations _ getArrayOfStrings semiceLocations eae getArayOtstrngs sernices The method Method ArrayOfStrings getArray Dialog d String i
25. ot have to answer all the questions during one session The user may stop at any point and all entered information may be saved The user may start a new session after s he obtains more data and is ready to enter it In the Login screen on the picture above we used the question Restore previous dialog session Ifa user selects Yes as an answer to this question the last saved state of this questionnaire if any will be restored and all already answered questions will have previously defined answers Otherwise a user will start filling in the questionnaire from scratch How might this functionality be implemented In the template project DialogType2 we defined a reaction to the answer Yes for this question in the table navigateRules as a special action loadDialog d d getAnswer ID The method JoadDialog as well as its counterpart storeDialog is defined in the file Main xls in the following way OPEN RULES 22 Copyright 2009 2015 OpenRules Inc Method String loadDialog Dialog d String id string filename work id answers if d_load flename null d_setStatus ERROR Unable to load dialog from filename d addError I else d setStatus Dialog has been reloaded from filename return filename It loads answers to all questions as they were stored in the file Robinson answers where Robinson is the entered user s ID This file is loca
26. ream outStream loadFromXML InputStream outStream store OutoutStream outStream load InoputStream outStream In particular storing the questionnaire answers in an XML file may simplify its interaction with other applications DIALOG TEMPLATES ORD comes with a set of template projects that allow a user to build different types of questionnaires These templates have been created by OpenRules and or contributed by customers Below we describe the currently available templates with their sample views DialogType0 simple dialog with two navigation buttons This template includes all types of questions and two buttons Next and Prev that allow you to navigate throw pages Here is a typical view DialogType0 11371 info openrules com 02 29 2009 Ge fr We decreas Be es 4 Ges TEES Somaya ah A AR iTV alic L z te ToTrmMat tOr Whe CuTrenc c Ve ale 432 993 3131 DialogTypel adds Login Logout and Save Load facilities DialogTypel demonstrates how to implement an authorized access with Login Logout functionality A user may Save the current state of the interaction and later Restore this state during Login with the saved answers Here is a typical view 24 Copyright 2009 2015 OpenRules Inc DialogTypel IPO rive Tarral E Bs Ba eee AROR f Ty slic password osese O e ea DialogType2 adds a menu In addition to the DialogType1 features the DialogType2 demonstrates how to create a menu
27. s with a column A5 specifying parents for some questions e g the question WIRE is a parent for the questions WIRE1 1 100 Copyright 2009 2015 OpenRules Inc Rules questions extends questions Template a S a IEI ea vnat type of wwe iransters Co you anticipate in wet T sacon O T aoas pe of wires do you anticipate z wee fie receiving in this account sibs o Me VINES S ne expecieg mon cover amoun y WIRE 1 1 2 of incoming international wires Combobox WIRET 1 ai S ihe source of nconmg miematona WRES wires Check all that apply TDR TER ERI WRELAS1 Specity Other Texteox ves waen Vvnal is ihe expected mon colar amoun i WRENS of incoming domestic wires ComboBox EEN By default when you hide a question all its descendants will be also hidden You may define your own logic for hiding showing or resetting questions and its children using different actions in the standard table updateRules as described below Question Properties You may associate with each question certain properties by adding additional columns to the table questions For example in the sample project DialogType3 we added properties Country Category and Comments to the table questions Aules questions extends questions Template Questionid Question Name Question Type Siz Hidde Yalidation Country Category Comments PI ers Te
28. seeuseenseeeecesseeeseeeeees 13 DN 01 he A stort chal nwa paca ndagete staat iia riia e aA ara reiia 14 MS ceca te teeta pecs A E ENAA AEE E eb AAEE cine EEEE EEA 15 Hide Show Pages Sections Questions sessessessessesseeseeseesecssossossessessrnsessensessessesseeseesees 15 Hide Show Reset Children Questions cccccccscccssscseccseccseccseccsucesusssussacssaesacesacesacesauesas 16 Handling Update VSS teats ainacecdtaiyatnssanmacisadnouiessanvaniesi dninaliesaanivadhenduiniesaninaibeidcentestenmedsandath 16 Linking Combo Box Same eee eee eee een en E ey re 17 Custom Questions and ActiONS cccccccccccscccescceeccsecceecceccuceeuceeuceuceeuceeusseuseeuseeusseessueeseeeeees 18 CTC ee FDF DOme ag ces sae eter coc trance caren tae rca et tans aera iden inane 19 Authorized Access to Questionnaires siiaiccctersincsanteccertosneresburversvswvessiwsaietensiaesaniwenceritaareians 19 Copyright 2009 2015 OpenRules Inc Saving and Restoring Dialog Stave S dic iciecscceradescecinstaeatvedtdeieiaaetaaeandesareiwtaaddarieiobeiveviawerndeswaein 22 Dooe Ten tc ea A none een a meee neem on ener N meant Tee A enna many ere nen 24 DialogType0 simple dialog with two navigation buttons ccecccccceccceecceecceseeeseenseeeseeeees 24 DialogTypel adds Login Logout and Save Load facilities 0 0 eccceeceesceesceeseeeseeeseeees 24 Dialog Type2 Sag escent a aie ansehen ais ea vette a areata EEO SENi 25 DialogType3 new questio
29. st Excel and Windows Explorer ORD is based on the OpenRules BRMS starting with the version 5 3 2 To install ORD first make sure that you have OpenRules 5 3 2 or higher installed and the following configuration projects are in place openrules config openrules forms lib pdfgen optinal 29 Copyright 2009 2015 OpenRules Inc You also should install any Java based web application server We will assume that you have already installed a free Apache Tomcat server see configuration details at http www openrules com docs man_config html The ORD can be downloaded from http www openrules com ORD htm After downloading the file ORD zip unzip it in the same folder where you already have the main OpenRules configuration project openrules config You will see a set of ORD projects DialogTypeO a simple dialog with Next Prev navigation buttons DialogTypel a dialog of the type 0 with a special Login page and an ability to store reload the dialog DialogType2 a dialog of the type 1 with a menu instead of Next Prev buttons DialogType3 a dialog with long pages that always displays the next question to ask on the top of the page DialogType4 a dialog with one highly dynamic page DialogCreditCard a simple credit card application Dialog1040EZ a real application that allows a user to fill in US tax form 1040EZ and generate a 1040EZ PDF document You may import these projects in your Eclipse
30. te ERI e e Password Password Password PASSWORD log n Logn actionButon J o Tooo e e e NewOldDialog Restore previous dialog session RadioButton ft SE EE eC eo o oo ae For ST 1 Comments for Page 1 Comments for Page 1 Fage 1 Question 3 Yesho US FR Question 3 Now we may display only questions that correspond to certain countries and categories and produce additional comments when we receive answers to certain questions See the project DialogType3 for more details Answers to Multi choice Questions You may define possible answers for multi choice questions using combo boxes Default and Possible Answers You may define the default and possible answers for some or all questions using an Excel table similar to this one 119 Copyright 2009 2015 OpenRules Inc Data Answers answers Question Id Default Answer Possible Answers YourFirstName YourMiddletnitial a Se YourLastName Smith _AddressLinet 25Maple Street Z O S AddressLine2 O CA SFC ZipCode es 0884o S S O YourSSN_ _ 16486 22988 S O MarriedFillingJointly Here the possible answers USstates and yesno refer to the custom Excel Data table possibleAnswers Data PossibleAnswers possibleAnswers id choices pw Answers EE yes gender ee ee ee Yes No USstates AL AK ae Defining Combo boxes through Arrays There is a
31. ted in the subdirectory work of the basedir directory of the web server on which the web application was deployed In particular it can be found in the Tomcat s webapps work subdirectory To store the current state of the questionnaire a user may select an action such as Save that is defined as a hyperlink Save in the template project DialogType2 DialogType2 Menu Page 4 Page2 Radio Buttons s 3 RadioButton Yes C No RadioButtonSubmit C Yes No Yes C No Save t Wes Show Check Buttons RadioButton V erticalSubmit ie ae No Paget RadioButtonV ertical A reaction to the action Save is defined in the table navigateRules as a special action storeDialog d d getAnswer ID The method storeDia og is defined in the file Main xls as the following Method String storeDialog Dialog d String id string filename _ work id answers if d_store filename null d setStatus ERROR Unable to store dialog at filename d addError i else d setStatus Dialog has been stored at filename return filename 230 Copyright 2009 2015 OpenRules Inc A user may use different names for the methods or completely change the way a dialog is being stored and loaded The standard class Dialog provides the following convenience methods that give a user some flexibility store String fileName load String fileName storeToXML OutputSt
32. tes such as a hide show question a hide show section a response to a question X with an answer Y etc If you do not have special update rules you may omit this rules table e customQuestions optional this table defines application specific layouts for custom questions 8 You may customize the layout of your application by making changes in the file DialogMy war rules Main xls You should put your own information into the following tables 1 Environment this table should always be in place It describes the default structure of your rules project You may modify this table only if you want to add your own Excel tables or Java classes read more at http www openrules com docs man_api html Integration with Java and XML 2 mainLayout this table define the default main layout of your application with buttons Next and Prev You may customize it to your own needs see for example the sample projects DialogCreditCard and Dialog1040EZ You may rename the file Main xls and Rules xls but in that case please make a corresponding change to the file zndex jsp You may move some tables from this file to other Excel files just make sure that you properly modify the Environment table TECHNICAL INFORMATION Installation and Configuration The current OpenRules Dialog ORD distribution is oriented to be used with Eclipse or a similar IDE but it can also be used as a stand alone system with ju
33. workspace or in your stand alone OpenRules installation directory just make sure that all these projects are at the same level as openrules config Installation Steps Step 1 Deploy openrules forms lib at the Tomcat by double clicking on openrules forms lib deploy bat Step 2 Deploy other sample projects at least DailogType0 at the Tomcat by double clicking on file deploy bat Step 3 optional If you plan to generate PDF documents deploy the project pdfgen at the Tomcat by double clicking on pdfgen deploy bat Step 4 To check that installation was successful start your Tomcat and double click on the file run htm for a selected sample project You should be able to run your ORD based web questionnaire Any installation or configuration issues Contact support openrules com 30 Copyright 2009 2015 OpenRules Inc Supporting Rule Templates and Forms The basic ORD concepts such as Dialog Page Section Question and Answer are defined as Java classes inside the standard OpenRules package com openrules forms gui jsp Thus they are automatically included in the standard OpenRules release since 5 3 2 All standard forms layouts and rule templates are defined in the Excel files supplied with the standard OpenRules project openrules forms Iib Dialog xls DialogMain xls DialogForms xls DialogRules xls Validators xls Appropriate style sheets
34. y DialogMy in the webapps directory of your Tomcat Make sure that Tomcat is up and running Double click to DialogMy run htm and make sure that your DialogMy works as DialogCreditCard used to work Your project directory DialogMy war rules contains two files 1 Main xls describes the structure of your project and its look and feel 2 Rules xls describes the content and interaction logic of your questionnaire Start making changes in the file Rules xls You should put your own information into the following tables e pages a list of all your pages e sections a list of all your sections e questions a list of all your questions e answers a list of defaults and possible answers If there are no answers you still need to keep this table even when it is empty This table may use answer lists defined in the table similar to the one defined in the table pnossibleAnswers this is not a key word and standard lists may be organized differently e autoResponses optional a list of all your automatically calculated responses e navigateRules this decision table defines special conditions when the default sequential order of pages sections or questions is violated and 23 Copyright 2009 2015 OpenRules Inc different order of pages is required If you do not have special navigation rules you may omit this rules table e updateRules this decision table defines special conditions for pages upda
35. ype Comment Example Allows the selection of one choice from among RadioButton Submit multiple alternatives and submits this choice to the server to refresh other pages e g to hide show related questions The same as a regular RadioButtonSubmit but RadioButton places the choices VerticalSubmit vertically Similar to You may specify the question s domain as RadioButtonVertical but 1 Yes 0 No Then the buttons will look like above allows you to define but when a user selects Yes the actual answer is different display and actual 1 When a user selects No the actual answer is choices 0 Creates a push button ActionButton i Update whose name could be RadioButton VerticalDomain associated with some If no action is defined pushing selecting the action defined in button will force the page to be refreshed with a navigation rules possible recalculation of all auto responses Creates a push button with a custom image whose path is defined by the question s x ActionImage name The question ID is used to define the last user An image that represents a delete button action that could be used in the navigation rules Creates a hyperlink whose text corresponds to the question s name The ActionHyperlink question ID is used to define the last user action fot col dna eed E E Can be used to represents different menus navigation rules 8 Copyrig
36. yright 2009 2015 OpenRules Inc Similarly one can define the method validatePassword Method String validatePassword Question question Dialog d question dialog String msg if d isAction Init return msg string id d getAnswer ID DialogUser user findDialogUser id if user null user_password_equals question answer d addError msg ERROR Invalid password f retum msg The actual business logic that validates the entered ID and Password depends on your specific implementation which can be realized in two methods similar to the described ones For example you may associate the list of users and their password with a table in your database using simple Excel import facilities Or you may use Java methods that talk to a database through a JDBC interface In all cases if an answer to the question ID or Password is invalid the appropriate message will be displayed and a user will remain on the InitialPage with the Login button When the answers are valid a user will see the next page Pagel as defined in the table navigatehules Note The question Restore previous dialog session allows a user to start filling in the questionnaire from scratch No or to restore previously entered answers Yes Saving and Restoring Dialog States While your web interface will guide a user through a set of pages and questions the user does n
Download Pdf Manuals
Related Search
Related Contents
Manual del usuario - Linkman Audioの世界 Operating Instructions Gánguil o pontón Operating Instructions MCW-D 200 Editor Software mode d`emploi medidas preventivas importantes guarde KJ-100 取扱説明書 Veja o relatório final - Marcelo Freixo BETRIEBSANLEITUNG Copyright © All rights reserved.
Failed to retrieve file