You are on page 1of 21

CSSA Bullets

*BRE........................................................................2 *UI...........................................................................3 *Implementation Tools.............................................5 *Security.................................................................8 *BPM.....................................................................11 *REPORT................................................................13 *PERFORMANCE......................................................14 *GENERAL PRPC ARCHITECTUES..............................16 *Rule Resolution & Achieving Reusability.................18 *Other...................................................................20

*Other

*BRE
6 Declarative Rule Types Expression Constraint On Trigger On Change Index Declare Page 3 key principles to drive declarative rules Reuse Delegation Build for Change Delegation of Rule Delegated rules (Decision Table, etc.) can be accessed from the managers dashboard My Business Rules area. From the developers portal View > My Rules > label Rules can be managed outside developers environment

Backward Chain - Property-Seek-Value method used Calculation types (sum of, value of) depend on type of target property in Dec-Exp Rule collection Define a set of rules that will be executed sequentially as a group Declare Page The name of a declare pages rule is the name of the page it creates. It must begin with the string Declare underscore (Declare_) with a capital D. No Applies To, thus No Inheritance (No class) declare page rules are referred to by name only. Declare Pages specifies PageScope(Node/Thread), Page Class, Load Activity, Refresh Strategy, Access Group (Node) Load activity LoadDeclarativePage select this type in the Security tab of activity the name of the activity does not have to start with Load_. Thread level shared by single requestor Node level shared across all requestors DP typically contains lookup list, code tables, org info, translation tables, system settings, external data that changes infrequently, any commonly used enterprise info end-point URL for service/connector Possible to have multiple versions of a declare pages rule Rule Resolved but No Class Inheritance In the load activity, set LoadDeclarativePage under the Security tab A declare page gets created at the time it is first referenced. WHEN rule the page is refreshed when the WHEN condition=FALSE; apply to thread-level only, not node-level You can include section on a harness for Declare-Page as long as they are read-only Conditional Refresh Strategy (Under Definition Tab) Set Time Period - simply specify Days, Hours, Minutes, Seconds applies to both Node & Thread For Node, you must set Access Group Or by When Rule (Thread Only) if True (Is Refreshed?), no refresh. If False, refresh applies to Thread only Expiration (deletion of declare page) Allow external expiration request? you can force the expiration of a declared page by using a java function Check Allow idle timeout If Refresh Strategy is used with longer than 24 hours, this is used. If Allow idle timeout unchecked

To delegate a rule, click the Favorites toolbar button , which adds to System-User-MyRules Make sure security and ortal configuration for this group of user is appropriate.

When to use declare rules All the time When rules not well defined Only when the input data changes Only when the stored result of the rule is used Declare Expression Change Tracking Tab Whenever input change Forward Chaining Rule Collection Forward Chaining (or BC?) Whenever used if no value present Backward Chaining When used if property is missing Backward Chaining Whenever used Backward Chaining (performance can be costly)

When you have a property used as a target in Declarative Expression, you cannot use Property-Set to set the property in an activity.

DP in Node gets removed when the system shuts down. DP in Thread gets removed when you log off (sessions ends). Remember Declare Page is reloaded only when its accessed next time (not WHEN=False or refresh period has expired) You can debug DP using Tracer

Rule-Obj-Property Rule Obj-FlowAction Rule-HTML-Section Rule-Obj-ListView Rule-Obj-SummaryView

Connect rules retrieve the values of environment properties, such as endpoint URL, server name, request queue, response queue, etc. from Global Resource Settings using the syntax =MyDeclarativePage.pySOAPURL Declare Page should not contain username/password for Connect rules.

Parameters can be passed directly to Rule-HTML-Property in the following rule types: Rule-Obj-Property Rule-Obj-FlowAction Rule-HTML-Section +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*UI
UI Best Practices For ListView, use paging rather than scrolling For ListView, use Smart Info (show 5 or less) Button label should be in a verb form. Intent Driven Skin Wizard creates Rule-Portal-Skin 6 CSS style sheets 2 portal rules: WorkManage & WorkUser All in a same ruleset 3 Flow Action Types Drop down Buttons Links CSS files are cached by IE Client side validation OnChange (Event) OnClick (Event) OnBlur (Event) Hide/Show (Action) Refresh (Action)

Declare On Change on property; When clipboard (memory) change (i.e. Property-Set) calls an activity The activity type has to be OnChange Not referenced from anywhere Can be executed by PRPC running a Property-Set

Declare Trigger when DB change; instances of class change calls an activity Not referenced from anywhere Can run on current requestor Can be configured to run on a child requestor (In Background On Copy) Cause an activity to run when instances of a specific class are created, updated, or deleted in the DB. Decision tree can call Decision tree/table/map, but decision table can only call other decision table Decision tree can take advantage of function aliases as well as WHEN, Constraint, and Declare Expression rules. Use JSP Tags to include rules Rule-Obj-HTML Rule-HTML-Fragment Rule-Obj-ListView

Rule-HTML-Property can be referenced directly

Saving section rules in the data portion of the class hierarchy is usually better because the rules can then be reused wherever its associated data is used, without having to worry about correct property referencing. Primary benefit of smart layout in 5.5 is that it forces vertical alignment even when layouts are nested. Users can have multiple portals which are defined in access group Validation can run at different execution points within data entry, what are they? Client side Validation rule on flow action Post processing in an activity Portal is rule resolved (Rule-Portal) contains Skin portal access is dependent on Access Group and Ruleset list. Gadget Rectangular area on a portal display. Each gadget contains a control that a user can interact with e.g. the worklist area of the workers home page is implemented through a gadget. Each gadget defines the appearance and behavior of a rectangular portion of the navigation panel there are 19 gadgets on the WorkManagers portal e.g. the standard HTML rule Data-Gadget.IChartsDashboard presents four interactive charts in this space. CSS styles and JavaScripts are instances of Rule-File-Text Define the report to be displayedin gadget in Report Model I think SystemUser-MyRules Here is where you name the report Dshboard, Report, Rules, Tools, Administer Not on standard WorkUser portal Dashboard, Report are on WorkManagers Portal, but not on WorkUser Developers portal can be modified even though unlikely. No UI for BRE Declare Expression, Declare On Change, etc. Portal rules specify Skins, Gadgets, Menus, Toolbars Where do you define Gadget in Rule-Portal? Tabs How do you display a Gadget? Show-HTML To maintain guardrail compliance when using a section to display an individual element within a page group property, the JSP tag should be defined in RuleHTML-Fragment Skinning a customers application should be done whenever customer prefers, given sufficient styles. Standard Edit Validate: SSN, Zip, TIN, (Not US Address) Auto Complete CANNOT drive a Dynamic Select Select multiple selections in a List to List Shift+Click OOTB PegaWAI RS Style control, Frame control, Date control, (Not TextArea control)

