Tuesday, 30 July 2013

Usage of Linked Properties in PRPC

Linked property is a special kind of property.

This property holds the value of a key to another data object (Say Data-Admin-Operator-ID). This property is used to display the properties of the Data-Admin-Operator-ID based on the key value passed.

How to create a linked property.

1. Create a new property say linkProp with single mode property.
2. On behaviour tab, select Automatic reference to class instance (linked).
3. Select the linked class from dropdown.(Data-Admin-Operator-AccessGroup )

The properties of Data-Admin-Operator-AccessGroup are accessed through the above created linked property.

Create a section testLinkSection.
1. Include the property linkProp as a textfield.(.linkProp) for demo purpose I have refreshed the section for OnChange event.
2. Include another text field to access the properties of linked property. (.linkProp.pyLabel)



Post / comment if you have any questions regarding linked properties, I may help you.

https://pdn.pega.com/user-interface/use-linked-properties-to-display-data-from-related-objects

Friday, 12 July 2013

Data Transform Rule

Data Transform(DT) rules are introduced in PRPC version 6.2, Earlier to 6.2 version, they are refered as models.

DT rules are used to copy/convert the data from source of one format/class into target of format/class structure.These rules allows the user to easily copy, map and transform the clipboard data (pages and properties on those pages). 

The same can be achieved by using activities, but by using the data transform rules one can imporve run time performance.

With the help of DT rules the user can eliminate the use of activities for mapping or transforming the clipboard data.

Where the Data transform rules are referenced.
1. In activity step methods like Page-New, Page-Copy, Page-Change-Class, Apply-
DataTransform.
2. In start flow rules, that create work items, Data transform can be applied on the flow rule's process tab, which can be used to set the initial properties of the work item.
3. In action tab of Flow Action  rule, data transform can be applied before or after displaying the flow action UI to the user.
4. Data transform can also be applied to the connector propeties of the flow rules that are edited through Process Modeler.
5. They can also applied in the property rule in case of auto populate property.
6. They can also be applied in the data page rule form to map/ convert the data from one format to the other format.


Some examples of situations in which to use a data transform rule are:
·        Copying a clipboard page to make a new page.
·        Mapping properties (and their values) on one page to another, existing page.
·        Mapping properties (and their values) on one page to a new page.
·        On a given clipboard page, defining one or more initial properties on that page and setting their values. A data transform can set many property values on a page in one processing step.
·        Appending pages from one Page List property to another.















How to refer a parameterized data page in Data transform rule?
D_testParamDT with parameters paramA and paramB.

Set Action
1.  .pyLabel = D_testParamDT[paramA:"abc", paramB: "def"].pyLabel.

The inline syntax for passing parameters is [key:value,key1:value1.........]
key and value is delimeted by : (colon) and number of parameter is delimeted by , (comma)

The value can be a string literal or a variable reference.

Invoking an activity from a Data transform rule:

In case if there is a need to invoke an activity the following RUF can be invoked.
@pxExecuteAnActivity(Primary,activityToBeInvoked)


Invoking a decision table from Data transform rule: 

@DecisionTable.ObtainValue(tools,myStepPage,"DecisionTableRule", true)


Source reference to this post: pdn.pega.com

Post / comment if you have any questions regarding data transform rule, I may help you.