System Variable Modifiers and Parameters

Class Types #

There are several classes of system variable that are similar, in that they all refer to processes in some form. First, there are the classes that refer to specific process models:

  • Process Timeline: These System Variables refer specifically to Process Timeline definitions and instances.
  • Timeline Activity: These System Variables refer specifically to Timeline Activity definitions and instances.
  • Workflow: These System Variables refer specifically to Workflow definitions and instances.
  • Workflow Step: These System Variables refer specifically to Workflow Step definitions and instances.

Important BP Logix recommends the use of Process Timelines for all new development. Workflow is the legacy process model used in earlier versions of the product. Workflows remain in the product for backwards compatibility, are no longer in active development, and have received no new functionality updates since Process Director v.4.5.

Process Timelines have definition objects that provide their configuration, and instances that are created each time the definition is invoked. The Process Timeline and Timeline Activity System Variables should be the first choice for referencing attributes of their corresponding objects in most (but not all) cases.

When a Process Timeline is run, it invokes both a Timeline instance and a Process instance that run concurrently. The Process instance has its own set of System Variable classes.

  • Process: These System Variables refer specifically to existing Process instances.
  • Process Task: These System Variables refer specifically to existing Process Task instances.

Processes do not have definition objects, only instances. Processes can't be directly configured, and inherit their configuration from the Process Timeline that invokes them. A process-based System Variable can only return data from existing instances, and only data that is related to the Process instance. In many cases, the Process and Timeline variables return the same information, but the selection of Process System Variables is more limited than the Process Timeline System Variables. Process Task System Variables are even more limited, since Process Tasks are primarily relevant specifically to user activities.

Despite the more limited range of Process System Variables, they must sometimes be used to extract unique information that isn't available from the process model's variables. Some information only exists in relation to a Process or Process Task instance, and isn't defined in the Process Timeline definition.

For example, User Delegation is configured at the system level, and isn't accessible from the Process Timeline definition, or its associated System Variables. Instead, theTask on Behalf of Process Task System Variable returns the name of the user who delegated a task to another user. User delegation only occurs in the context of a running process, and the Task on Behalf of variable only has a value when the delegation actually occurs. Delegation can only be invoked while the Process Task is running, and the identity of the delegator and delegate is only supplied in that context.

Note The Advanced Options tab of a User Timeline Activity does have an Allow Task Sharing property that, when checked, enables a task to use Shared Delegation, but the identity of the possible delegates is, again, configured at the system level. So, while this property enables Shred Delegation for the task, it provides no configuration for it.

Parameters #

System variables will often contain Modifiers or Parameters that control the data the system variable will return. These are specified in SysVar tags using the following syntax:

{VARNAME, format=FormatType}

VARNAME is the name of the system variable, and FormatType can be one of any member of the set of the relevant formatters, depending on the system variable in which it's used.

System variable Modifiers aren't case sensitive.

Video Example

Escape Characters and Defaults #

When Process Director sees a string with text enclosed in curly braces, it will attempt to interpret the enclosed text as a system variable. To prevent it from doing so, add two backslashes and an additional curly brace before each desired curly brace you want to display as text. For example, the string “\\{{CURR_DATE\\}}”  will display the text “{CURR_DATE}”, instead of displaying the current date.

System variables for form fields use the locale specified in the form definition when formatting the string. For example, a form field defined as a currency field, and whose locale is specified in the form definition as "Japan", will render its value as Japanese Yen.

When used in a condition, system variables referring to running Process Timeline Activities (e.g., {ACTIVITY_RUN_TIME}), when used without specifying the name of a specific activity, will default to the "current" activity. However, if multiple activities are running, the result can be hard to predict. Process Director will now first look at the context in which the condition is being evaluated: for example, if the condition controls visibility on a form, and that form is being viewed in the context of a task, the "current" activity will always be that task.

Parameters #

Many parameters described below require a specific data type to evaluate properly. You cannot call a user parameter for a date value, or a date parameter for a string value. This is especially important to remember if you're evaluating Form field system variables, since different Form fields have different data types.

For example, Date Picker fields can only return a datetime value, so only a datetime parameters can be evaluated for Date Picker controls. Input controls, on the other hand are much more flexible, and can be assigned text, numeric, and datetime values in their Field Properties settings. By default, Input controls return the string data type. To properly evaluate an Input field using a parameter for a different data type, you'd need to change the Data Type property of the Input control to the data type that matches the parameter you wish to use.

Note For most use cases, BP Logix recommends that you use controls of the correct data type for the data you wish to store, e.g., a Date Picker to store date data or a User Picker to store user data, rather than using an Input control as a generic field to store different types of data.