Local flow action may change the work status, but cannot complete a work Local flow action is optional When buttons are used for flow actions, local actions listed on the assignment shape become unavailable. AutoComplete control allows up to 10 items to be displayed by default type at least one character to activate. Last screen flow screen will have Finish button Screen flow Has a single user and single harness There is no assignment in a screen flow screen flow has limited set of shapes available compared to a regular flow. SF can operate on a temporary work object, one that is never saved to the database. SF cannot be a starter flow rule. Use a regular flow to create the work object. Then call the SF as a subflow. Contain Split-For-Each, but not Spin-Off nor Split-Join Types Perform Screen Flow (by default) Tree Navigation Tabbed Screen Flow >> These different screen flow work even when an error is present you can switch to different screen even when an error is present. If user needs to see more info on LV, use PRPC SmartInfo feature to show this as the user hovers over the row keep performance in mind (show 5 or less) Best Practice by building HTML form rule in the same class as the property, you inherently achieve reuse. Screen Flow all assignments assumed to be worked on by a single user Java Script file Rule-File-Text Rule-HTML-Paragraph rule can be included in flowactions and sections using the paragraph icon. CSS files desktop, work object harnesses, reports, and rule form Modal popups are available only for local flow actions. Portal rules specify skin, gadget, menus, and toolbar Standard Navigation panel bar dashboard, process work, monitor Access Group Portal Skin Access Group can reference one or more portal Gadget HTML stream rules that belong to the Data-Gadget class Most Portal Rule contains Skins, Tabs, Custom, Options, History Developer portal rule skins, options, history (*No Tabs, Custom) Developer is the type of portal selected in the skin tab About the Tab tab in the portal rule

Determines which bars appear in the navigation panel of the portal, which gadgets appear For gadget, the checkbox Custom is used to indicate that an activity defined in the custom tab is used to create the gadget, rather than an HTML rule name. Custom tab Includes an array of activities called to populate the gadgets defined in the Narrow and Wide columns of the Tabs section that have Custom field checked. Option tab Logo, tooltip, Help URL, Show Launch/Log off, Application Selector, Monitor Activity Workspace, HTML Fragments, Exit Option, Localize, Download user ocx plug-ins +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PegaRules Log Analyzer (PLA) Daily summary of Alert, System log, Garbage Collection logs. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +

*Services & Connectors


Protocol General Caller packages data in Request Request sent to service provider Service provider parses the request data Service provider processes the parsed data Service provider packages the processed data in Response Response sent back to caller Caller parses out the Response data Synchronous SOAP, HTTP, JMS, MQ, SMTP, Java (???), EJB (???) Asynchronous SOAP, HTTP, JMS, MQ, SMTP (use SendAsync), Java, EJB Asynchronous call has no Response Tight coupling is bad. Thats why we has SOA & SOAP. Two-phase commit EJB, JMS, Java How to detect long-running services: ALERT Logs (performance related) SOA

*Implementation Tools

Run Application > Preflight before you lock the rulesets Run Run > Tracer flows, activities, services, parse rules, declarative rules Pega Log (Tools > Log Files) error, debug, info, java exception Alert Log (Tools > My Alerts) performance-related messages Alert Log is a subset of Pega Log

Don't confuse the Alert log with the Pega log, which contains error messages, debug messages, information messages and Java-related diagnostics. The Alert log typically contains only a small fraction of entries that appear in the full system log, usually those that identify events with performance implications. preconfig.xml contains thresholds for alerts

Prlogging.xml Controls the level of details in log File > Import > Refactor on Import Rename classes in a ruleset archive or product archive *.jar or *.zip are readinto memory, renamed, and copied to PRPC database. The original import archive files are not modified. Logging Tools SMA Tools > Log Files

SOA is composed of an Enterprise Service Bus (ESB) you do not directly communicate with another app. Loosely coupled Increased reusability of components.

Service Package Has one or more service rules, each service rule calls an activity Identifies Access Group, granting necessary authorization to the service request. SP is specific to a particular integration protocol, i.e. SOAP. Must have system-wide unique name Separate packages must be created for each implementation layer. Template is defined in Framework Layer Instances of the data class: Data-Admin:ServicePackage Represents the service as an application

Service Rule Do the mappings for Request and Response data Has Faults, Exception tabs to handle errors Email, file, JMS, and MQ dont have this Calls activity Contains URI Unit Test Service Rules Clipboard Run Service activities Run Rule-Parse-XML Run Service Rule Tracer PAL Log Files (prlogging.xml) Alert Files (prconfig.xml) Connector Rule Prepares Request data Call Connect-SOAP Process Response data upon receipt. You can run connectors in parallel - click the check box in the connector method Connector methods: Connect-SOAP, Connect-HTML, Connect-SQL Contains protocol specific configuration, such as the endpoint URL for a SOAP connector and SQL statement for the SQL connector. WSDL SOAP

No WSDL Just Send XML Data Good for customers having an interface predating SOAP (legacy) HTTP-Post & HTTP-Get When to use?

If a customer had an interface predating

SOAP JMS

Java Messaging Service messaging in J2EE Can be both synchronous and asynchronous

