PEGA Activity and Its Methods

1,711 views 17 slides Jan 30, 2022
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

An activity rule consists of a sequence of
steps executed procedurally.
• Flow Automation shapes use
parameterized Activity rules
• Custom activity rules are created when
no other rule configuration is sufficient
• Typical use cases for using activities are:
– Integration
– Writing to ...


Slide Content

PEGA Activity And it’s Methods

Overview An activity rule consists of a sequence of steps executed procedurally Custom activity rules are created when no other rule configuration is sufficient Typical use cases for using activities are: – Integration – Writing to Log file – Creating a case

Definition Activity rules are most like traditional computer programs in that they consist of a sequence of steps that are typically performed in order. Each step contains a primitive operation known as a method. An activity rule can perform computations, create, update, or delete objects.

When to use an Activity? Operations when you need to write an Activity There is no better technique available to do the necessary processing - Saving records to the database with special requirements - Deleting records from the database - Background processes - To use the property-set messages or page-set messages

Description – Structure of Activity step A – Step number B - The Label provides an identifier for the step that can be referred to from other steps. You can also put two slash characters as a step label to indicate not to execute the step. C - The (Loop)Iteration allows setting up a loop through the elements of a Value List, Page List, Value Group or Page Group and performs the provided activity method on each value or each embedded page. D - The Precondition(When) provides a condition or When rule that, based on the result, causes the step to execute or be skipped. There is a list of actions you can select from to indicate what needs to be done when the condition or When rule result is either True or False E – Expand method to access to the parameters and options of the current method

Description – Structure of Activity step F - The Method indicates which activity methodthe step will execute. The “expand method” button is used to expand the parameters for the selected method or activity. G -The Step Page identifies a Page to be used as the context for referenced properties within the step. H - The Description is text that explains to other developers the action that the step is performing. As a best practice, always provide a comment for each activity step. I - The Transition (Jump) is similar to the Precondition. After the step is executed, a condition is evaluated. Based on the result, the activity may perform different actions such as jump to another step or exit the activity. J – Delete the step

Description – Common Methods Property-Set Used to set the value of one or more properties. Call Used to find and execute another activity. After the called activity completes, the calling activity resumes processing. Page-Remove Used to delete one or more named pages from the clipboard. If no page is specified, the page referenced by the step page will be removed.

Description – Common Methods

Activity – Parameters The Parameters tab is used to identify any variables serving as input or output parameters. The Parameters tab has three sections. 1. Parameters 2. Local Variables 3. Local Action A parameter page is a single page containing the parameter names and values for all the parameters that are passed into an activity

Activity – Parameters

Activity – Pages & Classes tab Use the Pages & Classes Tab to: • Specify the class of a new clipboard page. • Specify the class of an existing clipboard page. • Specify the class of pxResults, when looping

Activity – Pages & Classes tab Clipboard pages: • Primary page is a clipboard page which has the same class as the “Applies To” class of the activity (current context) • Step page becomes the primary page for the duration of this step's execution. (the step page becomes the new context)

Activity – Security tab The Security tab has few settings that allows to set who can access the activity and how. • Allow direct invocation from the client or a service? • The Require authentication to run checkbox, • The Activity type

Methods and Instruction Methods For Entire Clipboard Page Methods For Persistent Instances Methods For Connectors Load-DataPage obj-Delete Connect-REST Obj-Open Connect-SOAP Obj-Save Obj-Save-Cancel Property methods Methods For HTML and XML streams Apply-DataTransform Show-HTML Property-Remove Show-Page Show-Property Show-Sream

Methods and Instructions Other Property-Map-DecisionTable Property-Map-DecisionTree

Activity Usage Activity can be referred from different places. Based on the activity type configured in the security tab of the activity rule. • Flow – Utility shape • Flow Action – Pre-processing and Post-processing • Section - Use an action-set to call an activity in the "Actions" tab of a cell property. • Activity - Use Call instruction. • Data page – Source / Save / PostLoadProcessing • Service rule – Service activity

Thank you Any Queries?