Posts

Showing posts from January, 2024

Edit Validate Example 5 - Comma Separated Value

Image
 Hi All, In this blog we will see Edit Validate Example 5 Java Code boolean valid = (theValue!=null) && (theValue.length()>0); if(valid) { try { String MultipleGUIDNumbers = theValue.toString(); for(int i=0;i<MultipleGUIDNumbers.length();i++) { if(!(MultipleGUIDNumbers.charAt(i)>='0' && MultipleGUIDNumbers.charAt(i)<='9' || (MultipleGUIDNumbers.charAt(i)==';'))) { theProperty.addMessage("Please Enter Numeric Value"); return false; } } String  GUIDNumbersArray[] = MultipleGUIDNumbers.split(","); if ( GUIDNumbersArray.length>20) { theProperty.addMessage("Only 20 Values are Accepted"); return false; } for (int i=0; i<GUIDNumbersArray.length;i++) { if(GUIDNumbersArray[i].length()<8 || GUIDNumbersArray[i].length()>9) { theProperty.addMessage("Booking contract number should be of 9 digits"); return false; } } } catch(java.lang.Exception ex) { theProperty.addMessage("Booking contract n...

Edit Validate Example 4 - ValidMultipleEmailAddress

Image
 Hi All, In this blog post we will see edit Validate example 4 - ValidMultipleEmailAddress Follow Below Steps Java Source boolean valid = (theValue!=null) && (theValue.length()>0); if (valid) { try { String MultipleEmailAddress = theValue.toString(); String EmailAddress[] = MultipleEmailAddress.split(","); if(EmailAddress.length>10) { theProperty.addMessage("Only 10 email address are accepted"); return false; } for(int i = 0; i<EmailAddress.length;i++) { javax.mail.internet.InternetAddress emailAddr = new javax.mail.internet.InternetAddress(EmailAddress[i]); emailAddr.validate(); } } catch(javax.mail.internet.AddressException ex) { theProperty.addMessage("Enter a valid email address"); return false; } } return valid; Thank you!! Will see you all in next blog post 😊. 

Edit Validate IsValidInteger Example 3

Image
 Hi All, In this blog we will see example 3 Follow below steps ID = IsValidInteger Java Source try { Integer.parseInt(theValue.toString()); } catch(java.lang.NumberFormatException  ex) { theProperty.addMessage("Please enter a valid number, possible cause are"); theProperty.addMessage("1. The length of entered number is not valid. 2. The entered number contains a decimal value "); } return true; Thank you!! Will see you all in next blog post 😊. 

Edit Validate ValidInputOnlyDigitsAndSemicolonAllowed Example 2

Image
 Hi All, In this blog we will see how to used edit validate example 2. Follow Below Steps ID = ValidInputOnlyDigitsAndSemicolonAllowed Java  Source for (int pos = 0 ; len = theValue.length();  pos<len; ++pos) { if(!Character.isDigit(theValue.charAt(pos)) && theValue.charAt(pos)!=';') {    return false; } } return true; Thank you!! Will see you all in next blog post 😊. 

Edit Validate 13 Digits Example 1

Image
 Hi All, In this blog we will see example 1 of Edit Validate Create Edit Validate Java String MCEID = theValue.toString(); if(MCEID.length()!=13) { theProperty.addMessage("Please enter MCE engagement of 13 digits"); return false; } return true; Thank you!! Will see you all in next blog post 😊

Declare Trigger Example 2

Image
 Hi All, In this blog we will see example 2 of declare trigger. Follow below steps  1) First create declare trigger CL = C-C-Art-Work ID = SFChange Triggers {TAB}  Trigger when an instance is Saved and ...        { Other options = Deleted, Saved, Committed Save, Committed Delete, Saved and ...} ..One of these properties was modified .SFCFA Trigger activity Name = DeleteDeliverablesWhenNoSFC  { Parameter =>  InsKey = .pzInsKey } Execute = In Background On Copy { Other option is Immediately } Activity Steps 1) When  {checked} Enable condition before this action Param.InsKey!=""                       if true = Continue Whens                      if false  = Exit Activity .SFCFA=="SFC"                  if true = Exit Activity             if f...

Declare Trigger Example 1

Image
 Hi All, In this blog we will see example 1 of Declare Trigger. Follow below steps 1) Create Declare Trigger CL = C-C-Art-Work-CA ID = OnCurrentPhaseDisengage 2)  Triggers {TAB} Tigger when an instance is Saved and ...    { Other options = Deleted, Saved, Committed Save, Committed Delete, Saved and ... } ..One of these properties was modified 1) .CurrentPhase Condition When = IsCurrentPhaseDisenage Trigger activity Name = DisengagedEmail Execute = Immediately    {Other option = In Background On Copy } Activity 1) Create activity CL = C-C-Art-Work-CA            ID = DisengagedEmail 2) Define Pages & Classes CaseList          Code-Pega-List CaseList.pxResults             C-C-Art-Work-CA 3) Define Steps 1) When {checked} Enable conditions before this action When = .DisengageMailSent == true      if true = Exit Activity       if false...