External tables contain no pxInsKey, pxObjClass RDB calls do auto-commit no need to use Commit in activity File Listener Contains one or more service file rules (which do the data mapping) These service file rules call activities (to send and process data) No response this is asynchronous This simply takes a data file (if present) and process Has no Fault nor Exception tab XML Rule Used by connector rule Used to move clipboard data into XML format Sent to the service function in an external system Parse XML (opposite to XML Rule) Used by service rule Used to move XML data into clipboard for processing Received from a caller in an external system In executing PRPC service, its possible to change the state of an existing WO by executing a flow action resumeWorkProcess Service rule returns simple values in pySimulationDataPage.pyResponseParameterValue Default error handling for connector generated via connector Wizard the connector activity does not handle it. Processing transferred to ConnectionProblemFlow Most appropriate data transformation for BIG#DIV#ORG write your own RuleUtility-Function

Describes a web service Define a set of operations Define type of data expected in the request and response

HTTP

XML-based protocol Contains userid/password Contains operations to be executed with request and response data Can be asynchronous (which means it is inherently synchronous) Uses HTTP & HTTPS protocols. (I think) More reliable than HTTP since this is newer and HTTP is only for those predated SOAP.

JMS, MQ requires Listener. JMS, MQ contain no Exception or Fault Configure Data-Admin-IS-Simulation for connector simulation Rule-Connect-HTML for non SOAP compliant service Cannot connet o a stored procedure which returns cursor to a table {ASIS} tells system not to replace quotes around the value You can retrieve CLOB from RDB call File listener CANNOT listen on read-only directory Two HTML methods that does Rule-Connect-HTTP GET, POST Handling Exception Connector activity set pyStatusMessage & pyStatusValue to indicate any exceptions. Service SOAP has Faults tab where an error message is returned to the external SOAP client. Connector SOAP has Faults tab that map any SOAP faults returned by the Web service (not required) Which connector has the Faults tab Connect .Net (not required) Connect SOAP (not required) Connect MQ Connect JMS Connect SQL Connect EJB Connect HTML Connect Java Connect JCA Which service has the Faults tab Service .Net Service SOAP Service MQ Service JMS Service HTTP Service Email Service File Service COM (Exception tab) Service CORBA (Exception tab) Service EJB (Exception tab) Service JRS94 (Exception tab) Service Java (Exception tab)

If I have disabled my MQ listeners by editing prconfig.xml and I want to enable them. How do I do that? Via SMA. Locate listeners and start them. Stateful vs. Stateless Service Specified in the Context tab of the Service Package form. Stateless any requestor in a pool requestor can perform without regard to processing that the requestor performed earlier Clipboard properties are cleared after the service completes its processing. Use requestor pooling improve performance. Requestor pool deoes not include authenticated requestors (users) requestor pooling wont be available if the service runs as an authenticated user. Stateful (Default) maintain a clipboard across second and subsequent service requests same requestor will perform. The state of the clipboard remains intact Do not use requestor pooling Select End requestor when done check box only on a service rule that is the last one of a series of requests you are finished with the requestor, so that it can be destroyed. This has no impact for stateless where the requestor is only used once and automatically freed up. Service simulator does not exist as these are outbound you can test a service via a RUN button. Why Axis2? If you are connecting to a service which has SOAP attachment If you are connecting to SOAP1, 2 based web service

Div1-Int holds generated class structures for a specific division-wide services and connectors
Connect-File & Connect-FTP can not execute in parallel EJB, JMS, SOAP, RDB-* can.

Connector Simulator

A connector simulator specifies an activity that bypasses the connector and returns static test data to the Integrator task in the flow. Has a simulation activity

Instance of Data-Admin-IS-Simulation

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Password Management Single-Sign On

*Security
Login authentication & Requestor authentication Control how long a user session may be left idle before the user is required to login again. Intervals are controlled in PregaRULES.xml Login Authentication amount of time the system waits for more input before requiring the user to re-authentication; controlled by the DataAdmin-Operator-AccessGroup, the authentication timeout field on the Settings tab; if no inputs within an interval, the system displays a dialog box requiring operator id & password once entered she can continue her work. Requestor authentication dedicated to users session; amount of time the system waits for additional input from a requestor before deleting the requestor itself from the system, and doing cleanup tasks. Normally requestor timeout is set to a longer time interval than the login authentication timeout. If requestor timeout happens, it may not be possible for the user to return directly to the task being done. Since the login authentication timeout happened as well, the user first must re-enter id/password, then depending on the situation the system determines whether the use can go back to the task last left off. In case of requestor timeout and cleanup tasks already happened, this may not be possible. There were a lot more exam questions in authorizations than in authentications. LDAP used to look up encryption certificates and provide single-sign-on where one password for a user is shared between many services. 4 types of authentications User name & password Two-factor authentication token Digital certificates electronic credit card Biometric authentication Enterprise Identify Management and Single Sign On a nice way to manage multiple authentication info at once. Directories LDAP Web Access Management

EIM Components Central ID management Identity federation component enables users to securely access data Centralized policy Web access management control In Web SSO, once logged in, the credential is stored in session cookies. PRPC authenticates user by matching user name & password stored in DataAdmin-Operator-ID Guest is not authenticated PRPC authentication types PR Basic PRSecuredBasic similar to PRBasic but via SSL PRCustom External LDAP directory PRExtAssign External Assignments J2EEContext JAAS to authenticate users At least 1 org, 1 div, 1 unit must be created for Operator ID to use in PRPC. PRPC Managed Authentication Native PRPC Plain text or SSL (rare in prod) Web Access Management deployed as a web application PRPC servlet URL protected Container-Managed PRPC runs in a Servlet container that uses JAAS implementations Custom Corporate uses corporate LDAP directory enforces password policies Protocol Web Access Management User request Check cache for Authentication Check cache for Authorization Generate and send page requested by user Access Role When you create a new access role, you must associate it with the appropriate classes using the Access of Role to Object rule form or Role Editor this enables class based security.

