Tips for Polishing Your OPA Policy Model Oracle Policy Automation Cloud Service (August 2014) Jasmine Lee Principal Solution Specialist Last updated: 18 November 2014 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Introduction • Audience – People who work with OPA policy models. It is assumed the reader has already had OPA training and is familiar with using OPA. • Purpose – Provide ideas and suggestions for polishing your policy models, and direct you to relevant articles in the OPA User Guide • Software version – Slide deck prepared for Oracle Policy Modeling Cloud • Acronyms –OPA – Oracle Policy Automation –OPM – Oracle Policy Modeling –OWD – Oracle Web Determinations Tip: Latest version of the OPA User Guide can be found via the question mark button in OPM and on OPA OTN Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Example Projects • OPM Cloud has examples which demonstrate the features discussed in this deck. See the OPA User Guide article Example Policy Models for descriptions of the examples. Filter examples by Industry and Feature Example projects available from the Project tab Example projects available from the Project tab Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 3 Tips for Polishing Your Policy Model • Substitution and Sentence Generation – Name Substitution – Gender Pronoun Substitution – Second Person Sentence Generation – Substituting Names in Labels • User Input – Default Values for Attributes on Screens – Validating User Input – Event rules – Validating User Input – Data tab – Value Lists • Screen Configuration – Labels on Interview Screens – Interview Stages – Containers – Entity Collect Screen – Adding Images to Interview Screens • Improving the Explanation – Trimming Explanations – Attributes – Trimming Explanations – Relationships – Intermediate Attributes • Enhancing Web Determinations – Look and Feel of Web Determinations – Document Generation using BI Publisher • Language Support – Adding a Verb to the Default Verb List – Adding a Translation Layer – Writing Rules in Other Languages Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 4 Substitution and Sentence Generation Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 5 Name Substitution OPA User Guide • Personalizes the interview for a more user-friendly experience • Collect the person’s name at start of the interview, then substitute the name in later questions, e.g. “Does the person have insurance?” becomes “Does Homer have insurance?” • Particularly important when using entities, e.g. “Is the child a full-time student?” becomes “Is Bart a full-time student?”, “Is Lisa a full-time student?”, etc. • Substituted name automatically appears in attribute text on interview screens and in explanations • Substitute the value of an attribute for its text • Set up substitution • Understand text substitution principles • Combine multiple text strings into a single text attribute • If substituted value is unknown, the original text will display • If first and last name collected separately, you can use string concatenation to combine if full name needed for substitution Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 6 Gender Pronoun Substitution • May be used in combination, or in isolation, with name substitution to personalize the interview for a more userfriendly experience, and to provide more natural language text • Gender pronoun substitution requires collecting gender Original rule generically refers to “the applicant” In combination with name substitution, “Has the applicant submitted the applicant’s tax return?” becomes “Has Homer submitted his tax return?” OPA User Guide • Substitute the value of an attribute for its text • Set up substitution • Substitute a pronoun for a text attribute • Understand text substitution principles • Collect the gender of a person Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 7 Second Person Sentence Generation • Similar concept to name substitution, but sentences/questions generated in second person rather than third person • Requires name substitution to be set up first OPA User Guide • Change the text of an interview question • Display interview questions in second person form • Also see the articles for Name Substitution Example: Instead of “Has the applicant submitted the applicant’s tax return?” it displays “Have you submitted your tax return?” Example: Instead of “Does the applicant have health insurance?” it displays “Do you have health insurance?” Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 8 Substituting Names in Labels • Variable values (e.g. person’s name, age, etc.) can be substituted into labels on interview screens • Requires name substitution to be set up first Example: The person’s name and age were collected on a previous screen, and those values have been substituted into label text on the School screen OPA User Guide • Substitute the value of an attribute for its text • Set up substitution • Substitute an attribute value into text on screens • Tip: For substitution in labels, make sure the substitution values will always be known in advance of the screen being displayed, otherwise “unknown” will appear in place of the substitution value Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 9 Screen Configuration Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 10 Labels on Interview Screens • Labels can: OPA User Guide • Add labels to screens – be added to provide context and additional info – be used as additional headings and subheadings – include raw text, as well as HTML – have conditional visibility – contain substitution • Add a label control • Specify the style of a label • Control when a label is shown • Substitute the value of an attribute for its text • Substitute an attribute value into text on screens • HTML validation for interviews Example label Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 11 Interview Stages OPA User Guide • Group related interview screens together in a folder • Folder becomes an interview stage in OWD • Organize an interview into stages OPM (design time) • Tip: Try to keep interview stage headings and screen names to a single row each Interview screen • Add stages to an interview • Rename an interview stage Interview stage • Delete an interview stage Interview stage OWD (runtime) Interview screen Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 12 Containers OPA User Guide • Containers may be used to lay out screen controls side-by-side • Containers allow for responsive design in OWD, e.g. multiple columns which collapse to a single column in a small browser • Labels and images may also be put into Containers • Add containers to screens • See the example project myBenefits which uses Containers on several screens Screen controls laid out in two columns Efficient use of space on a larger screen Screen controls automatically collapse to one column in a narrow browser window. More readable on a small screen. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 13 Entity Collect Screen OPA User Guide • Entity collection layout can be ‘portrait’ or ‘tabular’ style • Collect information about entity instances • Tabular will usually make more efficient use of screen space • Containers can also be used inside the entity collect space to control layout • Example project: myBenefits Entity collect screen with tabular layout Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 14 Adding Images to Interview Screens • Add images to interview screens as useful visual aids OPA User Guide • Add images to screens • Example project: Energy Saver Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 15 Enhancing Web Determinations Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 16 Look and Feel of Web Determinations • Many aspects of the OWD look and feel can be set in the Styles section of the Interview tab, e.g. color scheme, banner graphic and heading styles OPA User Guide • Customize the appearance of the interview • Customize the appearance of interview items Styles section in OPM Web Determinations and the Debugger Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 17 Document Generation using BI Publisher • Generate documents from OWD interviews, e.g. letters, claim forms, etc. Available formats: PDF, RTF, HTML, Excel OPA User Guide • What is a form? • Documents may include text, images, graphics, charts, etc. • Create, update or delete a form • Note: Requires installation of BI Publisher Desktop. This is a separate product. It is not part of Oracle Policy Modeling. • Add forms to screens • Develop a template for a form • BI Publisher code for Policy Modeling • Download BI Publisher • Troubleshooting guide for using BI Publisher with Policy Modeling Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 18 User Input Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 19 Default Values for Attributes on Screens • Can set default values for attributes on interview screens – Defaults can be specific values, or can be dynamically determined based on previously collected data, or inferred from rules • Reduces the typing/clicking required to complete an interview OPA User Guide • Add questions to screens • Specify a default for an input All currency values have been defaulted to $0. User only needs to edit the fields for which they have income. Reduces manual data entry. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 20 Validating User Input – Event Rules • Error event and Warning event rules may be used where there is conditional logic associated with the validation, e.g. – Display the message “Please check the dates of birth. You have indicated that your date of birth is after your child’s date of birth.” if the applicant’s date of birth > the child’s date of birth • Error event: Error message is displayed and the user is prevented from continuing until the situation that triggered the event is no longer present. OPA User Guide • Validate user input using errors and warnings • Write an error event rule • Write a warning event rule • Warning event: Warning message is displayed, but the user is able to click past and continue the interview. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 21 Validating User Input – Data Tab • Validation with regular expressions and min/max can be done on the attribute in the Data tab – Error text may be configured on a per attribute basis • Use min/max values if there is no conditional logic for triggering the error, e.g. – ‘the person’s age’ field could have a minimum allowable value of 0 and a maximum of 120 • Use regular expressions to validate the format of an input such as an email address, an SSN, a TFN, a NINO or a PHN, e.g. – ^[0-9]{3}-?[0-9]{2}-?[0-9]{4}$ is a basic SSN validation – allows for NNN-NN-NNNN and NNNNNNNNN Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | OPA User Guide • Validate user input using errors and warnings • Specify minimum and maximum values • Use regular expressions Other info • http://en.wikipedia.org/ wiki/Regular_expression 22 Value Lists OPA User Guide • A value list is a way of managing lists of values for Text and Number attributes • What is a value list? • Particularly useful when multiple attributes need the same list, e.g. an online application form may ask for a ‘home address state’ and a ‘mailing address state’. Create one value list for ‘state’ and attach it to both attributes • Example project: myBenefits • Create, modify or delete a value list • Note: This is not a replacement for regular drop-down lists on screens, it’s an alternative which can save time when multiple attributes need the same list items Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 23 Improving the Explanation Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 24 Trimming Explanations – Attributes • Explanations* automatically generated based on the logic, language and structure of the rules can be extremely verbose • Can trim Explanations using Silent and Invisible settings on the attribute in the Data tab – Silent: Hide all logic nested below a particular attribute – Invisible: Hide the attribute only Options for Booleans Options for non-Booleans OPA User Guide • Hide information in an explanation • Hide all attributes in the explanation below a particular attribute • Hide a particular attribute in the explanation • Cut off an explanation above a particular attribute * Explanations previously called Decision Reports Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 25 Trimming Explanations – Relationships • Silent and Invisible can be applied to relationships – See examples below with a containment relationship (the household members) and an inferred relationship (the children) No trimming Invisible set on the containment relationship Invisible on containment relationship Silent on inferred relationship OPA User Guide • Hide information in an explanation • Hide a relationship in the explanation Invisible set on both relationships Invisible on containment relationship Silent and Invisible on inferred relationship * Explanations previously called Decision Reports Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 26 Intermediate Attributes OPA User Guide • Intermediate attributes can be added to make the Explanation* more meaningful – These two examples have identical core logic, but Example 2 has a more meaningful Explanation* due to the inclusion of intermediate attributes Example 2 • Design an explanation • Add more information to an explanation • Add intermediate rules • Improve the wording of a rule • Replace grouping operators with new attributes Example 1 * Explanations previously called Decision Reports Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 27 Language Support Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 28 Adding a Verb to the Default Verb List • Default verb list for the policy model is based on the Rule Language selected when creating the project OPA User Guide • Configure the list of recognized verbs • Occasionally you may need a new verb • If a Boolean won’t parse properly, it’s a sign the statement’s operative verb may not be in the verb list This statement won’t parse as intended as the operative verb (love) is not in the default verb list. • Options are to re-word the attribute to use a different operative verb, or add the new verb to the list for the project Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 29 Adding a Translation Layer OPA User Guide • Create one or more translation layers, e.g. policy model in English, OWD in choice of English, Spanish or French • Create a new language translation for a policy model • Even a partial translation layer is sufficient to demo the concept. Google Translate can be used for basic demos • Example project: Travel Compensation • Use a (human) translation expert for translation text for real implementations English policy model … with French translation layer Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 30 Writing Rules in Other Languages • Many languages available out-of-the-box for rule authoring • When creating a new project, select the desired Rule Language and Rule Region • Rule Language: – Language in which rule documents are written • Rule Region: OPA User Guide • Click ‘Function Reference’ from home screen --> see Contents panel for Function Reference in the supported languages • Create, modify or delete a project • Create a new project – Affects currency, numeric and date formatting of data entered and displayed – Affects parsing of currency and number constants in rule docs • Change the project region • Customize the text of interview items • Customize the formatting of attribute values in an interview Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 31 Documentation and Further Information Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 32 Oracle Technology Network Oracle Policy Automation on the Oracle Technology Network – User Guides – Best Practice Documentation – Tutorials, whitepapers, datasheets Ask questions about OPA on the OPA OTN forum Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 33 OPA Social Media • OPA on Twitter • OPA Discussion Forum • OPA on Facebook • OPA on YouTube • OPA on LinkedIn • OPA Blog Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 34 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 35
© Copyright 2024 ExpyDoc