Declare OnChange Example

Image
 Hi All, In this blog we will see example of Declare Trigger. Follow below steps Step 1:  Create Declare OnChange CL = C-C-Art-Work-T ID = OnChangeOfTStatus Step 2: In OnChange Properties Properties To Watch   1.   .TUStatus Conditions When = Always Choose Action = Call Activity    {Note:- Second option is Suspend work Object} When True Run Activity         OnChangeOfTStatus  {No Parameter } Activity Create Activity  CL = C-C-Art-Work-T             ID = OnChangeOfTStatus Activity Steps 1) Property-Set .PreviousTStatus = .TStatusShadow .TStatusShadow = .TStatus 2)  Apply-DataTransform Data Transform = SetPreviousStatusStartDate Data Transform CL = C-C-Art-Work-T ID = SetPreviousStatusStartDate Definition {TAB} 1)  Set         .PreviousStatusStartDate            equal to            ...

Declare Expression Example 3

Image
 Hi All, In this blog we will see example of declare expression. Create Declare Expression CL = C-C-Art-Work-CA ID = .NextSignOffDueDate Expressions Build Expressions IF  .IBSignoffDate       has   a  value AND   .AMServiceLevelSold  =   "Standard" Then set Next Sign Off Due Date = Value of         @addToDate(.IBSignoffDate,"180","","","") Otherwise  set  Next  Sign Off Due Date = Value of    "" Thank you!! Will see you all in next blog post 😊.

Declare Expression Example 2

Image
Hi All, In this blog post we will see example of declare example.   Follow below steps Create declare expression CL = C-C-Art ID = .ExpectedTFiscalQuarter 1) IF   .ExpectedTUDate  != "" Then set  Expected TU Fiscal Quarter = Value of     D_GetQuarterForDate[FiscalDate:ExpectedTUDate].pxResults(<LAST>).CFQUARTER Otherwise  set  Expected TU Fiscal Quarter = Value of   "" Thank you!! Will see you all in next blog post 😊.

Declare Expression Example 1

Image
 Hi All, In this blog post we will see example 1 of declare expression. Follow below steps:- 1) Create declare expression CL = C-C-Art-Work-CA ID = .SignStatus RS = A:01-01-63 2)  Overview Build Expressions IF    .AMServiceLevelSold     has value AND  .AMServiceLevelSold   =  "Standard" AND   .IBVSignoffDate     has a value AND   @differenceBetweenDays(@getCurrentDateStamp(),.IBVSignoffDate,false,Default)<=180 Then  set  Signoff   Status = Value of           "Signed Off" Otherwise set  Signoff  Status = Value of     "Never Signed Off" Thank you!! Will see you all in next blog post 😊.

Operators DataPage