Access Group Not Subject to Rule Resolution AG is a data instance References access roles, work pools, production rulesets, and application 1 AG can be referenced by one or more operators By default, AG is assigned to a requestor until an operator authenticates AG can be assigned to Requestor (required), Org (required), Div (optional), and Operator ID (optional) Operator ID take precedence over the other, overwriting whatever AG is assigned before the order here is significant, later taking precedence over the previous ones. Operator ID can have more than one AG but only one default AG is designated. AG has one or more Access Roles has one or more Privileges. Also contains production rulesets Multiple access groups can be applied to one Operator ID. Access Deny Allow/disallow a requestor to perform an operation on an instance of a specified class. Strongest - AD takes precedence and prevents any keys (roles) from being tried. Not subject to a rule resolution only one copy in a ruleset (no versions) only specify Role Name and Applies To no Acccess Deny name Can reference Access-When, as an alternative to a system production level number. Access Role Defines various levels of access to classes (rules and instances of classes) No Applies To subject to rule resolution Access of Role to Object For each of the 8 categories in the array, you can enter an Access When rule name, or a numeric value between 0 and 5. Enter 0 or blank to prohibit all access. E..g. if the production level is 3, and the value in the Open Instances is 4 the user can open the instance; If a production level of 5, the user cannot open the instance. Access role Editor: Tools > Security > Role Names Production levels are referenced in ARO References Privileges

Instances of class = individual work items Rules that apply to class = i.e. flow, activity, section rules, etc. Not subject to a rule resolution only one copy in a ruleset (no versions) only specify Role Name and Applies To no Access of Role to Object name.

Access When Conditional grants of privileges based on a property Referenced by Access of Role to Object and Access Deny rules. Allow/disallow a requestor to perform an operation on an instance of a specified class. Subject to a rule resolution (vesioning) there is a Access When name with Applies To Does not reference Access Role Only specify Applies To Subject to Rule Resolution Rule-Access-When Production Level When the system is first installed, the production level = 2. The current level is recorded as the value of the pzProduction Level property on the process page pxProcess.pxAdminSystem.pyProductionLevel High number means very restrictive. Lower number means more open to everyone to access. Referenced in Access of Role to Object Production levels can be directly referenced in Access of Role to Obj and Access Deny rules, not Access When Privilege The privilege form defines only the existence (name and Applies To class) of a new privilege. It contains no other information and conveys no capabilities by itself. By referencing privileges in Access of Role to Object rules and in certain rules rule types such as flows, privilege rules can affect which application users can do what.

Privilege complement the security and access control features provided by access roles and ruleset lists, by restricting access to specific rules rather than to entire classes or RuleSet versions.

Subject to a rule resolution (versioning) Privilege name & Applies To.


Does not reference Access Role

Access RolePrivilege AD AW Oper ID ARAG O Setting to

Setting
Subject to rule resolution (versioning) Setting name and Applies To Does not reference Access Role

Privileges to follow 7 Activity Correspondence Flow Flow Action Harness Section List View Summary View Encrypt

Work Object Encrypt blob in the class rule defition Properties Configured in prconfig.xml Encryp/decrypt takes time performance overhead despite security enhancement

Authorization Relationships arrow indicates references A requestor thread can only be associated w/ a single access group at a time Access Roles implement the PRPC class based security model Its best practice to list only roles for one application in each access group The order of roles in AG is NOT significant. Access of Role to Object is not subject to Rule Resolution Privileges can limit operations that can be performed on an attachment category If the production level of an Access Deny rule is zero (blank), access to the respective class is permitted. You need a separate Operator ID DB in PRPC even if you have centralized identity management To determine whether a requestor holds a special privilege, your application can call the standard Boolean function HavePrivilege() which returns true or false.

10

Native PRPC authentication is rarely used in production. Because this is only meant to be a starter option to be used before your final authentication mechanisms are in place. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +

*Deployment
Product patch contains rules from single version of ruleset Product contains all rulesets latest to original Best Practice Skim the first phases RuleSet version to the next highest minor version upon completion of a specific milestone such as push to UAT. Option would be to plan each phase to have its own minor version. RAP includes data DB Tables Class groups Operator ID Access Group Org Div Org Unit Workbasket Workgroup Deployment Wizards File > Migrate Product File > Package Work (move work objects, assignments, history, attachments) File > Export Archive Prdbutil Application > Purge & Archive About Deployment and Ruleset
You cannot lock a ruleset that contains checked out rules you get an exception: Cannot be secured: There are records checked out by users belonging to this RuleSetVersion.

ZIP archive with a product rule. You should require that all developers should check in rules, before you lock the RS version to ensure no further checkouts/check-ins can occur until the ZIP archive is built. Neither the checked out nor the checked in rule is included in the zip 4. What happens if you create a RAP and not all rules are checked in? Not IncludedErrors are reported. Ruleset pre-requisite is enforced at design time. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*BPM
Pull Routing Press Get Most Urgent button, which calls an activity GetNextWork When the GMU button is pressed on users worklists, PRPC returns the assignment that should be completed next, based on the assignment urgency. GetNextWork uses properties on the Operator ID rule such as Get from workbaskets first? & Merge workbaskets? & Skill Name & Rating Under the Work Access tab in Operator ID, check whether assignments should be taken first from a workbasket or worklist Get from workbaskets first? Prevents cherry pickings GetNextWork chooses the most next logical work improves productivity prevents users from picking easiest tasks only Using GetNextWork gets the next high priority assignment examines contents of worklists, workbaskets, and other factors to retrieve an assignment.

1.
2. 3.

You can create a production rule with ruleset version that is still unlocked you can create a zip file as well though not a good practice. Checked-in versions of checked-out rules are not imported when a Product rule is used to create a ZIP archive of a RuleSet version (this implies that you can zip a ruleset that is not locked it will display error if any rules are checked out but this can be ignored.). Checked-in version of checked-out are not exported to a

. Push Routing Assignment is pushed to a worklist. Benefits of BPM Human factors, agility, process visibility, process centric culture.

11

BPMS features process modeler, engine, simulation, BAM, case, Content management, enterprise, portal Cover

Requestor retains the lock Released when Commit or requestor logs off

Work object of concrete class Use AddToCover, CreatecoveredObject activities to add to a cover Derived from Work-Cover- Cannot be nested cover cannot cover When a cover is locked, all covered will be locked automatically you can customize this and avoid automatic all locking Contains one or more work objects All child has to be resolved before a cover can be resolved Cover is associated with a covered item via pxCoveredInsKeys Covered also retains cover key Cover & covered objects must belong to a same class group Work object belong to only one cover WO is added to WC using an activity during runtime Should not contain more than 20 covered work objects A single work object could be in only one cover Has a Process Flow

