Use a data transform (known before PRPC 6.2 as a "model rule") to define how to take source data values — data that is in one format and class — and turn them into data of another format and class (the "destination" or "target").
What a data transform does
Generally speaking, a data transform defines how to take source data values — data that is in one format — and transform them into data of another format (the "destination" or "target"). In PRPC, you can use a data transform to:
Note: Prior to version 6.2, data transforms were known as model rules, and only involved setting property values. Data transforms now provide more powerful actions than they previously could.
A data transform is a structured sequence of actions. When the system invokes the data transform, it invokes each action in turn, following the sequence defined in the data transform's record form.
The Data Transform record form
On the data transform's Definition tab, the actions to be taken are presented as a sequence of rows in a tree grid. Except for the conditional types of actions (such as When, For Each Page In, and similar actions) and transitional actions (such as Exit For Eachand similar actions), the system invokes each row in sequence, starting with the first row.
In the example below, the data transform CopyShippingInformationToBilling maps data from the shipping information for an order to the order's billing information.
In general, each row provides for:
ColumnDescriptionActionAn action to be taken.
TargetA target, if the action requires a target.
RelationA relation, if the action requires a relation to be specified. This relation is a relationship between the specified target and source.
SourceA source, if the action requires a source.
In this post, i would introduce in brief as to what Pega’s CPM framework is about.
Pega Customer Process Manager (CPM) is one of the products in Pega’s CRM suite of solutions. This framework is primarily to guide Customer service representatives (CSRs) in processing customer service inquires and requests from initiation through resolution. In effect, it helps CSR’s to view complete information about the customer in a single view, take customer queries and initiate a workflow process to resolve them. These customer queries are known as ‘service intents’ in pega parlance.
There are few terminology used in CPM framework that you should be aware of –
1. Composite – this is the area where you view the 360 degree of the customer. Pega’s integration services are used to connect with external systems to retrieve information and thereby shown in separate sections in the composite area
2. Service intents – these are the customer inquiries that i mentioned of. In an OOTB CPM framework, you would see the following service intents.
The usual flow is that when a customer calls up a CSR, the CSR would ask for his account information, that could be the customer ID, etc. Post this, the CSR would verify the identity of that person by asking few questions. On successful verification, the CSR sees the complete information of the customer. This is to help the CSR view what are the previous complaints, or queries, or services that were requested by the customer. In the above table, within account category, a customer could request for address change. The CSR would launch this service and complete the request.
3. Dialog scripts – The intention of dialogs is to assist CSR in the flow. Basically, these are nothing but scripts that appear along the interaction with the customer. For example – when a customer calls the CSR, the system will show up a dialog saying ‘Hello Mr. XXX, How can i help you today?’
Few screenshots to drive the story –
Pega 7 provides two case locking options and capabilities. You make your basic configurations in the Case Designer at the top-level case type. The settings cascade to all the subcase types.
To begin, open a top-level case type in the Cases Explorer and open the Details tab. On the Locking option, click the Edit link.
Sets to standard locking behavior; the system locks a case when it is opened by a user for a period of up to 30 minutes. No other user can open or work on it. You can change the standard time period in the Custom timeout field.
This conservative approach helps ensure that data can be updated in both parent and subcases with transaction integrity. For example, the parent case may contain properties that count or total values in the subcase. Locking both at once helps keep these counts or totals in sync.
Overriding default lockingIf default locking hampers user throughput in your application, you can override the setting at the subcase level. This lets users concurrently make updates to both parent cases and their subcases without conflict.
To override default locking:
Note This setting is not available for optimistic locking since there is no lock on either the parent or the subcase.
Optimistic lockingThe top-level case and all of its subcases can be opened in a Perform user form by multiple users for reviews or updates. This setting applies to all subcases and cannot be overriden at the individual casetype level.
When the first user submits or saves an update, other users who have also opened the case and attempt to submit their updates receive a message indicating that the original form and its data have already been updated; therefore, they cannot submit their updates. In these situations, users can:
Note : The system compares .pxLastUpdateTime of the case on clipboard to the DB’s object to determine whether another user has committed an action since the current user has opened the case.
In most configurations, use default locking in order to preserve transaction integrity among cases. Optimistic locking may be called for where multiple users need only open and review cases without having to perform updates.
Use the Queue instruction to start asynchronous execution of a second activity. This provides an alternative to the Call instruction, in situations where there is no need to wait for completion of the second activity, or where processing in parallel is feasible and beneficial
BRANCH -- Branching to another activity.Use the Branch instruction to cause the current activity to find another specified activity and branch to it without a return.When the branched activity ends, processing of the current activity ends also; no steps after the Branch step are executed.CALL -- Calling another activity
COLLECT -- Begin execution of a collection rule
FLOW-NEW -- Start a flow execution
JAVA -- Using Java in an activity step
QUEUE -- Execute another activity asynchronously
RULE -- Using the Rule instruction to implement a custom rule type(Rule instruction is deprecated)
Note: Rule instruction is deprecated. Instead, call the evaluate Rule activityUse the Rule instruction to cause the current activity to find another activity named evaluateRule that implements a custom rule type. When this instruction executes, control transfers to that activity.
The PDN provides overview articles, best-practice solutions to common development challenges, news of the latest product features, access to the latest version of the product help documentation, and many more learning resources.
Learn from the experts. Pega Academycourses provide design and implementation best practices that cover Pega 7 Platformapplication development as well as specialized topics.
Pega Academy courses provide the knowledge and hands-on experience that you need to successfully design and deploy Pega 7 Platformsolutions.
These courses also prepare you to become a Pega Certified Professional.
Pega Mobile is an add-on product for PRPC 6.2 SP2 and later releases, offering mobile device users the capability to participate, collaborate, and monitor PRPC work from most major mobile devices, including tablets, phones, and iPods.
Access your application on a mobile device using a WebKit-based browser and the same URL and login as the desktop version of an application. You can also access the application using the free Pega Mobile app, available at on-line app stores, which delivers your PRPC application to your mobile device while giving you convenient access to native device features, such as the camera. The app also allows you to save multiple application configurations, including URLs, logins, and passwords.
Portal and navigation
The Pega-Mobile RuleSet delivers an extensible portal, based closely on the Case Manager portal, that provides mobile device users with access to the PRPC application. Customizable navigation rules define how users move about the application. Navigation is controlled by main and toolbar navigation rules, and the list of items, actions, labels, and icons is completely configurable. You can even prevent display of navigation rules on phones and tablets.
Layouts and controls
Use a set of layouts and controls that are supported for use in sections and harnesses that render on mobile devices. Over 100 PRPC controls are mapped to mobile versions of those controls to facilitate the mobile rendering of existing applications.
Specialization and circumstancing
Most existing harnesses and sections render on mobile devices with no additional work. However, if your application includes features not yet optimized for mobile devices, you may create a specialized version of the section rule that includes features that are optimized for mobile devices.
You can also circumstance your entire UI experience based on the device type. Use Save As to save the portal rule to a new name, and for the circumstance, enter property pxRequestor.PxDeviceTypeand the value phoneor tablet. When you log in using this portal, the application determines the User Agent, and displays the portal, sections, harnesses, and flow actions with a user interface for the specified device type.
Testing and debugging
To test and debug your mobile application, use a physical mobile device when possible. Additionally, configure Apple's Safari or Google's Chrome with a specific User Agent, such as iPad or iPhone, so that you can run the mobile application on your desktop as it would appear on the tablet or phone device. The Mobile Clipboard is useful for examining property values, rule types, and identifying the Remote Tracer Session ID.
Other resourcesThese PDN articles are relevant:
Note: If your application was developed in 6.2SP2 and uses RuleSets ending in _mobile, and you want to operate in ABA mode for best performance, note that _mobile RuleSets appear higher in the RuleSet list in ABA mode than in rules assembly mode. While it is unlikely that this change affects results of your application, some analysis and testing is recommended.
Most applications require access to data or computations that are provided by another system, or need to respond to requests from other systems for data or computations.
PRPC offers many approaches, technologies, and facilities collectively known as Integration. (Internally, these facilities are in the Pega-IntSvcs RuleSet.) They include:
ConnectorsRule types provide direct support for these protocols and technologies:
How connectors workConnector interfaces consist of a call or outgoing message (known as the request), followed by a return or arriving message, known as the response. You can parse, convert, and map data in either direction to or from the clipboard.
Arriving information can be an XML file format (and accepted by the Parse XML rule), in a fixed record structure (accepted by the Parse Structured rule), or a text file with input fields separated by a tab character or other specific characters (accepted by the Parse Delimited rule).
Your flows can include Integrator shapes, which execute activities that use connector rules to gather data or request processing from another system.
For most connector types, you can simulate the operation of a connector before you build the connector. This allows your application development and testing to proceed when the external system is unavailable or is difficult to test with. See Creating connector simulators.
Mapping and ResourcesSeveral rule types facilitate two-way mapping between property values (on a requestor clipboard) and the messages, records, or structures used by the external system or technology. These rule type belong to the Integration-Mapping category. See Data mapping in services and connectors — Concepts and terms.
Resource identifiers — such as URLs, port numbers, usernames, passwords, and the like — may vary between a development or test environment and a production system, and may change during the operation of a production system. Such information is usually better stored in data instances, rather than rules. The data classes belong to the Integration-Resources category.
Landing pagesFour Integration landing pages provide access to integration rules and resources:
A flow describes a business process. One representation of a flow is a network of shapes and connectors (directed arrows), each with associated parameters and values. Flows govern:
Some applications don't require users to interact with user forms. Flows that implement straight-through-processing operate without user input. External portals and systems can execute flows through Active Server Pages, JavaServer Pages, Service Portlet or Service JSR94 rules, or other means. Informally, these are known as "headless" BPM applications. A collection of standard activities, flows, and flow actions known as the Process API simplifies building such applications.
Runtime processing — The simple case
At runtime, a user can start the execution of a flow by entering a new work item. The system examines the property pyFlowName, in the data transform instance for the class, to determine which flow to start. The flow operates on the work item to advance it through the business process that the flow implements, performing automated steps automatically, or creating assignments for users as appropriate.
You can think of a work item as located "on" one shape or arrow of the flow at any one instant, until the work item becomes resolved or the flow ends. Alternatively, you can think of the flow operating on the data (properties) in the work item until the flow finishes or the work item becomes resolved. Both points of view are correct.
A flow may define many optional detours, side trips, and branches reflecting decisions reached along the way. The path that one work item follows through the flow depends on its own requirements, automatic decisions in rules (such as decision trees and map values) and on available resources. For example:
Parallel processing with Split Join
In some business processes, the order of certain steps is not important as long as all the steps get done. In other situations, a step can be considered complete when either of two other steps finishes.
The Split Join facility ( or ) supports such asynchronous operation, by allowing processing of two or more subprocesses to proceed in parallel. For example, a contract may need approval of both a legal reviewer and a purchasing department reviewer, but order is not important. In the 1980's era of paper forms and in-boxes, only one of these two has the paper — artificial sequencing. With a work-object and a flow that uses Split Join, each subprocess can create an assignment, and the two reviewers can proceed independently.
See Flow form — Editing in Process Modeler — Split Join shape properties
Split Join parallel processing occurs only when considered at the business process level. Although two assignments exist, they both belong to a single work item. During the minutes or seconds that either user performs the assignment (thus updating the work item), the system locks the work item, and the work item is not available to the other user.
Similarly, at a more atomic level, if the two users both access a single-node PRPC system that has a single JVM and single CPU chip, no parallel processing occurs at the Java thread level, even when the two users work on different work items.
Parallel processing with Split For Each
The Split For Each facility () causes multiple subprocesses to start, one for each page of a Page List property. Processing can resume after any one, or all, of the subprocesses end.
See Flow form — Process Modeler — Editing a Split For Each shape.
Parallel processing with Spinoff
A Spinoff shape starts asynchronous execution of a different flow, on the same work item or a different work item. Processing of the current flow does not pause or wait for results from the other flow.
To create a spinoff, use a Subprocess shape (). Select the Spinoff Flow checkbox. See Flow form — Editing with Process Modeler — Editing the Subprocess shape properties.
Parallel processing with Start a New Process and flow actions
PRPC offers ways for a flow execution to be started for an existing (open) work item. These are alternatives to calling a subprocess, using a Split Join shape, or using a Split for Each shape:
Several system-maintained properties in a work item record the current state of flow executions in process. For example, the integer property @baseclass.pxFlowCount indicates how many flow executions are in process for the work item.
The Page Group property @baseclass.pxFlow contains a page of facts about each execution:
Based on HTML and XML standards, PRPC can support a wide range of user interaction facilities and approaches. Your application's user interface can take into account the environment, the domain knowledge of your users, their skills, locale, and language.
The appearance, branding, and interaction dynamics of your user interface can match the context and language that is natural to your application's users.
Evolving an application's user interface is best done by designers and developers who have both application domain knowledge and usability skills.
Producing HTML displays and forms
PRPC includes standard facilities for those workers and managers who use PRPC-based applications throughout the workday. These facilities support:
Defining user input forms and displays
For access through the standard portal, PRPC uses harnesses (Rule-HTML-Harness rule type) for work items. Six other rules support the presentation of work items:
The HTML text you enter into HTML rules is known as source HTML. It contains ordinary HTML code plus JSP tags or directives — server-side instructions that PRPC evaluates at runtime to compose the final HTML it sends to the HTTP server (and ultimately to a user's browser session). Known as stream processing, this evaluation accesses the clipboard for text values to insert into the output HTML, incorporates the text of other HTML rules, provides conditional if-then-else testing, and looping through arrays.
Harness forms use the pega:include JSP tag to incorporate multiple sections, which in turn use standard styles and fragments to present properties, labels, and images. For your application, you can copy and tailor parts of these forms as necessary, while inheriting the standard parts.
These tools support your evolution of the user interface of your applications:
When a user submits an HTML form, PRPC records the values entered into input fields as property values on the clipboard. The values that users enter may not be in the format required by the property definition, or may not pass validation tests.