Image
 Hi All, In this blog post we will see creating data page to get operator details. Data Page Name = D_OperatorsList Definition Structure = List Object Type = Index-Operator Mode = Read-Only Scope = Node Data Source Source = Report definition           Name = OperatorsList  {checked} Pass current parameter page Load authorization Access Group = Art:Administrator Refresh Strategy Reload if older than        Days = 1 Page options {checked} Clear pages after non-use Report definition ID = OperatorList CL  = Index-Operator Query A1.pyLabel .pyLabel A1.pyUserIdentifier A1.pyEmailAddress A1.pyUserName Edit filters F1 AND F2 F1    pyAccessGroupAdditional      is equal      "A:C" F2     A1.pyUserIdentifier               Is not equal    "Model_CA" {checked} Remove duplicate row Data Access Class Joins Prefix = A1 Class Name = Dat...

Bulk Update using Excel Binary File And Activity

Image
 Hi All, In this blog we will see how we can use binary excel file and activity for bulk update. Follow Below Steps:- Create Excel file  having following columns. In excel, in first row put following headings:-   Case ID , T Event ID, T Name, Quarter, ExpectedTDate, TStatus,  In second row put following {.pxResults().pyID} {.pxResults().TUEventID} {.pxResults().TUName} {.pxResults().TrueUpQuarter} {.pxResults().ExpectedTUDate} {.pxResults().TUStatus} Create Activity now Step 1   First Create Activity ID = TUpdate CL = Data-Portal Step 2    Define Pages & Classes UploadPage                       Code-Pega-List UploadPage.pxResults            C-C-Art-Work-T WorkObjectToCreate               C-C-Art-Work-T TUDeliverables                   Index-C-C-Art-Data-DeliverablesL...

Setting Assignment of Case Using Activity

Image
 Hi All, In this blog post we will see how to set assignment of cases using activity. Follow below Steps Step 1:  Create Activity CL = C-C-Art-Work-CA ID = SetCAssignment Step 2:  Define Pages & Classes UpdateCAssignmentPg               C-C-Art-Work-CAM Step 3:  Define Steps In Activity 1)  Page-New            StepPage = UpdateCAssignmentPg 2) Obj-Open             StepPage = UpdateCAssignmentPg OpenClass = C-C-Art-Work-CA Lock = checked ReleaseOnCommit = checked .pyID = "C-3018" Jump When = StepStatusFail       if true = Exit Activity        if false = Continue Whens 3) Property-Set          StepPage = UpdateCAssignmentPg .CAssignement = "Assigned" 4)  Call Save              StepPage = UpdateCAssignmentPg 5) call commitWithErrorHandling    ...

Queue Processor Config Practical

Image
 Hi All, In blog post we will see some of configs in Queue Processor. ID = CalculateAnnualDCommission Definition  {TAB} All queue processors are rule resolved against the context specified in the System Runtime Context. Enable Queue Processor Associated with node type = BackgroundProcessing When to process = Immediately Number of threads per node = 10 Default value is 1 Processing activity Class = C-C-Art-Work-T Activity = CalculateCAnnualDCommission Processing retries Max attempts = 5   {Default value is 3} Initial delay (in minutes) = 30     {Default value is 1 minute} Delay factor = 2.0        {Default value is 2} Alerts and health check configuration Long running queue processor threshold = 6000 milliseconds Interval after which a node with long-running queue processor is marked as unhealthy and is restarted 900 seconds Maximum number of messages waiting in ready-to-process state before alert is send 5000 messages Thank you!! Wi...

Setting to property to Yes In All Cases Bulk Update Activity

Image
 Hi All, In this activity we will see how to update bulk cases. Follow below steps Step 1: Create Activity ID = UpdateCPCases CL = C-C-Art-Work-CA Step 2: Define Pages & Classes CaseList        Code-Pega-List CaseList.pxResults          C-C-Art-Work-CA Case         C-C-Art-Work-CA Step 3: Define Steps 1) Obj-Browse                Step Page = CaseList Page Name = CaseList ObjClass = C-C-Art-Work-CA MaxRecords = 10000 UseLightWeight = checked Logic = A OR B A {checked}  .pyID     Contains     "CXEA" B {checked}  .pyID      Contains        "CPLUS" 2) Loop = For each embedded page Property-Set            CaseList.pxResults    {Step Page} Param.CaseID  = CaseList.pxResults(<CURRENT>).pyID 2.1) Obj-Open              ...

Setting Property Value in Work Class Page Using Activity