Flow Shape: Notify Attached to Assignment This is Correspondence Flow Shape: Flow Action Connector coming out of an assignment Local actions you still stay in an assignment 3 types: Dropdown, Button, Link Flow Shape: Spin Off Asynchronous caller has no knowledge of callee Callee can be a different object from a caller Lets you call N different flows-defined in design-time Flow Shape: SplitForEach Creates a flow for each row of data in PageList/Group Synchronous caller waits until all or one of subflow finishes Within only same work object Lets you call X number of flows depending on the size of list decided during runtime. History

Folder

No Process Flow Database views Reporting purpose Contains folder, cover, and work objects Work object of concrete class derived from Work-Folder- No locking Need not belong to a single work pool Very loose Has UI E.g. Accident cases in Cambridge Work object can belong to more than one folder Work object and work cover can be added to work folder using an activity during runtime. Work object can belong to more than one folder

By default, written to pr_history History added when SLA is processed by the SLA agent Audit Notes on flow shapes are recorded in work history Level of history can be controlled.

Flow Shape: SplitJoin Within only same work object - Do not create new work object Synchronous Flow Shape: Assignment-Service Pass control to an external system; waits until an event is raised when the service in the external system ends. Flow Shape: Fork You can have more than 2 connectors coming out of a Fork Flow Shape: Connector

Locking acquired by Obj-Open Obj-Open-by-Handle Obj-Refresh-and-Lock

12

Connector Properties Always, Staus (Dec. Rule), When, Else

How to refer to the step page of a java step in activity use the implicit instance myStepPage When processing a For loop or iteration over a ValueList or PageList, which start parameter would you inspect to get the value of the current iteration pyForEachCount Which classes are history records created for Work, Data, Rule SLA Can be associated with flow assignment or entire work object (pySLAName, use a model to set this)

Flow Shape: Flow Callee can run on a different work object (Spin Off) There is no assignment in a screen flow screen flow has limited set of shapes available compared to a regular flow. Flow Shape: Ticket You cannot resume processing from the point where the ticket was invoked this is like go to, you dont know where you jumped from Activity If Pages & classes blank, then Applies-To assumed as primary page Local variables less memory, less performance overhead, cannot be traced; cannot be passed between activities Parameters can be traced Parameters not shown in clipboard Primary page automatically becomes a step page if left blank <LAST>, <APPEND>, <INSERT>2, <CURRENT>, <PREPEND> Leave step page blank For Each Page pxCoveredInsKeys contained by cover, this ValueList can be iterated using For Each Element in ValueList/Group to access all covered work objects. Do not use Java May Start to promote security of your application and limit what actions can start this activity May Start means users can start the activity directly from an action within the UI or a URL, directly by user input processings Assignment If type is screen flow, flow action is defined within the assignment shape in a regular assignment, the connector will have the FlowAction An assignment cannot be routed to either worklist or workbasket.

Obj-Refresh-and-Lock In many cases more efficient and safer than Obj-Open Use this you do not know whether an object is locked and need to update it Assures that the contents of the step page (on clipboard) are current and a lock is held on the corresponding object If the Object is locked by the caller and the lock has not expired, this method has no effect If the object is not locked by the caller, this method acquires a lock and if necessary replace the step page contents with the current value of an object instance. If locked by other caller, ERROR.

Work-.AddHistory This adds history You can have a single assignment that can route to a worklist or workbasket by providing a custom assign activity that has a parameter that toggles between the two. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*REPORT
Wherever possible, leverage the Report Wizard when you need to create a new report then customize the generated LV or SV Exporting to Excel can be both for read and write purpose (not just view but you can edit as well. Changes will be saved back). List View Select & Paging Options

13

YES, you can pass parameters to a LV.

You can embed LV in UI You can load data other than PRPC work objects Data Table Wizard is a good example e.g. Locations You can add/edit/delete data via List View. No Chart

Summary View No Select & Paging Options (LV only)

YES, you can pass parameters to a SV. The section where it is translated into WHERE is called CRITERIA (Not Filter by) You can drill down to Detailed View, List View, or Summary View Can hae threshold, charts, and trend reporting (different from LV)

Use reporting-image HTML Property to display an image TRUE one common technique for avoiding potential performance degradation of the running transactional system, is to create a replicated database for reporting, refresh this data as needed. PRPC support the concept of a reports database The basis for standard reporting is by work pool. Report Wizard You launch Wizard from the toolbar of each report category on the Monitor Activity page. If you cannot start, you do not have the ReportWizard privilege.

PRPC populates exposed column upon Commit to DB automatically How to expose embedded properties Page use declare expression PageList use Rule-Declare-Index OOTB Report Monitor Process Assignments Assignment Table Open assignments That are past their goals and deadlines. Show assignments by organization so you can determine which group might need help Data sources are from both worklist and workbasket. Monitor Process Work Table Open, unresolved work objects being processed Compare number of open work objects today with the number a week ago, and so on. Analyze Process Quality Work Table Resolved work objects from one application. The operator who resolve the most itesms, and the number of work objects that were created in a specific time of period. Analyze Process Performance Work History Table Resolved work objects and selected flow rules. Present performance information in terms of tasks. How often was each kind of flow action selected by assignment Change Dashboard Data-Gadget-ICharts Customize the Monitor Activity favorite section under Analytics: System-User-MyRules +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*PERFORMANCE
Why not good storing in PR_OTHER by default when you create a class group or work class? do not have exposed
columns nor indexes queries from this table becomes slow.
Byte Governor number of bytes read from all queries in an interaction exeeds the threshold When new classes created, by default, they are mapped to PR_OTHER Ideally no class should be mapped to any default tables PR_OTHER, PR_INDEX, PR_HISTORY, PR_Data Watch 3 areas for performance

JOIN

Does it allow the best performance? HMMmaybe but verify.

Performance warning when you select two properties for joining data that are completely unrelated in terms of values. Every row in the first table (n rows) will be joined with the second table (m rows) resulting in a result set of a total of m*n rows.

