Collecting Transient Data
Overview
Custom Data Forms provides the ability to capture various types of inputs depending on the needs of Process. In some cases it may be required that sensitive data is captured using custom data forms, and these inputs are available to other activities but that data is not persisted durably when the process completed.
When an input in marked as being Transient the data is not persisted durably on process completion but is still available to other activities such as Cloud Functions.
Data such as username and password may be collected using transient data. Transient data refers to data captured by a custom form that is temporary and will not be stored by the process server.
If a user input activity, for example Custom Data Form, Document Capture etc, is placed after Transient/Sensitive data is captured then 'session data' is moved from 'in memory' storage to a database based storage for the lifetime of the Process Instance.
In such cases a Cloud Function should be created before the input activity to clear any data from Custom Data Forms which will prevent the data from be stored.
See an example below.
This guide will describe how to capture transient data in a Custom Form using JSON schema and the visual form builder. Additionally, this document will explain how to use transient data within a Cloud Function.
Transient Data in JSON Schema
A supported form field can be set to transient by using the "transient": true
property. This configuration can be applied to text fields, email address, and passwords.
Text Fields
Below is an example of a username text field that is configured with transient data set to true.
{
"title": {
"values": {
"en": "Title"
},
"isValid": true,
"type": "title"
},
"components": [
{
"type": "text",
"isValid": true,
"readOnly": false,
"id": "text",
"label": {
"values": {
"en": "username"
}
},
"default": "",
"transient": true,
"validate": {
"required": true,
"minLength": "",
"maxLength": "",
"missingMessage": {
"values": {
"en": ""
}
},
"invalidMessage": {
"values": {
"en": ""
}
},
"invalidLengthMessage": {
"values": {
"en": ""
}
}
},
"index": 0
}
]
}
Email Addresses
Below is an example of an email address component that is configured with transient data set to true.
{
"title": {
"values": {
"en": "Title"
},
"isValid": true,
"type": "title"
},
"components": [
{
"type": "email",
"isValid": true,
"readOnly": false,
"id": "emailID",
"label": {
"values": {
"en": "email"
}
},
"default": "",
"transient": true,
"validate": {
"required": false,
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$",
"missingMessage": {
"values": {
"en": ""
}
},
"invalidMessage": {
"values": {
"en": ""
}
}
},
"index": 0
}
]
}
Passwords
Similar to text fields and email addresses, a password can also be configured to utilize transient data. See the example below.
{
"title": {
"values": {
"en": "Title"
},
"isValid": true,
"type": "title"
},
"components": [
{
"isValid": true,
"type": "password",
"id": "pwID",
"label": {
"values": {
"en": "password"
}
},
"confirmLabel": {
"values": {
"en": "confirm password"
}
},
"default": "",
"transient": true,
"validate": {
"required": true,
"minLength": "",
"maxLength": "",
"minLowercase": "",
"minUppercase": "",
"minNumbers": "",
"allowedSpecialCharacters": false,
"specialCharacters": "!@#$%^&*",
"minSpecialCharacters": "",
"notMatchUsername": false,
"usernameId": "",
"missingMessage": {
"values": {
"en": ""
}
},
"invalidMessage": {
"values": {
"en": ""
}
},
"invalidLengthMessage": {
"values": {
"en": ""
}
},
"invalidMinLowercaseMessage": {
"values": {
"en": ""
}
},
"invalidMinUppercaseMessage": {
"values": {
"en": ""
}
},
"missingMinNumbersMessage": {
"values": {
"en": ""
}
},
"missingAllowedSpecialCharactersMessage": {
"values": {
"en": ""
}
},
"missingMinSpecialCharactersMessage": {
"values": {
"en": ""
}
},
"missingNotMatchUsernameMessage": {
"values": {
"en": ""
}
}
},
"index": 0
}
]
}
Transient Data in Visual Form Builder
For more information on using the Visual Form Builder, see the auto$ guide.
Text fields and email addresses can be collected as transient data using the 'Transient Data' checkbox located in the Form Editor options list. For password, a Password elements is included that provides a list of additional options, including the ability to set the data as transient.
Text Fields
Text Fields can be set as transient to capture data such as usernames.
The example below demonstrates a text field Form Element that is used to capture a username from the end-user.
- Selecting the text input element in the Form Builder will open the configurations options in the Form Editor in the right-most column of the page.
- The 'Transient Data' parameter can then be set to 'true' by checking the marked box.

Email Addresses
Similar to setting text fields as transient, an email address can also be captured as a transient data field by selecting the 'Transient Data' check box.
- Selecting the email input element in the Form Builder will open the configurations options in the Form Editor in the right-most column of the page.
- The 'Transient Data' parameter can then be set to 'true' by checking the marked box.

Passwords
The Password form element can be configured to capture transient data by checking the 'Transient Data' checkbox.
- Selecting the password input element in the Form Builder will open the configurations options in the Form Editor in the right-most column of the page.
- The 'Transient Data' parameter can then be set to 'true' by checking the marked box.

Using Transient Data in a Cloud Function
Cloud Functions can be used to perform additional checks on transient data, such as passwords, and influence whether the outcome of the function will be PASS or FAIL.
The example below demonstrate how to use a Cloud Function to remove data from Custom Data Forms so that sensitive data values are not retained any longer than required.
Equally a Cloud Function could be used to perform future validations on data or to interact with external systems.
import json
from cfresults import Outcome, OverallResult, OverallResultEncoder
form1 = params["vars"]["_customFormData"]["form1"]["currentCapture"]["customDataFormDataMap"]
#check if password None
password = params["vars"]["_customFormData"]["form1"]["currentCapture"]["customDataFormDataMap"].get("password")
password_confirm = params["vars"]["_customFormData"]["form1"]["currentCapture"]["customDataFormDataMap"].get("password_confirmation")
#clear the password
params["vars"]["_customFormData"]["form1"]["currentCapture"]["customDataFormDataMap"]["password"] = None
params["vars"]["_customFormData"]["form1"]["currentCapture"]["customDataFormDataMap"]["password_confirmation"] = None
#Always pass the CF
overallResult = OverallResult(Outcome.APPROVE, {})
cfResults = json.loads(OverallResultEncoder().encode(overallResult))
results["cfResults"] = cfResults
results["executionVariables"] = {"_customFormData": params["vars"]["_customFormData"]}