Creating Process Extension Data Structure

Last Updated: 05/03/2018 Introduced in Version: 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.

 
To use a flow data extension, it is necessary to include a process folder in your flow. In the Properties tab of the Setup Process folder, select the Use Extension Data checkbox and select the Extension Data Type to attach to the process folder.

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.

processViewFolder

 

Navigate to a Designer Projects folder. Click on the Create Datatypes button and select Flow Execution Data Structure.

 

 1-create-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.

2-define-the-data-structure

 

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.

 

3-adding-data-memebers

 

Back in the portal, open the flow that will use the new data structure. In this example, we have an Apply for Financing flow that we open for editing using its Edit link.

In the Set Process Folder step, from the Properties tab Process Folder section, select the Use Extension Data checkbox. An Extension Data Type drop-down appears underneath. In this dropdown, select the new flow data extension – Customer.FinancingApplication.

 

 4-setting-up-process-folder

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).

 

 8-set-up-process-folder-input

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.

 

 9-overview-of-the-flow

In the Mapping Editor, we will change the mapping type of state to Constant and name it Pending. 

 

10-pending-state 

This completes our flow, so we will save it and close the Flow Designer.

saveFlow

 

To test our modified flow, we will navigate to a Customer folder and select the Apply for Financing action.

 

 11-apply-for-financing

In the Applicant Details form, we will define the parameters of this application, including a Cash Amount of $32.00, and click Done.

 

 13-applicant-details

In the second form, we will enter a comment and click Reject to reject this application.

 

 14-reject-this-applicant

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”

 

 15-applicant-info

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.

 

 16-create-report

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.

17-new-report

 

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.

 

 18-add-folder-data-source

Next, we will include flow data by adding the Flow Tracking Folder Data component from the Extension Data category in the Toolbox tab to the Sources list.

 

 19-add-flow-tracking-folder-data

Next, we will include our flow extension data by adding the Financing Application component from the Flow Execution Extension Data Structure category in the Toolbox tab to the Sources list.

 

 20-adding-financing-application-component

For the columns of our report, we will use Flow Name, Cash Amount and Interest Decimal.

 

 21-add-to-the-fileds

This completes our report, so we will save it and close the Report Designer.

 

 22-save-the-report

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.

 

 23-run-the-report

In the resulting pop-up, we will see the results of our report including our flow extension data.

 

 24-run-report

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.

 

 

 28-get-value-from-currency-formatted-string

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.

 

 29-new-output-mapping

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.

 

 30-save-process-data-2

Once we’ve connected our remaining unconnected outcomes, our flow will be complete. Save the flow and close the Flow Designer.

 

 32-save-the-new-flow

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.

 

 33-changed-extension-data

Additional Resources