Creating Process Extension Data StructureLast Updated: 07/19/2016 Introduced in Verision: 2.0 |
Flow execution data extensions are custom data structures that can be attached to process folders for reporting, or to provide contextual data throughout the life of a process. Flow data extensions can be created from a Designer Projects folder by selecting the Create Datatypes button, then Flow Execution Data Structure.
Example
In our example flow, we will modify an existing flow called Apply for Financing. The current Apply for Financing flow creates a process folder in which information about the application is saved. We will attach a flow data extension to this process folder and use it to dynamically populate the final state of an application.
Navigate to a Designer Projects folder. Click on the Create Datatypes button and select Flow Execution Data Structure.
In the resulting Add Flow Execution Data Structure pop-up, name this flow data extension “FinancingApplication,” define the Type Name Space as “Customer” and click the Add button.
In the resulting Edit object pop-up, define a String property called “CashAmount” and click Save.
In much the same way, we will define a Decimal property called “InterestDecimal” and click Save to save our new flow data extension.
In the Set Process Folder step, from the Properties tab Process Folder section, select the Use Extension Data checkbox. An Extension Data Type dropdown appears underneath. In this dropdown, select the new flow data extension – Customer.FinancingApplication.
In the Mapping Editor, notice a new Extension Data property for our Setup Process Folder component. Change the Mapping Type of the Extension Data input to “Build Data” and map Cash to CashAmount and Interest to InterestDecimal (via the Convert String to Decimal converter flow).
Next, to dynamically title the Rejected state of the process folder, select the Set State and State Reason component at the end of our second form’s Reject outcome.
In the Mapping Editor, we will change the mapping type of state to Text Merge.Plain. In the Merge Text Editor, we will define the state as “Rejected w/ Cash Amount: [Extension Data.CashAmount]”
This completes our flow, so we will save it and close the Flow Designer.
To test our modified flow, we will navigate to a Customer folder and select the Apply for Financing action.
In the Applicant Details form, we will define the parameters of this application, including a Cash Amount of $32.00, and click Done.
In the second form, we will enter a comment and click Reject to reject this application.
When we navigate to the process folder for the application we just completed, we will see that its state is “Rejected w/ Cash Amount: $32.00”
Next we will create a report of the current Financing Application processes. We will navigate to our Designer Project folder and select the Create Report > Create Report action.
In the resulting New Report pop-up, we will name our report “Financing Applications Report” and click OK to open it in the Report Designer.
Because we are reporting on data from a process folder, we will begin by dragging the Folder Data Source component from the Data Sources category in the Toolbox tab to the Sources list.
Next, we will include flow data by dragging the Flow Tracking Folder Data component from the Extension Data category in the Toolbox tab to the Sources list.
Next, we will include our flow extension data by dragging the Financing Application component from the Flow Execution Extension Data Structure category in the Toolbox tab to the Sources list.
For the columns of our report, we will use Flow Name, Cash Amount and Interest Decimal.
This completes our report, so we will save it and close the Report Designer.
To test our report, we will create some additional financing applications, then return to our Designer Entities folder, select Financing Applications Report and select the Run Report action.
In the resulting pop-up, we will see the results of our report including our flow extension data.
Next, we will return to the Flow Designer and modify our flow extension data. For this example, we will multiply CashAmount by InterestDecimal and make the result of this multiplication the new CashAmount value. We will find the Get Value From Currency Formatted String, Multiply and Format as Currency components in the Data category of the Toolbox tab.
To modify flow extension data, we will return to the Flow Designer and map the results of our Format as Currency component back to our extension data. We will select Format as Currency 1 and click the Show Mapping Editor link. In the Outputs pane, we will expand the Extension Data {FinancingApplication} property and map Output to Extension Data > CashAmount.
Next, we will save our extension data with the Save Process Data component. We will find it in the Toolbox tab, under the Flow Management > Data category.
Once we’ve connected our remaining unconnected outcomes, our flow will be complete. Save the flow and close the Flow Designer.
When we repeat the Apply for Financing action with updated inputs (CashAmount = $32.00, InterestDecimal = 1.15), we will see that the process data has been modified, as well as our custom state definition.