Customization File

You can customize your Process Director installation by editing the customization file, vars.cs.ascx, that's located in the \Program Files\BP Logix\Process Director\website\custom\ directory of your Process Director installation. This directory is created during the initial installation of the product. The files in this directory are not overwritten during subsequent installations, such as when you perform an upgrade to a new version of Process Director.

The customization file is separated into several methods, each of which enables you to customize some aspect of Process Director. Please expand the code example below to see an example of the customization file and its organization.

While many different aspects of your installation's operation can be altered via writing your own C# code in the customization file, the primary customization method is to use one or more of the many Custom Variables that are already built into the product, and which provide an easy means of changing the default operation of the system. The built-in Custom Variables are organized into different categories in this documentation, as outlined in the Custom Variables topic.

Note Access to the customization file is generally limited to On-Premise customers. Customers with Cloud installations can only access their customization file directly via an additional license option that enables them to access the /custom folder via an SFTP connection. Otherwise, Cloud customers can submit a technical support ticket that describes the desired change, and BP Logix will make it for them.

Form Control Styles

Forms have the ability to set the style for Enabled/Disabled form controls, Required form fields, and form fields in an error state using the “Default Styles” section on the Form properties page. To modify the list of default styles displayed in the dropdown, edit the vars.cs.aspx file.

Creating Your Own Custom Variables

Process Director enables you to set your own system variables in the vars.cs.ascx file. All custom vars that you create are formatted as strings, so you should use string syntax when setting the variable's value, i.e., use double quotes ("") around the value. Process Director will convert custom vars to numbers on the fly if numeric comparisons or calculations are required. Custom vars that you create are stored in a custom dictionary as key/value pairs.

There are two methods available in the custom vars file for creating custom vars: SetSystemVars and PreSetSystemVars. The PreSetSystemVars method is called prior to initializing the Process Director database, while the SetSystemVars method is called after database initialization.

In general, this means that the default method to use when creating custom vars is the PreSetSystemVars method; however, if you need to set the value of the var based on information stored in the Process Director database, such as the identity of the user or the workspace in which the user is working, you must use the SetSystemVars method.

Using the syntax {CustomVar:MY_VAR} elsewhere in Process Director will return the custom variable (in this case, MY_VAR) value that was defined in the customization file.

Session Variables

Process Director provides the ability to create session variables. These variables exist only for the length of a single user session, and are discarded when the user's session ends, such as when the user logs out of Process Director, or after the specified period of inactivity that is set in IIS. Session variables can be created via custom scripting in a Form or process, or inside one of the sections of the customization file, depending on when it's necessary to create the variable. For instance, if you want to set the session variable any time a page loads in a partition, you could set the session variable in the SetPartitionVars method of the customization file.

Once the session variable has been set, the variable is addressable through code, or in any Process Director Object using the Session System Variable .

Shared Delegation

Shared Delegation can be universally disabled in the Custom Vars file via the SharedDelegationAllowed method.