Related Topics
System Custom Variables
System-Level Custom Variables can be set to control the general operation of the Process Director installation.
This variable enables you to control document types are displayed using the EMBED tag in the browser. You can inspect or modify this list.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Add the MP4 file type as one to display using the EMBED tag
bp.Vars.EmbedDocumentTypes.Add("mp4");
}
This variable disables the ability for users to configure a Custom Task or Business Value using SQL Commands that do not use the proper SQL encoding for variables contained in the SQL Statements. When set to "false", Process Director won't allow the Custom Task or Business Value to be saved until all of the variables used in the SQL statement have been given the appropriate SQL-safe encodings specified in the system Variables Reference Guide. For example, using a parameter in a Business Value's SQL statement might require the SQL-safe encoding symbol "$" in the parameter variable like this:
SELECT * FROM Training_Vendor WHERE VendorName LIKE '%{$PARAMETER:Vendor}%'
The default value for this custom variable is "true". When set to "true", Process Director will issue a warning to the user that variables aren't properly encoded, but will allow them to save the configuration.
BP Logix recommends that you set this custom variable to "false", if possible. You may—indeed, probably—have existing Custom Tasks or Business Values whose variable values aren't properly encoded, so you should not set this value to "false" until you've ensured that all of your existing Custom Tasks and Business Values use the proper encodings.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Prevent saving CT or BV configurations that don't use SQL-safe
// encodings for variable values.
bp.Vars.fAllowUnencodedSysvarsinBV = false;
}
If this system variable is set to true, the popup that appears after a check-in will close automatically when the upload completes.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// the popup appearing after a successful check-in will not
// close while fCloseEditAfterUpload is set to false
bp.Vars.fCloseEditAfterUpload = false;
}
When starting a process from a Knowledge View against returned form instances, the system will copy all attachment references from the original process associated with the form instance to the process instance that is being started by the Knowledge View. This enables Custom Tasks like Convert to PDF and Export Items to work with the original documents/form instances that are in the original process. The default behavior can be disabled by setting this custom variable to "false".
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Disable copying of original attachments when a process
// is initiated via Knowledge View
bp.Vars.fCopyRefsFromRealProcessToKViewProcess = false;
}
When true, this option immediately deletes documents when not referenced by any other Form instance. When false, documents are marked for deletion, and actually deleted during normal clean-up processing.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
//Deletes documents immediately when they are removed
bp.Vars.fDeleteDocOnRemove = true;
}
Prior to v5.31, when importing a CSV with numbers and strings in a column, the system, by default, looked at the first row of the CSV file to determine the data type. This could result in a data type error when the first row contains a number and subsequent rows contain character strings. For v5.31 and higher, data imported will default to the String datatype, unless a different datatype is specified in the header row. This variable, when set to "true", will disable the new logic, and revert to the pre-v5.31 conversion logic. The default value for this variable is "false".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Revert to the old CSV field type logic
bp.Vars.fDisableCSVNumberStringLogic = true;
}
This variable permits the name of a document object in the content list to be changed to match the name of the document being checked in, when set to "true". The default value is "false", i.e., that the name in the content list is retained even if the document being checked in has a different name.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Turn on object renaming
bp.Vars.fDocRenameLogicOff = true;
}
This variable, when set to "false", will display an unlimited number of objects that reside in a Content List folder when it is viewed. This may have serious impact on performance when navigating through the Content List. The default value for this variable is "true", and it applies the default limit (1000) for the number of items that can be returned, or, alternatively, the number of items specified in the nKViewBuiltinMaxResults custom variable, when configured.
For Process Director v6.1.003 and below, the default value for this variable was "false".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Will enable display of an unlimited number of Content List folder items.
// May impact performance when navigating through the Content List.
bp.Vars.fEnableContentListLimit = false;
}
This variable permits form variables to be set or retrieved from JavaScript, when set to the default value of "true". Setting this value to "false" disables this behavior.
Vars.cs Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Disable JavaScript access to vars
bp.Vars.fEnableJavaScriptDev = false;
}
JavaScript Example
By default, JavaScript can be used to get or set form value for controls that aren't contained in a Form array. The best practice for this type of use would most often be to insert the JavaScript into an HTML Control on the Form.
<script>
// Function call to get form data from a Form via JavaScript
function getVariable()
{
var frmValue = CurrentForm.FormControls["FORM_VAR"].value;
}
// Function call to set a Form field value with JavaScript
function setFieldValue()
{
var frmValue = "SomeValue";
CurrentForm.FormControls["FORM_VAR"].value = frmValue;
}
</script>
When you run a SELECT statement that contains a LIKE operator and an ESCAPE clause in SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014, SQL Server may use an inefficient query plan for the statement. Additionally, the performance of the statement is low. This SQL Server bug can cause a performance problem with Knowledge Views searching for form data using "contains", especially when using the "contains" operator with wildcard characters. This Custom variable, when set to "true", alters the operation of these queries to improve performance and help mitigate this SQL Server bug. The default value for this variable is "false".
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Mitigate SQL Server bug for LIKE/Wildcard queries
bp.Vars.fEnableSQLEscape = true;
}
This property accepts a comma-separated string of file extension that, when set, will prevent files with those file extensions from being uploaded via any attachment control. This property is a universal blacklist of file uploads for files with the listed extensions.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Disables upload of listed file types
bp.Vars.FileUploadBlacklist = "dotx, xltx, dot, xlt";
}
This property enables you to universally set the Allowed File Alternate Text property of Attach Object controls, instead of setting the property individually in the control.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Disables upload of listed file types
bp.Vars.FileUploadBlacklistAlternateText =
"Word Documents, Excel Spreadsheets, Word Templates, Excel Templates";
}
Process Director enables the addition of locales by editing the vars.cs file.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// If you comment out the first line,
// it will append new values to the default list
// Otherwise a new list will be created
Locales = new List<NameValue>();
Locales.Add(new NameValue("English", "en"));
}
This boolean variable enables you to turn off object locking by setting the value to "false". The default value is "true".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will enable object locking.
bp.Vars.ObjectLockingEnable = true;
}
This boolean variable enables you to require object locking when set to "true". The default value is "false".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will require object locking when set to true.
bp.Vars.ObjectLockingForce = false;
}
This variable enables you to customize the default reminder times that are displayed in a Timeline Activity's Notifications tab.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Activity Reminder times
// If you comment out this next line, it will append new values to
// the default list
// Otherwise, a new list will be created
bp.Vars.ProjectReminderTimes= new List<TimeValue>();
bp.Vars.ProjectReminderTimes.Add(new TimeValue(-1 * (60 * 60 * 24),
"1 Day Before Due"));
bp.Vars.ProjectReminderTimes.Add(new TimeValue(-2 * (60 * 60 * 24),
"2 Days Before Due"));
bp.Vars.ProjectReminderTimes.Add(new TimeValue(1 * (60 * 60 * 4),
"Every 4 Hours"));
bp.Vars.ProjectReminderTimes.Add(new TimeValue(1 * (60 * 60 * 24),
"Every Day"));
bp.Vars.ProjectReminderTimes.Add(new TimeValue(4 * (60 * 60 * 24),
"Every 4 Days"));
bp.Vars.ProjectReminderTimes.Add(new TimeValue(7 * (60 * 60 * 24),
"Every Week"));
}
This variable enables you to specify a folder to use as a temporary folder when using the Multi-File Upload functionality with the AttachObjects control. The default system temp path may not release large file uploads properly. Setting your own folder in the folder system can alleviate this issue.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Set the temporary path for large file uploads
CV.UploadTempPath = @"m:\tempupload";
}
Process Director enables the reminder times in the process definition to be customized in the dropdown lists.
The Workflow object has largely been deprecated by the Process Timeline. BP Logix recommends the use of the Process Timeline as the process model for all new development.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Step Reminder times
// If you comment out this next line, it will append new values to
// the default list
// Otherwise, a new list will be created
bp.Vars.StepReminderTimes = new List<TimeValue>();
bp.Vars.StepReminderTimes.Add(new TimeValue(-1 * (60 * 60 * 24),
"1 Day Before Due"));
bp.Vars.StepReminderTimes.Add(new TimeValue(-2 * (60 * 60 * 24),
"2 Days Before Due"));
bp.Vars.StepReminderTimes.Add(new TimeValue(1 * (60 * 60 * 4),
"Every 4 Hours"));
bp.Vars.StepReminderTimes.Add(new TimeValue(1 * (60 * 60 * 24),
"Every Day"));
bp.Vars.StepReminderTimes.Add(new TimeValue(4 * (60 * 60 * 24),
"Every 4 Days"));
bp.Vars.StepReminderTimes.Add(new TimeValue(7 * (60 * 60 * 24),
"Every Week"));
}
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.