Title of report is determined by full description of report rule, but the name on the gadget is determined by a report model. Custom activity for report should reside in Embed-ListParams for LV & SV

14

Class List View Activity

3 Performance tools PreFlight find potential performance problems (design time) PAL find hidden performance problems (unit test) Log/ALERT find known problems (run time), (unit test) PreFlight Reports the results of several checks on the rules, which encourage good design and implementation practice. Warnings are instances of the Index-Warning class, which corresponds to the pr_index_warnings database table. You can create additional warnings that are specific to your environment or development practices. override the empty activity named CheckForCustomWarnings. This is called immediately after the standard activity CheckForWarnings use addWarning standard function rule. You can also override the standard behavior of the Application Preflight tool Do not prevent Save a rule (even if there is a warning) Does not cover Enterprise Class Structure best practice PreFlight is about performance, not about improving reusability. Write-Now (Obj-Save, etc.) defeats the benefits of deferred save function Rules Assembly significantly skews performance, PAL should be used after rules assembly Details revealed by PAL PAL Int Count how many times browser communicated w/ PRPC PAL CPU Time how computationally intensive; only by Windows system (not by Unix) PAL Rule Count - # of rules executed between readings PAL Total Byte how much data moved between client & server PAL Detail Screen reading/writing the Blob or pxPVStream to/from DB Before UAT or Prod, ensure no logs nor alerts Common Alerts (Tools > My Alerts) DB Time Root Causes Indexing a table, SQL Syntax, Data filtering, record locking, DB server capacity, size of data returns (not actual data

fetch); from the time SQL sent from PRPC to time DB responds; the actual fetching of rows is not included in calculating the time; other possible cause for delay: too few connections in connection pool, missing index, lock contention DB Bytes Root Causes List View, Summary View, Obj-List, etc. Browser Interaction Time PRPC response time for browser request Connect Total Time a connector method calls an external system and is taking a long time. > Alert is generated in each of these cases when a threshold is exceeded. DB Trace debugging aid, comprehensive & detailed log of accesses to the PRPC database PAL reading for Bytes read from db storage stream how many bytes read from pzPVStream pxOutputBytes the # of bytes sent to browser (related to Browser Interaction Time) Alert msg can be retrieved from: MyAlerts, AES, Alert Log, (NOT PAL) Automatic Event Services (AES) Reads the alerts for you Proactively emails management of health via scorecard Chart patterns & trends SMA (System Management Application)

Monitor and control - caches, agents, listeners, requestors, memory, prconfig.xml, threads, JDBC db connections, functions in library, prlogging.xml (logging level definition), remote logging (start/stop) Operates one node at a time but can access any registered node Logging Level Settings (prlogging.xml) Select a Loger and set a level (Alert, Debug, Error, Fatal, etc.) This implies that using SMA you can set prlogging.xml Garbage collector and log usage statistics. Open Log Files Open Alert Log Deployed as prsysmgmt.war file Provide PegaRULES build information

BLOB advantages Compressed for low storage overhead No storage limit Data structure can be complex

15

No need DBAs no need to create separate normalized table for application specific, user-defined data.

Common root causes of performance bottleneck External system Clipboard Browser Rules DB Work DB Java App Server JVM OS CPU Network Overheads between systems PLA (PegaRULES Log Analyzer) Day-by-day analysis Application Profiler Use in conjunction with PAL When enabled, the Profiler adds significant overhead to performance This logs systems processing at the finest level of details more detailed than PAL get every detail to activity step Output is written to a CSV file in the PRPC temp directory Detailed trace about activity, when, and model rules. Narrow down where time is being spent dispays CPU and wall time for each step.

Rules in DB perform as well as straight Java code because of intensive caching operations Two types of urgencies PRPC supports Assignment, Work Object DB Connection Pooling having db code create a new connection object on every client request is expensive RETE very slow, lots of memory DB indexing a data structure that improves the speed of searches operations in a table (PR_Other is not indexed; thus avoid using this) Load Balancing Ensures one single node in a cluster does not get overloaded Session fail over when one server fails, LB automatically switches to other server Incoming request hits LB first which optionally redirects to an HTTP server and finally to the servlet container Use of prconfig.xml for DB connectivity Adv: EASY Disadv: user/password exposed Class loader object that is responsible for loading class into memory External tables no pxInskey, no pxObjClass Test Connectivity on Data-EmailAccount checks connection but does not send emails JAR simple Java classes WAR JAR + entire web applications EAR JAR + WAR + EJB Message-driven beans (MDB) are JMS listener, which requires EAR deployments. Use WAR if no need to 2-phase commit, JMS, EJB, J2EE Security, all of which requires EAR (heavy deployment) No EAR for Tomcat Tomcat is not full J2EE compliant 2 phase commit Java, JMS, EJB For fast MQ message requirements use WAR Rule Instance cache Holds data about reads from PRPC database this is rule data only, not including work object instances Memory Cache When rule accessed at least 3 times or updated once Contain XML of the rule Rule Assembly cache

DB Trace When enabled, it creates a comprehensive and detailed log of accesses to the PRPC database shows SQL statement and the elapsed time for each operation, and whether found in the rule cache. Assist in tuning system performance If users perceive that work items take a long time to process, the DB Trace facility might help point to where the time was being spent. Does not know how much memory is occupied by returned data Does not know about Bytes sent to browser +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*GENERAL PRPC ARCHITECTUES


6Rs Receive, Route, Report, Research, Respond, Resolve

16

Generating and compling Java code for rules in the work object processing PRGenClasses Memory Cache When first time it generates java code & class files

