Pages

Wednesday, 28 February 2018

Fetch Single Record from Database Table using PEGA PRPC


Part 1: Create two sections
first section will ask user to enter username
second section will display user details
Create activity will fetch the data from the database using the username provided in section 1




Part 2: create a flow and configure sections and activity and test the flow.




Here in the Classes and Pages configuration you need to use primary as reference for the Data class and any user-defined name to Work Class.
Step1: You need to use Object-open method to fetch the single object from DB. In the parameters, you need to select the data class and need to provide primary key property name.
You need to use Work class reference in steps page to debug

Step2: You need to use property set method to map values from Data class to Work class. You need to use Work class reference in the steps. In the parameters, you can map the Data class properties in Properties name and Work class properties in properties values.

Note: To insert and retrieve single object you need to write the activity in Work class side only.


Inserting a record into Database table with PEGA PRPC


Part 1: creating a case
creating data model properties at Data class (Data table)
creating data model properties at Work class
creating sec



Part 2: creating a flow action
creating a acitivity
configure stages and steps in cases
configure flowaction and activity using shapes inside a flow




Here is sample Work Flow in step by step
  • Configure case (Stage & Processes)
  • Add a Data Table (DTO in java which will creates table also)
  • Add a Data Model (BEAN in java, create properties should match with the same DTO properties)
  • Section (Add multiple layouts and properties)
  • FlowAction
  • Activity
  • Flow
  • Test the Case


Note: Any help related any rule / property / flow… you will find under Actions dropdown > Get Help.
Create Activity Rule:
Pages and Classes: You need to give pyWorkPage for Work class (mandatory)
For Data class you can use any name to use it as reference

Step:
Step 1: You need to use property-set method to set the values to the data class from work class, and use “Data Class reference” and in the parameters tab you need to map the Data class properties in Property name and in property values you can give Work Class properties.
Step 2: You need to use object-save method to insert the record in the DB.
Security: Here you need to choose “Utility” under action to visible the activity rule in Utility Shape.
Note: Here we need to create activity in Work class itself. You can debug weather the values from Work class are set to clipboard server or not using pyWorkPage from clipboard tool.
If you want to check weather the values are set to server or not in custom page name you have given for Data Class config in “Classes and Pages” in Activity.

Tuesday, 20 February 2018

Things you need to know before proceeding with your first CURD actions in PEGA


Here is sample Work Flow


  • Configure Case: Cases can be configure while creating application or can be done from Cases Explorer. Which consists Stages and Steps. Here steps are nothing but a flow.
  • Data Table: Need to create properties in Data class, which acts as a column in the Database.
  • Data Model: Need to create properties in Work class to bind with UI components.
  • Section: Where you will assemble all the UI components
  • Flow Action: Configure Section here to add any page level validations
  • Activity: Your business logic will happen here
  • Flow: you can configure your flow here
  • Test the Case: Use tools like Clipboard, UI tree, UI inspect, Tracer.
Note: Any help related any rule / property / flow… you will find under Actions dropdown > Get Help.



Stages & Processes:
              You can go to Process by clicking cases types and click on any case; you can change the name of the Stage. Inside Stage, you can define any number of processes (steps). Each step should have one flow.

There are two types of Flows
  • Process Flows/ Starter Flows/ Straight through Flows/ Main Flows
  • Screen Flows
All 4 possible ways are allowed, like in Process FLOW you can call Process/Screen Flows
In Screen Flows you can call Process/Screen Flows.

Flows/ Starter Flows/ Straight through Flows/ Main Flows
           Right click on any steps click on open then you can see Process Flows. It is called Modular Tool, which has pre-defined shapes.