Image
 Hi All, In this blog we will see how we can set Property Value in Work Class Page Using Activity. Follow below steps Step 1:  Create activity CL = C-C-Art-Work-CA ID = SetPropInWork Step 2: Define Pages & Classes CaseList    Code-Pega-List CaseList.pxResults        C-C-Art-Work-CA Case         C-C-Art-Work-CA D_SavableCACase        C-C-Art-Work-CA D_SetNewestIBRenewal        Code-Pega-List D_SetNewestIBRenewal.pxResult        C-C-Art-Data-IBRenewal Step 3: Define steps 1) Obj-Browse       StepPage = CaseList 2) Loop = For each embedded Page     Property-Set        Page = CaseList.pxREsults Param.CaseID = CaseList.pxResults(<CURRENT>).pyID 2.1)  Property-Set Param.NextIBDate = D_SetNewestIBRenewal[CaseID:Param.CaseID].pxResults(1).NextIBRenewalDate 2.2)  When  Param.NextIBDate ! =...

Update Status In Old Cases Using Activity

Image
 Hi All, In this post we will see how we can use activity to update property in old cases. Follow below steps Step 1: Create Activity ID = UpdateOldCasesTStatus CL = C-C-Art-Work-T Step 2: Define Pages & Classes CaseData       C-C-Art-Work-T CaseList            Code-Pega-List CaseList.pxResults        C-C-Art-Work-T Step 3: Define Steps 1) Obj-Browse                       Step Page = CaseList PageName = CaseList ObjClass = C-C-Art-Work-T MaxRecords = 10000 GetRowKey = checked RowKey = pzInsKey UseLightWeightList = checked Logic = 1 AND 2 AND 3 1  {checked}     .pyID      Contains      "TU-" 2  {checked}    .TStatus          Is Equal   "Not Started" 3 {checked}    .pyStatusWork      Is Equal   "OPEN-Booking" 2) Loop = ...

Deleting Child + Parent Case Using Activity

Image
 Hi All, In this blog we will see how to delete child + parent case together. Step 1: First create activity ID = DeleteCase CL = C-C-Art-Work-CA Step 2: Define Pages & Classes CACasePg              C-C-Art-Work-CAM CAChildCasePg        Code-Pega-List CAChildCasePg.pxResults       C-C-Art-Work-CA-Booking CAChildDelete            C-C-Art-Work-CA-Booking Step 3: Define Parameters CaseID               String Step 4: Define Steps 1) Page-New      CACasePg 2) Page-New    CAChildDelete 3) Obj-Browse       CAChildCasePg PageName = CAChildCasePg ObjClass = C-C-Art-Work-CA-Booking MaxRecords = 1000 GetRowKey = checked RowKey = pzInsKey UseLightWeightList = checked {checked}  .pyID   Contains  Param.CaseID 4) Loop = For each embedded Page Property-Set        ...

Activity For Creating Indexes for Old Cases

Image
 Hi All, In this post we will how to create indexes for old cases. Step 1: Create an activity CL = C-C-Art-Work ID = OldCasesIndexes Step 2:  Define Pages & Classes InstanceList         Code-Pega-List CurrentInstance      $ANY Step 3:  Define Parameters ClassName  = Class of the instances whose indexes are to be recreated. Step 4: Write below steps:- 1) Obj-Browse          Step Page = InstanceList PageName = InstanceList ObjClass = C-C-Art-Work-CA MaxRecords = 15000 GetRowKey = checked UseLightWeightList = checked {checked}    pzInsKey         Value Only 2)  Loop = For each embedded oage               Step page = InstanceList.pxResults 2.1) Property-Set Local.insKey = .pzInsKey 2.2) Obj-Open-By-Handle               Step Page = CurrentInstance InstanceHandle = Local.insKey Lock = ch...

Delete Data From Index And Work Table In Pega

