Creating Process Extension Data Structure

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

 
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.

createFlowExecution

 

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.

nameStructure

 

In the resulting Edit object pop-up, define a String property called “CashAmount” and click Save.

addCashAmt

 

In much the same way, we will define a Decimal property called “InterestDecimal” and click Save to save our new flow data extension.

addInterestDecimal

 
 
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 dropdown appears underneath. In this dropdown, select the new flow data extension – Customer.FinancingApplication.

setExtensionDataTypeFromDropDown

 

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

mappingToSetupProcess

 

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.

selectStateAndReason4

 

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]”

textEditorForState4

 

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.

applyForFinancing

 

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

fillUpTheFormResult

 

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

rejectForm

 

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”

processViewFolder

 

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.

createReport

 

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.

nameReport

 

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.

dragFolderDataSource

 

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.

dragFlowTrackingFolderData

 

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.

dragFinancingApplication

 

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

addColumns

 

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

saveReport

 

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.

runReport

 

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

reportTestRunning

 

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.

dragAdditionalSteps

 

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.

mapOutputFormatAsCurrency

 

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.

dragSaveProcessData

 

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

saveFlowCompleted

 

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.

result

 

Additional Resources