We use around 7 to 8 shapes in PEGA.

  • Start: Begin the flow
  • End: end the flow
  • Assignment:
      • Developer : Adding a Flow Action
      • Business Analyst: will assign the task to developer using router and SLA.
  • Subprocess:  used to call one flow in another flow
  • Decision: used to call a condition in flow 
          • Decision Table
          • Decision Tree
          • Map Value
          • When
  • Utility:  used to call method inside flow
  • Integrator: connectors (inside connectors we need to use  methods with Activity Rule)

In both Flows, all shapes are same but behaviour is different for few shapes
  • Assignment shape: In Process Flow, we can define Flow Action in assignment shape connector, but in Screen shape, we can see only empty inside connector. We need to give in the Assignment shape only.
  • Routing, Service Level and Notifications are available in Screen Shapes but not there in Process Flows.
  • Start shape: In Process Flow, it is empty. In screen, flow you can configure predefined screenplay types, means you can change the appearance of the page by using predefined screen flow type.
  • Integration Shape: available only in process screen, not in screen flow.
  • In process flow, you cannot navigate back flow. Only forward flow you can navigate. Where as in Screen flow both front and back navigation is possible.
  • Work object will be created once after saving a flow, the work can added to the work group. It will automatically defined in the work group. So from the process flow it will generate case id, using that they will monitor the flow. Screen flows does not support work object. However, we can add screen flow to existing work object (process flow). Using subprocess shape, we can call the screen flows in the application.

Section:
           For every section, we need to add FLOW ACTION In Flow Action you need to configure section Under Flow Action > you can set page level validations. Page level business logic can set in Action tab

Activity:
          Activity rule comes Under Technical Rule Category, Using this we can build business logic. 

We can use Activity Rule in 10 different ways. 

  • Utility Shape
  • Section
  • Property
  • Flow Action rule
  • Harness
  • Onchange
  • Connectors
  • Services.
Explanation of Activity Rule Tabs

  • Steps:  
            We can define methods. Only Method is mandatory in this page, rest of them are optional.
      • Label: You can either use // to comment that method or you use this to pass parameter.
      • Loop: to use loop condition then you can use this
      • When: if you want to call this method on any pre condition then we can use
      • Parameters: What type of parameters are mapping to which properties need to give it here.
      • Method: use the existing method
      • Step: to debug the application 
      • Description: used to provide info of that method
      • Jump: if you want to jump control 

  • Pameters: You can provide temporary variable here in this tab
  • Pages & Classes: Pages are used for debugging purpose and also reference purpose on what class we can performing the debuggers like Work or Data classes. Pega by default has some page names. 
      • pyWorkPage: Generally for the work class we will give. It is case sensitive.          PEGA contain internal server (Clipboard tool/ Testing and debugging tool). Whenever we enter any data in form, first the data will be save in clipboard tool before saving to Database.You need to use pyWorkPage as a reference for insert operation to the Work class.You can give any page name to Data class while inserting.We will use pyWorkPage while inserting records.Using this you can perform server level debug.These will acts as reference to the Work and Data classes in Steps tab.
      • Primary: we will give this to Data class reference while fetching single record.
  • Security: Controlling the usage of the activity

 You can configure any number of methods in this Activity. Execution will start from order top to bottom. If you want you can jump from one method to another method. Methods are predefined in PEGA; we need to provide inputs/parameters to it.

Different types of methods are there:
  • Connector methods
  • Obj methods
      • Obj-save: insert/update
      • Obj-open: Fetch single record
      • Obj-browse: Fetch multiple records
      • Obj-delete: Delete record
  • Property methods
      • Property-set method
      • Property-map-decision-table
      • Property-map-decision-tree
      • Property-map-value/value-pair
  • Page methods
  • RDB methods
  • Show methods
Flow: 
        You can create Flow from Cases Explorer or from Process rule category.

Test:
       Use the clipboard debugger tool to debug the values and the flow.

Monday, 19 February 2018

PEGA - Operators, Class Groups, Classes, Inheritence, Rules, Stages Explanation

      After creating the application in the backend PEGA will provide all the necessary configurations and provides by default 3 Operators.


  • Admin: It is used as a Developer portal
  • Manager: Business Analyst will use to assign/route the requirement to the Developer.
  • User: End user.