All classes under class group are mapped to a same table Locks are held at the requestor level RDB-* do automatic Commit Every rule must belong to a ruleset Most db updates requires that the requestor holds a lock Obj-Open Obj-Open-By-Handle Obj-Refresh-And-Lock First Commit does not require a lock creation of a new work object DB locks vs. Object lock (requestor) Commit/Rollback in PRPC happens @ Thread level (PRThread) Not every rule type in PRPC has to be compiled into a java class file (e.g. Portal, Skill) How do you get the info who has the lock? Leverage LockInfoPage Tools.getDatabase() it gets a connection to PegaRules db instance associated w/ the current processing Obtain a lock using API tools.getDatabase().getLockManager().lock(false) Each requestor runs within a Java thread Single threaded requestor only one at a time Purpose is namespace there can be many Threads Child requestors: e.g. Connect-* methods can be run in parallel Agents are autonomous & asynchronous 3 standard agents: Pega-Procom, Pega-Rules, Pega-IntSvcs One agent per ruleset there are versions Agent Manager regularly generates agent schedules based on agent rules. Rule-Agent-Queue (Agent) vs. Data-Agent-Queue(Agent Schedule) you do not need to manually create agent schedule; it is configured automatically by AM. Agent modes: Standard (when let PRPC do the scheduling and transaction handling), Legacy, Advanced Debugging an Agent Use Tracer trace agents which are running on the same node where the tracing is occurring. Tracing an agent is a bit different, as the agents can run quickly and be one before Tracer can catch them. Before the agent runs, go to the Agent Status screen (in SMA) and Delay next execution of this queue for Tracer startup by first choosing the agent and clicking the Delay button at the top.

Look Up List Cache Cache result of queries against PRPC db (reducing db access improves performance) Disk Cache Dictionary Cache Conclusion cache Disk & memory cache Property, Property Alias, Field Value Property definition cache memory cache If a rule is in dictionary cache, then its not in rule cache. Static Content Cache Standard web browser cache Disk Cache Store 3 types Rule-File-Binary, Rule-File-Text, Rle-File-Form System pulse Always run in all environments SMA shows the time and date of the most recent pulse Pega-RULES agent Flagging a rule as dirty in cache Doesnt really synchronize the rule cache, simple flags Always run in all environments Local lookup list cache deletions Each node must be updated w/ rule changes E.g. saving a rule change will trigger, register change in pr_sys_updates cache, all nodes record in this table Once per minute, the pulse on each node wakes up and queries the table standard PRPC agent Blob

pzPVStream not always required to have compressed storage efficiency Encrypted security Contains complex data structure flexible

17

Use Log File change prlogging.xml enable logging for an activity ran by an agent; Use Log File change prlogging.xml if logging for an activity is not sufficient, set the Log Levels to DEBUG for the agents themselves (i.e. com.pega.pegarules.engine.context.Agent) this can be done in SMA Log-Agent this is only useful for debugging SLA agents.

Rule types in PRPC that support CMT Java, JMS, EJB (EAR Deployment)

JDBC Transaction Controlled by the transaction manager of DBMS. When PRPC is deployed as an EAR file, it can participate in both Container Managed Transaction and Bean Managed Transaction provided you are using a JDBC driver with XA support.

prconfig.xml Timeout intervals Configure Alert Files (prconfig.xml) Encryption is configured here Configure DB connectivity user/passwd, connection info. SMA can allow viewing prconfig.xml (but not editing) Located in APP_INF\lib\pega\prresrources.jar in EAR deployment Located in WEB-INF\classes for WAR deployment prlogging.xlm Set the level of logging details Tools > Logging Level Setting or use SMA to change the logging level. PRPC Threads (PRThread) Different from java threads Each requestor has one OS thread but can have more than one Thread Thread = namespace which allows a Requestor to have separate clipboard page that do not interact each other. Bean Managed Transaction PRPC directly uses the Java Transaction API (JTA) to begin, commit, or roll back changes. That is, PRPC manages the transaction. Calling methods such as Commit and the Obj-Save and Obj-Delete methods with the WriteNow parameter selected cause operations to occur immediately. Container Managed Transaction E.g. WebSphere, WebLogic PRPC participates as one resource in a distributed transaction. Commit and WriteNow parameters are ignored all operations are deferred until the container completes the transaction PRPC does not manage the transaction. The application server (container) - WebSphere, WebLogic, etc. authenticates the user and PRPC just lets them in

When PRPC is deployed as WAR file, PRPC uses DB commits without transactions. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*Rule Resolution & Achieving Reusability



PRPC Base Product Layer do not define enterprise wide rules here Enterprise Reuse Organizational Layer Enterprise-wide extension to Work- classes E.g. MyCo-, MyCo-FW-, MyCo-Data-, MyCo-IntDivisional Reuse layer e.g. MyCo-Div1-DataFramework layer stores base rules for a given application; serves as the basis for an implementation; can stand on its own; the actual mapping of the application to production database tables occurs in the implementation layer; e.g. create connect rules and any activities that call Connect rules in the Framework layer; contains both Customer-Built Framework and Pega-Built Framework; include templates for the service rule/service package with the CBF that can be cloned for each implementation; FL is a generalized layer that enables assets to be used across implementation; FL is created by Application Accelerator; How to improve reusability Document Parameterize Implementation Layer class group, work classes; mapping to the production db happens here; IL is the specialized layer where assets specific only to the implementation are placed; IL is created by Application Accelerator. Primary purpose of ruleset is deployment 10 steps of rule resolution Check cache

18

Gather all rules purposes Discard Availability=No Discard RS & vrsions not on Requestors list (RuleSet) Discard Rules not in the class hierarchy (class) Rank the rules (Class, RS, Circum) Cache them Find BEST instances (circumstance) Ensure BEST instances NOT Blocked Check if Requestor has permission

Application Accelerator supports creation of Frameworks & Enterprise Reuse AA creates generalized & specialized layers 4 Layers PRPC Shared Product OOTB PRPC Enterprise Shared Product a library of extension to PRPC Generalized App Layer generic base application Organizational & Specialized App Higher the layer, more potential for reuse Reuse Work- activities, Util function, activity & flow defined in generalized layer Save As is not reuse Specialization locale, business line, product line, client, date By Class security, reporting, work object persistence; class takes precedence during rule resolution By RuleSet promotion purpose By Circumstance having a small # of different values, property-level, date, date range; happens after Class & RS resolutions Circumstance Specialize based on a property and/or a date. Circumstance resolution occurs after class and ruleset resolution Base rule must exist before a circumstanced version can be created Property circ. e.g. .MembershipType=Gold

