Related Topics
Default Settings Custom Variables
The system defaults are already defined in Process Director, but you can add to or override the default settings by editing the vars.cs.aspx file in the “\Program Files\BP Logix\Process Director\website\custom\” directory created during the installation.
This variable enables you to control which dates are considered Holidays. The standard US holidays are included in the default set of business holidays.
New Year’s Day: January 1
Birthday of Martin Luther King Jr: January 20
President’s Day: February 17
Memorial Day: Last Monday in May
Independence Day: July 4
Labor Day: First Monday in September
Columbus Day: October 12
Veterans' Day: November 11
Thanksgiving: Last Thursday in November
Christmas: Friday, December 25
Please note that many holidays fall on a weekend, necessitating Friday or Monday holiday dates that are different from the official dates. Dates are, of course, hard-coded as the actual holiday dates in the system. For Cloud customers, BP Logix updates the default holidays routinely. For on-premise customers, however, the holidays dates need to be completely replaced on at least a yearly basis, to ensure the correct dates are marked as holidays in the system. Updating the product will automatically update the current default holidays, and this is the preferred solution for keeping the default holidays up to date. Non-US customers will need to completely replace the default US holiday calendar with a local calendar in the customization file.
You can simply add holidays to the default calendar by using the BusinessHolidays.Add() method. Similarly, you can use the BusinessHolidays.Remove() method to remove a specific holiday from the default list of holidays.
You can also completely replace the default holiday calendar with a calendar of your own configuration by creating a new BusinessHolidays HashSet, then using the BusinessHolidays.Add method to add the new holidays you wish to include in your calendar. You'll need to use the System.Collections.Generic namespace to create the new HashSet by declaring it, or using it inline.
Example
Datetime declarations are set in the format: year, month, day, so declaring May 12, 2021 as a holiday date would be done via the syntax:
bp.Vars.BusinessHolidays.Add(new DateTime(2021, 5, 12).Date);
Sample Code Block
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
//===========Add Holidays to the Default Calendar==============
// Christmas Eve, 2020
bp.Vars.BusinessHolidays.Add(new DateTime(2020, 12, 24).Date);
//Boxing Day (Canada, UK), 2020
bp.Vars.BusinessHolidays.Add(new DateTime(2020, 12, 26).Date);
//=============================================================
//===========Create a New Holiday Calendar=====================
// Add a completely new Holiday calendar and overwrite the default
// US holidays. You must declare the namespace (i.e.
// Using System.Collections.Generic)or use the namespace inline
// to create a new HashSet
//Create the new HashSet to overwrite the default holidays
bp.Vars.BusinessHolidays = new HashSet<DateTime>();
//Add the new holidays
//New Year's Day
bp.Vars.BusinessHolidays.Add(new DateTime(2020, 1, 1).Date);
//Canada Day
bp.Vars.BusinessHolidays.Add(new DateTime(2020, 7, 1).Date);
//Independence Day (US)
bp.Vars.BusinessHolidays.Add(new DateTime(2020, 7, 4).Date);
//=============================================================
}
This variable enables you to control when business hours start, and is used in calculations of process due dates. The default value is "8" (8:00 AM).
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This organization's business day starts at 7am
bp.Vars.BusinessHourStart = 7;
}
This variable enables you to control when business hours end, and is used in calculations of process due dates. The default Value is "17" (5:00 PM).
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This organization's business day ends at 5pm
bp.Vars.BusinessHourStop = 17;
}
This variable enables you to control if process reminders should be sent ONLY during business hours. The default value for this variable is "true".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Only send reminders during business hours
bp.Vars.CheckReminderBusinessHours = true;
}
This variable enables you to set HTML as the default encode type for Form system variables.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
//Set HTML as the default encode type for Form System variables.
bp.Vars.DefaultHTMLEncode = true;
}
This variable enables you to set your own .ascx file as the default password reminder email. When constructing this email message, you'll want to create a link to the correct password change page for the user. Creating this link will require the use of a system variable formatter, PWD_GUID, which is a special formatter for use with password changes. This formatter returns the Password Change GUID for the user. This value is returned from the guidPwdChange field from the tblUser table in the Process Director database. This field value is saved to the database when the user requests a password reset and it is reset as soon as they log in.
To construct the URL for the password change page in your custom email, you can have the URL dynamically constructed using the following syntax:
{INTERFACE_URL}user_password_reset.aspx?pwdguid={EMAIL_USER,format=PWD_GUID}
The Interface URL system variable will return the interface URL setting from your system to return the base URL for the Process Director server, followed by a slash. The Email User system variable, using the PWD_GUID formatter, will return the Password Change GUID that was set for the user when they asked for a password reset.
With this syntax, the requesting user will receive an email with the correct link to the password reset page for their specific password reset request.
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Custom ASCX file to use as password reminder email
bp.Vars.DefaultPasswordEmail = "~/custom/YourCustomPasswordEmail.ascx";
}
This Custom Variable was deprecated in Process Director v5.45.100, and should no longer be used. Instead, appropriate conditions should be assigned to tabs via the UI. It remains in the product for legacy customers only.
This variable, when set to "true", enables users to disable individual tabs in form definitions that use the TabStrip/TabContent controls. The default for this option is "False".
Example
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Enable Tab Control disabling
bp.Vars.DisabledTabsDisabled = true;
}
This variable, when set to "true", will make every connection to Process Director a mobile device connection. Even Desktop connections will be presented as mobile connections. This can he helpful for preventing some mobile devices from trying to use the Desktop UI for Process Director.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Force mobile connection
bp.Vars.ForceMobileAdvanced = true;
}
This variable, when set to "true", will force the the “HttpOnly” attribute be used on session cookies in the browser. The default value for this variable is "false".
Enabling this setting will prevent the use of the BP Logix plugin for editing Word-based forms.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Force HttpOnly attribute for session cookies
bp.Vars.ForceHttpOnlyCookies = true;
}
This variable, when set to "true", will force the “Secure” attribute be used on session cookies in the browser. The default value for this variable is "false".
This setting is only valid for https sessions.
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Force secure cookies for HTTPS
bp.Vars.ForceSecureCookies = true;
}
This variable, when set to the default value of "true", enables the home workspace to be refreshed after completing tasks from an email. To disable this feature, set the value to "false".
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Turn off workspace refresh
bp.Vars.RefreshParentWorkspaces = false;
}
By default, this variable is set to "true" which prevents the Windows Session ID from being transmitted via JavaScript. Some older versions of Internet Explorer, however, require Session IDs to be passed on the URL for popup windows that are opened via JavaScript. So, if you encounter this scenario, set this variable to "false".
Example
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Pass the SID via JavaScript to popup windows
bp.Vars.RemoveSIDFromJS = false;
}
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.