Free cookie consent management tool by TermsFeed

Working with Data in Process

On This Page

This page explains how to interact with and manage data inside your process flows.

How data moves through a process model

A major component of Appian applications is the creation, editing, and movement of data through the lifecycle of your business workflows. Process models in Appian allow you to:

  • Query data: Retrieve data from a database and display data to a user on a task form.
  • Collect input: Take user input on a form and write that data to your business data source.
  • Transfer data between nodes: Pass data from one activity to the next using process variables.

Types of data in a process model

Process models use several different data types to store and transfer information between nodes. The following sections describe each type and how the types relate to each other.

For a quick summary, check out this video to learn how process variables and activity class parameters work:

Process variables

A process variable is a placeholder for data that can be accessed throughout the lifecycle of a process. Process variables are how data is transferred between different nodes in a process model.

Node inputs are mapped to process variables on either the Data Tab or the Setup tab of each activity or smart service.

A process variable has the following properties:

Property Description
Name The name for the process variable used within the process model. Use camelCase naming conventions.
Type The data type of the variable, such as Text, Boolean, Number (Integer), or a record type.
Value The default value assigned to the variable when the process starts. Displays "(No Value)" if no default is set.
Parameter? Determines whether the variable is exposed as a process parameter. Parameters allow values to be passed into or out of the process when it is started or used as a subprocess.
Required? Determines whether a value must be provided for the parameter when the process starts. Only applicable when Parameter? is set to Yes.
Multiple? Determines whether the variable holds a single value or a list of values.
Hidden? Determines whether the variable is hidden from users viewing process details. Hidden variables do not appear in process history or reports.

process_variables_zoom.png

Process variables also serve as the basis for process report data during the process instance's lifecycle.

Set process variable values from process properties

The Value of a process variable can be taken from a process property, such as the Process ID.

Process properties do not appear in the expression editor when designing the process model because there are no active process instances at design time. However, you can reference process properties by name in your expressions.

To reference a process property, enter pp! followed by one of the properties:

  • id
  • name
  • priority
  • initiator
  • designer
  • starttime
  • deadline
  • timezone

Node inputs

Node inputs are how data is used by nodes in your process. Node inputs can be mapped to process variables, constants, literal values, or an expression to be evaluated. You can also specify a default value for the node input, which the node uses if the mapped process variable does not have a value.

Any data you want a process node to use must be mapped to a node input. When a node completes, node input values are no longer available. To use node input values later in the process, you must save node input values into a process variable.

node_inputs_zoom.png

Record type node inputs

When you use a record type as a node input, you can expand the input to see all fields of the record type and any related record types. You can save the entire record node input into a process variable or save individual fields as needed.

Node input configured with a record type

Custom data type (CDT) node inputs

When a node input uses a custom data type (CDT), you can expand the input to see all fields of the CDT. You can save the CDT node input into a process variable at the parent level or save individual fields of the CDT separately. If you save at the CDT's parent level, all fields are updated even if there is no new data. Fields without new data are set to a null value.

node_input_cdt.png

Tip:  In addition to user-defined variables, activity class parameters can be used as a node input.

Node outputs

Node outputs are the result of executing a process node. For example, the Create Group smart service creates a new group.

node_outputs_zoom.png

For other parts of your process to use node output values, you must save node outputs back into a process variable.

Note:  Do not save into the same process variable in node inputs and node outputs. Because node inputs and node outputs save at the same time, the value you intend to end the node with may be overwritten.

Using_node_inputs_and_outputs.png

Rule inputs

User input tasks collect data from users through an interface that displays as a form. On the task's Forms tab, you specify what values to pass to the interface and what values to save back into process variables. The collected data can then be used later in the process, such as writing values to a database table or executing business rules.

form_data_zoom.png

How process data flows between nodes

Data moves through a process model in a specific pattern:

  1. Process variables carry data into a node via node inputs
  2. The node does its work (such as displaying a form)
  3. Results flow back out through node outputs into process variables for use later in the process.

The following sections explain this pattern and when to use different mapping approaches.

Sending form data to a process

When a user fills out a form, any data you want to collect for your process must be defined as a rule input in the interface. That rule input must then be mapped to a node input in your process model, which saves the value back to a process variable. Data from a form cannot be saved directly to a process variable. You must use this mapping to pass data from an interface to a process model.

Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to closeimages/working_with_data_in_process/interface_inputs_to_form_inputs.png

When a node completes, node input values are no longer available. To use node input values later in the process, you must save node input values into a process variable. You can only save into process variables that have the same data type as the node input or output.

Appian process variables, node inputs, node outputs, and rule inputs are strongly typed. Each is configured to hold and represent only certain kinds of data. If the value being saved does not match the correct type, the value is cast to the correct type, which may alter the value unexpectedly. Learn more on the Appian Data Types page.

When to map node inputs to rule inputs

Use the following guidelines to determine whether to map node inputs to your rule inputs:

  • If you need to edit data on a form that the process uses later, map node inputs to your rule inputs. This ensures the edited values are saved back into process variables when the node completes.
  • If you need to save form data back to process variables, map node inputs to your rule inputs. This is required any time a user enters or changes values on a form that the process uses later. Without this mapping, edited values are not written back to process variables when the node completes.

Tip:  To learn how to use process models to create, update, and delete record data, see the Record Data Management Recipes.

Example: Data flow in a support ticket application

The following example demonstrates how process variables, node inputs, and rule inputs work together in a user input task.

A Support Ticket Management application allows users to submit support tickets and task other users with work on those tickets. The task form displays:

  • Record information: Details about the support ticket record.
  • Task information: Details about the task that was sent.
  • User response: The tasked user's response when they complete the task.

In this diagram, the comments process variable is passed into the Record Task user input task where it is mapped to a node input. That node input is also mapped on the Forms tab to the STM_TaskForm rule inputs. This mapping allows the process to collect the user's comments and save them back to the process variable when the task completes.

Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to closeimages/working_with_data_in_process/process_data_flow_callouts.png

The form displays all data related to the record and the task. Because the record data is not being edited on this form, those process variables are passed directly to the rule inputs without node input mapping. The comments section is the only input the user fills out, so it is the only rule input that requires a node input mapping to save the value back to the process for later use, such as writing the comments to the database.

Scroll or drag to pan · ⌘+/⌘− to zoom · Esc to closeimages/working_with_data_in_process/task_form_filled_out_callouts.png

Rename a process variable

Changing the name of a process variable in the Process Model Properties dialog automatically updates the variable name in some locations but requires manual updates in others.

The following table shows which usages are updated automatically and which require manual changes:

Process Variable Usage Update Method
Expressions Manual
Conditions Manual
Rules Manual
Custom node output expressions Manual
Node input mappings Automatic
Node output mappings Automatic
Variables displayed as default form values Automatic
Expressions used to calculate default form values Automatic
Gateway conditions Automatic

After renaming a process variable, click the Validate button to view each location that requires a manual change. The missing process variable triggers validation errors. Click each validation error to open the dialog where you can edit the rule or expression to use the new variable name.

Feedback