As a developer our role will be Admin.

In PEGA we have 3 different Classes
  • Work Classes
  • Data Classes
  • Integration Classes

If you compare these classes with Java classes then you can relate very easily.. Lets see how
Work classes are like POJO classes which holds the data on UI.
Data classes are like DTO classes which holds the columns of Database.

both Work and Data classes are Concrete classes and Integration classes are Abstract classes which don't have any implementations.

Note: Abstract classes are ends with '-'

All these classes are classified into 3 class groups in PEGA.
  • Is a Classgroup
  • Belongs to Classgroup
  • Doesn't belongs to Classgroup


Work Pool type is “is a class group”
All classes are under Work Pool are “belongs to class group”
Data classes are “doesn’t belong to class group”

Note: You can create sub classes only in a class, which is “is a class group”

Inheritance:

In PEGA every class is derived from @baseclass. You can see the hierarchy by right click on class and click on inheritance. There are two types of inheritance in PEGA.
  • Pattern Inheritance – System generated inheritance
  • Direct Inheritance – user generated Inheritance
Rule: Rule is nothing but a building block. Here a block means some functionality, UI whatever. Which will define the behaviour of that part.

Note: Rule type is a concrete class derived from a base class called Rule-

Ruleset: Rule set is a container of rules. 
All these rules will be created under Application > Class name > Ruleset(nothing but application name) > and based on the rule category. You can see after deploying the application. 

Below are the list of Rule Categories:



Note: These rules will be stored in Ruleset under Class instances.

Case: Case is a Module in terms of application. A unit of work to be done.
PEGA will automatically create concrete classes using the Cases, which you are defined at the time of creating a project in PEGA.

Process: Process is represented as a Flow in PRPC.

Class: class is a container of all the rules in PEGA. 


Thursday, 15 February 2018

Creating a new PEGA Application guidance

Creating an Application in PEGA

To create a new Application in PEGA, Go to DCO or Application Express menu > select New Application wizard.

In this wizard you need to provide few details like

Application Properties & Organisation Properties

 You need to provide name of the application and the description and the organisation.




Business Objectives:






































Cases Types







Data Objects






Once clicks on create PEGA will build application skeleton along with server (tomcat by defaul) and db(postgresql by default).

By default, it will create 3 operators.

  • Admin (Developer Portal)
  • Manager
  • User


Wednesday, 14 February 2018

PEGA Installation and Panels Explanation


PEGA Installation:

PEGA Installation is very straight forward. JDK (PEGA was built using Java), Server and DB will comes with the PEGA zip file. You can download get the download of PEGA Personal Edition Software from here . You will get mail with the link to download from PEGA after subscription. Simply follow the wizard and finish the installation. You need to make sure that the existing java in your machine compatibility with the pega version.

There are two editions of PEGA software.



  • Personal Edition
  • Enterprise Edition


There are very little differences between these two editions. You can configure any server and db in Enterprise Edition but not in Personal Edition.

After installation you need to start and login to the application from the icons will appear on the desktop post installation.


Default Login details:

  • Username: Adminstrator@pega.com
  • Password:  install

PEGA Tool Explanation:



You can the above image, total screens are divided into 4 panels
  • Header Panel
  • Explorer Panel
  • Work Panel  
  • Footer/Toolbar Panel
Header Panel


  • Designer Studio: Application settings, deployment tools, data table creation, User Interface gallery, reporting settings, integraraion, services, resources, org settings, security settings, connection wizards, email wizards.
  • DCO (Direct Capture of Objectives) – Application Express
  • Launch: There are 3 operators/portals by default will provide by PEGA. 
      • Admin/Developer
      • Manager 
      • User
  • Create: create will be used to running the application
  • Search: To search anything in PEGA
  • ChekIn/Checkout: version control in PEGA
  • Recent: to see recent opened activities
  • Operator: you can see the data related to Operator. 
      • Access Group: is tells us that which portal access does the operator has and which roles he has and so on…