Image
 Hi All, In blog we will see how to delete data from 2 tables using activity. Follow below steps:- Step 1: Create Activity  CL = Index-C-C-Art-Data-DeliverablesList ID = DeleteCaseFromWorkAndIndex Step 2: Define pages and classes DeliverablePg         Index-C-C-Art-Data-DeliverablesList TCase      C-C-Art-Work-T Step 3:  Define Parameters TID pxInsIndexedKey pxIndexCount pxIndexPurpose Step 4;  Define Steps 1) Obj-Open            StepPage = TCase OpenClass = C-C-Art-Work-T Lock = checked ReleaseOnCommit = checked .pyID = Param.TUID Jump When = StepStatusGood        if true = Continue Whens    if false = Jump to later Step   E On Exception = E 2)  Obj-Delete                Step Page = TCase 3) call CommitData                Step Page = TCase Jump When = StepStatusGood  ...

Reopening Child Case In Pega

Image
 Hi All, In this blog we will see how to reopen child cases. First we need to create activity Step 1: Create activity CL = Work- ID = ReopenChildCases Step 2: Define Pages & Classes D_SavableBooking           C-C-Art-Work-CA-Booking ChildPg         =   C-C-Art-Work-CA-Booking Step 3: Define Parameters Key               String       Step 3:  Define Steps for activity 1) When  Param.Key!=""    if true = Continue Whens       if false = Exit Activity Obj-Browse PageName = CAChildPg ObjClass = C-C-Art-Work-CA-Booking MaxRecords = 500 UseLightWeightList = checked Logic = A A    {checked}      .pxCoverInsKey          Is Equal        Param.Key       {checked}       .pyID              ...

Calling Activity In Data Transform

Image
 Hi All, In this blog we will see how to call activity in data transform using @callActivity OOTB function. Step 1:-   Create Data transform ID = GetCaseDeliverables CL = Code-Pega-List Step 2: Pages & Classes Primary.pxResults         C-C-Art-Data-DeliverablesList pxResult             C-C-Art-Data-DeliverablesList D_CAMCase        C-C-Art-Work-CAM TestEditableCAMPage      C-C-Art-Work-CAM Step 3: Parameters CaseID                   String          Required = Yes          In/Out = In Step 4: Definition 1)  When @LengthOfPageList(D_CAMCase[CaseID:Param.CaseID].DeliverablesList) > 0 1.1)  Set      .pxResults     equal to   D_CAMCase[CaseID:Param.CaseID].DeliverablesList 1.2) For Each Page In     Primary.pxResults...

Pega Download Data In Excel Sheet

Image
 Hi All, In this blog we will see how we can download data in excel format. You can download excel template from below link. https://github.com/AbhiGit799/Pega-Excel-Binary-File Step 1:- Create Activity. Activity ID = DownloadUserDeliverables CL = Data-Portal Step 2:-  Define Pages & Classes CaseDeliverables                 Code-Pega-List CaseDeliverables           C-C-Art-Data-DeliverablesList D_GetCaseDeliverables         C-C-Art-Data-DeliverablesList Step 3:-  Parameters CaseID                  String Step 4:- Define Steps in activity 1) Page-Copy                  Step Page = D_GetCaseDeliverables[CaseID:Param.CaseID] *CopyInto = CaseDeliverables 2)  Loop = For each embedded page      Step Page = CaseDeliverables.pxResults Jump  When = StepStatusFail...

Delete Child Case In Pega

Image
 Hi All, In this blog we will see how to delete child case. Follow below steps:- Thank you!! Will see you all in next blog post 😊. 

Download User Data In Excel In Pega

Image
 Hi All, In this blog will see how to download data as excel. Follow below steps. Thank you!! Will see you all in next blog post 😊.

Calling Report Definition From Activity In Pega.

Image
 Hi All, In this blog we will see using report definition in activity. Follow below steps:- Call Rule-Obj-Report-Definition.pxRetrieveReportData @whatComesBeforeLast(whatComesBeforeLast((Param.HistoryID,'T'),'T') @(Pega-RULES:String).substring(Param.HD1,((@(Pega-RULES:String).length(Param.HD1))-8),@(Pega-RULES:String).length(Param.HD1)) @getCurrentDateStamp() @DifferencebetweenDatesInMonth(Param.HistoryDate,Param.TodayDat) Thank you!! Will see you all in next blog post 😊