What is Data Transform
Data Transforms are part of the Data Model category and are instances of the “Rule-Obj-Model” rule type. akes data manipulation on properties and pages easy and efficient.
Data Transforms map data from a source to a target, performing any required conversions or transformations on that data. The source could be one case such as a purchase request case and the target could be another case, such as a purchase order case.
In which cases Data Transform is the most appropriate to use?
In which cases Data Transform is not the best solution?
What are the settings tabs for a Data Transform?
Call superclass data tranform?
Finds all data transform in the Pattern and Directed hierarchy and runs all. Highest in hierarchy will be run first lower levels will overwrite the same property.
Data transforms can be chained with other data transforms defined in their parent classes. To do this, we need to enable the “Call superclass data transform?” checkbox, and the data transforms must share the same name.
PRPC checks for the same name in all the parents of this class following both pattern and directed inheritance. Then it applies all the data transforms starting with the deepest ancestor continuing for each child upward.
This is a powerful feature to set default values for the properties at the appropriate level.
Columns on the Definition Tab?
Action – This is where we identify what the step is for. This is required for each step. We will look at the different actions that are possible shortly.
Target – Most actions require a target. In cases where an action is not required, we cannot select one. The smart prompt box acts both as a select and a text box. We can select a property from the list or we can type text.
Relation – This is an optional column. The typical relationship between source and target is “equal to.” There are a few actions that use other relationships.
Source - This becomes selectable only if the action requires a source. We can specify literal value, properties or expressions. We can, for example, set the target property “Employment Type” as the value “Full Time,” target property the “Full Name” as concatenation of two other properties “First Name” and “Last Name,” and target property “Rate” as an expression, namely, the sum of source properties “BaseRate,” “LoanRateAdjustment,” and “RiskRateAdjustment.”
Best Practices
- if you have more, group them into another Data transform
Available Actions?
Set - is used to set the target from a source. We can set a value to a Single Value property which exists in the top-level page such as the pyWorkIDPrefix or in an embedded page such as the LoanType in the LoanInfo page.
Remove - is used to delete the target and any associated values from the clipboard.
Update Page - is used to set the properties defined on an embedded page. When we use Update Page we need to set individual properties using the Set action with the nested rows after the row with “Update Page.” In fact, we have the option of selecting any of the actions shown above for the nested rows below the “Update Page” row.
Apply Data Transform. - We can reference another data transform rule from our existing data transform rule. This might occur if we are going over 25 steps and want to break the rule into smaller manageable data transforms. Or we might have a reusable data transform, such as one for initializing a case with some default values.
Conditional Actions - to perform steps based on a condition:
• When — To conditionally perform actions.
• Otherwise When and Otherwise — To provide actions for the alternative to the When actions.
“Append to” action to copy a page from the source to the target. For instance, if we want to add a new page to the Assets page list, we can select new page. We can also add another existing page or copy all the pages from another pagelist, by selecting the appropriate values in the drop down in the relation column.
“Append and Map to” is used to map individual properties in the page list. When we select this action, at least one nested child column is used with “Set” action.
For Each Page In - iterate over a pagelist. Using this action we are able to apply the change for all the child nested rows of the page list.
“Exit For Each” - If we don’t want to loop through all the pages in the pagelist, we can exit the loop
“Exit Data Transform” - Exit from processing all the remaining steps, Typically, we have these steps after a when condition.
Available Symbolic Indexes?
CURRENT: Identifies the index of the current iteration
APPEND: Inserts the element at a new position at the end
LAST: Retrieves the highest index
PREPEND: Inserts the element at the top
INSERT: Inserts the element at a specific position that is indicated by the number
Param.pyForEachCount VS. CURRENT
Param.pyForEachCount – Same as CURRENT. Identifies the index of the current iteration. This can be used for the Page index and in the expression as well, while can be used only for the Page index.
Where can you use/not use ?
For Data Transform rules, we cannot use the APPEND keyword in the For Each Page In action. Instead, we need to use “Append” or “Append and Map” actions.
We can use APPEND for “Update Page” action in the Data Transform and also for looping through in the steps of an Activity rule.
Additional reference keywords?
Top – Refers the top most page of the embedded page.
Parent – Refers to the parent page of the embedded page. If the embedded page has only one parent, and no grandparents in the hierarchy, Top and Parent refer to the same parent page.
Where Data Transforms can be used/invoked?
For each step, there is an appropriate flow rule associated with it. A step of step type “Case” uses the “Create Case(s)” smart shape in the flow rule for that step. Referencing a data transform on step configuration is the same as setting the properties on the smart shape in the flow rule. We can modify it in either place and it is reflected in the other place.
4 - In flows, on any connector between any two shapes, we can set properties or referencedata transform rules. If it is a simple setting of one or two properties, we can use “Set Properties.” But, If we are using data conditionally or looping through a page list or if we need to reuse the data transform in other places, we can use the “Also apply Data Transform,” option and use a Data Transform rule. For example, when the flow is processed on a decision shape, on the connectors, we can use the appropriate data transform rules based on the decision made by the end user.
5 - In Flow Actions - In Flow actions, we can specify a data transform on the flow action’s Action tab. To populate the properties from another page, we can invoke a data transform in the “before this action” area. If we want to copy the values submitted in the user session to another page, then we can invoke “after the action” is submitted.
6 - for a cell in a section rule - one of the change event is Other: Run data transform
7 - for a cell in a section rule - “Refresh This Section” action is selected for a change event: a DT or an Activity can be triggered
Data Transform evaluation order?