Explorer Panel

·         Recent: recent activities
·         Cases: Shows the modules in the application.
·         Data: all the data tables will be display here
·         App Explorer: All the rules creation will be happen from here.
·         Records: It shows the Hierarchy of the apps
·         Private: same like checkIn/checkout
·         Favourite: bookmarked items will be shown here.

Toolbar Panel

·         Tracer:
·         Clipboard:
·         UI Inspector:
·         UI Tree:
·         Performance
·         Alerts
·         Inspector Pref

Friday, 2 February 2018

PEGA Topics For Your Reference

Below are the PEGA concepts that you need to focus to become a good PEGA Developer.


  •          Explorer’s in PEGA
  •        Introduction to Data Model              
·         Creating Data Tables
·         Types of Properties
·         Creating Properties
·         Change the Appearance of a property
·         Create Embedded Properties ( PEGA 1.6 version)

  •          Introduction to User Interface and Form Design
  •          Introduction to Process Definition
  •          Working on Stages & Processes
  •          User Interface
·         Create a section
·         Create a section containing Multiple Layouts
·         Adding a section to a Flow Action
·         Calling another Section in a Section
·         Selecting the layout
·         Creating Flow Action
·         Creating Harness

  •          Process Definition
·         Different Shapes used in Flow & their purpose
·         Create main Flow/Process Flow
·         Create a Sub Flow/Screen Flow
·         How to run the flow or creating work object
·         Create Tabbed/Tree navigation Screen Flow
·         Call a Sub Flow from another flow or from Same Flow
·         Design and implement Screen Flow
·         How to select Screen Flow types

  •          Advance UI
·         Add Image/Icon/Links
·         Apply Dynamic Fetch
·         Calling Data Page
·         Repeating Layout and Tabbed Layout
·         Conditionally display a section

  •          Activities and Methods
·         Explain the purpose of different tabs in Activity
·         Understand purpose of Pages & Classes
·         Different Methods used in Activities
·         How to Call Activity from another activity
·         Different ways to call Activities

  •          Validations
·         Types of validations
·         Rule-Edit-Validation
·         Rule-Obj-Validation
·         Constraints
·         Difference between Rule-Edit-Validation and Rule-Object-Validation
·         Difference between ROV & Constraints

  •          Decision Rules
·         Decision Table
·         Decision Tree
·         MapValue
·         When
·         Calling Decision Rules in Flow & Activity
·         Calling Decision Rules in Expressions

  •          Declarative Rules
·         Declare Expressions
·         Declare Constraints
·         Declare On Change
·         Declare Pages/Data Pages

  •          Advanced Activities
·         Create and Activity with a precondition and a Transition
·         Create and Activity to populate a dynamic Select
·         Creating activity for calling Integration

  •          Assigning to Work
·         Introduction on Routing
·         To Work List
·         To Work Basket

  •          SLA (Service Level Agreements)
·         Define an SLA
·         Assigning SLA to Assignment

  •          How to Send a Correspondence (E-mail)
  •         Configuring E-mail
  •          Work Parties
·         Creating Work-Party
·         Adding Work-Party to Flow

  •          Agents
  •          Reports
  •          Migration/Deployment (Import & Export)
  •          Developer Toolbars
·         Clipboard
·         Tracer
·         UI Inspector
·         UI Tree
·         Where Am I

  •          Documenting the Application
  •          Connecting to External Database Using Connect-SQL
  •          Configuring Web Services (SOAP)
  •          Integration Connector & Services (SOAP)
  •          New Features in PEGA 7
  •          Difference between versions
  •          PRPC Guardrails
  •          Deployment

·         Other frameworks integration with PEGA. Like Case tool…