Date circ. compares a single property on the clipboard to the as-of date on the rule. The rule that has the most recent as-of circumstance date is selected. A future date will not be used the as-of-date is the nearest before the specified date value Date-range circ. Date-Range circumstance allows you to use the current system time to determine which rule is applicable for this date range. Base rule is selected if none of the conditions matches.

Before 5.2, higher RS overrules, After 5.2, circumstance in lower RS over rules (unless there is a base rule that overrules the circumstances in the lower RS) Before PRPC 5.2, a rule in a higher RS version would rank higher than one in a lower RS version regardless of the circumstances. After PRPC 5.2, all rules with circumstances will rank ahead of unqualified rules even if the unqualified rule is in a higher RuleSet version (assuming rules with the same RuleSet name and the same class) Base Rule Flag - The base rule flag can only be applied to noncircumstanced rule instances. The base rule flag will prevent any circumstanced instance in the same class and RuleSet below a RuleSet version from being found by rule resolution. In essence the base rule flag allows PRPC to behave similar to how it behaved before version 5.2. BEST Practice Define activities that create work objects in the implementation layer Create connect rules and any activities that call connect rules in the Framework Layer. Is not to have work object classes in production rulesets. Building many steps in an activity is BAD. Parameterizing class names, activities, sections, HTML properties, improve quality of your rules Improves reusability Building MANY steps in activity poor reusability Good way to minimize need for hard-coded class names use the new class parameter on the Page-New method & pass in a dynamic value from clipboard property Specialization by RS can be problematic because RS lists are static & specialization can limit changes to what user can do.

Once you have created the first circumstanced rule, then choosing Save As to create additional copies of that rule will display a dropdown with the previously-chosen property name, instead of a field with a SmartPrompt.

19

If the .class file is not found, the Rules generates source code is compiled stored in the caches (Rule Assembly Cache), loaded via the Java class loader & executed It is not possible to save a rule into ruleset that is a prerequisite for the class the rule applies to. It is best practice to use only the major and minor version numbers in access groups when specifying production ruleset Its best practice to have only one unlocked Rule-Ruleset-version per Ruleset for a single release of a project in development. Ruleset version consists of three parts: major, minor, revision (03-01-02) Production RuleSet Associated with access group and defined separately from RuleSets in application rule. Unlocked so that modifications can be made to an application while it is running on a production system. Best practice is not to have work object classes in production RS. Best practice is, a production RS which is referenced in an access group should also be listed in the application rule specified in that access group. E.g. a manager may want to modify the selection criteria for reports. Anyone can run a report in a locked RS, but managers cannot create new reports unless they have access to an unlocked RS. Application RuleSet Locked for deployment to another system. Availability = Blocked rule Blocked rules are still included in ZIP archive

Availability = No/Draft
The rule is ignored one rule only same rule in the next higher version or in higher AppliesTo class will be selected. Withdraw = this option withdraws the rule and all rules in lower version of the same ruleset where No/Draft ignores just one specific rule Ah, this makes sense e.g. you are creating an activity using No/Draft option you can compare with the rule in a different version during debugging

Blocked vs. Withdrawn rule A blocked rule and a withdrawn rule are both invisible to rule resolution(really? Thought rule resolution finds blocked rules). Similarly, both blocked rules and withdrawn rules prevent lower-version rules with the same RuleSet and visible key from being selected by rule resolution.

However, a blocked rule may also block other rules in any RuleSet, and a blocked rule stops rule resolution from finding rules in higher Applies To classes. A withdrawn rule affects other rules only in one RuleSet and one Applies To class.

if you want rule resolution processing to halt (with no rule found) when it encounters this rule throws an exception Cannot configure prconfig.xml to ignore the exception

Availability = Withdrawn rule If you need to delete a rule in a locked ruleset version, it is not possible to delete. But, you can withdraw the rule. Those rules are removed from consideration during the rule resolution process all rules in lower version in same RuleSet and same AppliesTo class. Does not throw an exception ignored and processed.

Skimming Skimming does not delete any rules Tools > Rule Management > Skim a RuleSet. Skimming copies rules with availability Yes, No/Draft, Withdrawn, and Final exclude Blocked. Skimming simplifies the top most rule versions in a RuleSet after multiple iterative development cycles. For example, if the highest version was previously 02-21-06: After a major skim, the skimmed version number is 03-01-01. After a minor skim, the skimmed version number is 02-22-01. Rules in lower versions such as 02-21-05, 02-18-53, or 01-88-15 of the same rule are not copied by the skim operation. Rules in lower versions of the same rule are not copied by the skim operation. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

*Other
History what does it include? Time, Description, Operator, Flow

20

SLA agent processing Flow When a work is routed to a worklist When a work is routed to a workbasket When UpdateStatus Open, Pending, Resolved, etc. When a work object is created

External Class Declare Index cannot be defined, rule resolution does not work. ValueList and PageGroup can never be exposed as DB column even through declare index only pagelist works.

Garbage Collector Clean up memory no longer needed PegaRULES agent periodically forces some memory segments to be available for garbage collection using an activity (Code-.SystemCleaner) Use Page-Remove to unleash pages that are no longer needed. Garbage collection can be done via SMA this sometimes cause frequent and unwanted garbage collection operations that affects performance. Garbage collection log can be analyzed via PLA (PegaRules Log Analyzer) PRPC runs within a Java Virtual Machine (JVM) on the server computers that make up the system. Client-side validation Ensures that data entry on a work object form is correct before the form is submitted to the application server reduce HTTP traffic. Requires you to create a custom edit validate rule (Rule-Edit-Validate) define a Java routine. Edit validate processing occurs only later, when uses client-side format validation. Select Enable Client Side Validation? under the HTML tab of the Harness form. Requires to add a JavaScript validator in a Rule-HTML-Fragment rule named CustomValidators client-side validation uses JavaScript for format checking this exactly replicates the test performed by the edit validate rule this JS is added in the Scripts and Styles tab of the Harness form Edit Validate Rule Edit validate processing occurs only later, when an activity uses the Property-Validate method with that property or uses client-side format validation. Two different ways to invoke Edit Validate Rule Property-Validate Client-side format validation

21

You might also like