You are on page 1of 104

PROCESS DIRECTOR

DEVELOPERS REFERENCE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Last revision: July 9, 2010 
 
BP Logix Inc. Process Director ii
Developers Reference

© 2010 BP Logix Inc. All rights reserved.

Contents ⎜ ii
 
BP Logix Inc. Process Director iii
Developers Reference

Contents
OVERVIEW ...................................................................................................................................................................................... 2 
UNDERSTANDING WORKFLOW/PROCESS DIRECTOR ........................................................................................................................................... 2 
SCRIPT TYPES ............................................................................................................................................................................................ 2 
CUSTOMIZATION THROUGH SCRIPTING ............................................................................................................................................................ 2 
CUSTOM SCRIPTING ........................................................................................................................................................................ 4 
EFORM SCRIPTS ......................................................................................................................................................................................... 4 
WORKFLOW SCRIPTS .................................................................................................................................................................................. 6 
Using a Specific Workflow Script File ............................................................................................................................................... 6 
Writing a Workflow Script Function ................................................................................................................................................. 6 
Debugging Workflow Scripts ............................................................................................................................................................ 7 
KNOWLEDGE VIEW SCRIPTS .......................................................................................................................................................................... 7 
Writing a Knowledge View Script Function ...................................................................................................................................... 7 
CUSTOM ASPX PAGES ................................................................................................................................................................................ 8 
CREATING ASP.NET EFORMS ........................................................................................................................................................... 9 
ADDING A NEW EFORM DEFINITION ............................................................................................................................................................... 9 
DEVELOPING AN EFORM IN THE .NET ENVIRONMENT ......................................................................................................................................... 9 
Include Files .................................................................................................................................................................................... 10 
Using a .DLL file with Your Scripts .................................................................................................................................................. 10 
Activity Check Page ........................................................................................................................................................................ 10 
BP Logix Visual Studio Plug‐in ........................................................................................................................................................ 10 
CLASSES......................................................................................................................................................................................... 12 
BP CLASS ................................................................................................................................................................................................ 12 
Methods ......................................................................................................................................................................................... 12 
DateDiff ..................................................................................................................................................................................... 12 
FormatCurr ................................................................................................................................................................................ 12 
HTMLEncode / HTMLDecode ..................................................................................................................................................... 13 
HTTPRequest ............................................................................................................................................................................. 13 
Int .............................................................................................................................................................................................. 13 
Curr ............................................................................................................................................................................................ 13 
Double ....................................................................................................................................................................................... 13 
Decimal ...................................................................................................................................................................................... 13 
bpDateTime ............................................................................................................................................................................... 13 
log0 ............................................................................................................................................................................................ 14 
log1 ............................................................................................................................................................................................ 14 
log2 ............................................................................................................................................................................................ 14 
log3 ............................................................................................................................................................................................ 14 
log4 ............................................................................................................................................................................................ 14 
log5 ............................................................................................................................................................................................ 14 
Login .......................................................................................................................................................................................... 14 
SendEmail .................................................................................................................................................................................. 15 
ImportExcelDatabase ................................................................................................................................................................. 15 
CONTENTOBJECT CLASS ............................................................................................................................................................................ 16 
Methods ......................................................................................................................................................................................... 16 
GetObjectByID ........................................................................................................................................................................... 16 
GetObjectByPathName .............................................................................................................................................................. 17 
AddObjectMap .......................................................................................................................................................................... 17 

Contents ⎜ iii
 
BP Logix Inc. Process Director iv
Developers Reference

Add ............................................................................................................................................................................................ 17 
AddDocumentFromFS................................................................................................................................................................ 18 
AddDocumentFromBytes .......................................................................................................................................................... 18 
ConvertSysVarsInString ............................................................................................................................................................. 18 
CopyObject ................................................................................................................................................................................ 19 
DeleteObject .............................................................................................................................................................................. 19 
GetAttribute .............................................................................................................................................................................. 19 
GetAttributes ............................................................................................................................................................................. 20 
GetChildren................................................................................................................................................................................ 20 
GetFileType ................................................................................................................................................................................ 20 
MoveObject ............................................................................................................................................................................... 21 
RemoveObjectFromParent ........................................................................................................................................................ 21 
SetAttribute ............................................................................................................................................................................... 21 
SetGroupName .......................................................................................................................................................................... 22 
UpdateObject ............................................................................................................................................................................ 22 
DATASOURCE CLASS ................................................................................................................................................................................. 22 
Methods ......................................................................................................................................................................................... 23 
GetDataSourceByDSID ............................................................................................................................................................... 23 
GetDataSourceByName ............................................................................................................................................................. 23 
DOCUMENT OBJECT CLASS ......................................................................................................................................................................... 23 
Methods ......................................................................................................................................................................................... 24 
GetDocumentByDID .................................................................................................................................................................. 24 
WriteDocumentToDisk .............................................................................................................................................................. 24 
SetDocReviewable ..................................................................................................................................................................... 24 
DROPDOWN OBJECT CLASS ........................................................................................................................................................................ 25 
Methods ......................................................................................................................................................................................... 25 
GetDropDownByDDID ............................................................................................................................................................... 25 
SetDropDownValues .................................................................................................................................................................. 25 
DROPDOWNVALUE OBJECT CLASS ............................................................................................................................................................... 26 
Methods ......................................................................................................................................................................................... 26 
GetDropDownValues ................................................................................................................................................................. 26 
SetDropDownValues .................................................................................................................................................................. 26 
Constructor .................................................................................................................................................................................... 27 
FOLDER CLASS ......................................................................................................................................................................................... 27 
Methods ......................................................................................................................................................................................... 28 
GetFolderByID ........................................................................................................................................................................... 28 
GetFolderByPathName .............................................................................................................................................................. 28 
CreatePath ................................................................................................................................................................................. 28 
CreateNewFolder ....................................................................................................................................................................... 29 
CreateSubFolder ........................................................................................................................................................................ 29 
FORM CLASS ........................................................................................................................................................................................... 29 
Methods ......................................................................................................................................................................................... 30 
GetFormByFORMINSTID ............................................................................................................................................................ 30 
Instantiate ................................................................................................................................................................................. 30 
AddErrorMessage ...................................................................................................................................................................... 31 
AddInfoMessage ........................................................................................................................................................................ 31 
AddJavaScript ............................................................................................................................................................................ 32 
ConvertSysVarsInString ............................................................................................................................................................. 32 
FormControl .............................................................................................................................................................................. 32 
FormControls ............................................................................................................................................................................. 33 
FormControlByID ....................................................................................................................................................................... 33 
GetJavaScript ............................................................................................................................................................................. 34 
RecalcFormInstanceName ......................................................................................................................................................... 34 
SaveForm ................................................................................................................................................................................... 34 
GetErrorMessages ..................................................................................................................................................................... 34 
GetInfoMessages ....................................................................................................................................................................... 35 
FORMCONTROL CLASS .............................................................................................................................................................................. 35 
Methods ......................................................................................................................................................................................... 36 
AddRow ..................................................................................................................................................................................... 36 
AddToDropDown ....................................................................................................................................................................... 36 

Contents ⎜ iv
 
BP Logix Inc. Process Director v
Developers Reference

ClearDropDown ......................................................................................................................................................................... 37 
ClearRows .................................................................................................................................................................................. 37 
ColumnSum ............................................................................................................................................................................... 38 
FillDropDown ............................................................................................................................................................................. 38 
RemoveRow ............................................................................................................................................................................... 38 
SelectDropDown ........................................................................................................................................................................ 39 
SwapRows .................................................................................................................................................................................. 39 
Sub‐Class ........................................................................................................................................................................................ 40 
FORMMESSAGESTRING CLASS .................................................................................................................................................................... 40 
Constructor .................................................................................................................................................................................... 40 
GROUP CLASS ......................................................................................................................................................................................... 40 
Methods ......................................................................................................................................................................................... 40 
GetGroupByID ............................................................................................................................................................................ 40 
GetGroupByName ..................................................................................................................................................................... 41 
AddUser ..................................................................................................................................................................................... 41 
HasUser ..................................................................................................................................................................................... 42 
Delete ........................................................................................................................................................................................ 42 
RemoveUser .............................................................................................................................................................................. 42 
PARTITION CLASS ..................................................................................................................................................................................... 43 
Methods ......................................................................................................................................................................................... 43 
GetPartitionID ............................................................................................................................................................................ 43 
GetPartition ............................................................................................................................................................................... 43 
GetPartitionByName .................................................................................................................................................................. 44 
GetPartitionByID ........................................................................................................................................................................ 44 
GetRootFolder ........................................................................................................................................................................... 44 
CreateFolder .............................................................................................................................................................................. 45 
GetDataSources ......................................................................................................................................................................... 45 
USER CLASS ............................................................................................................................................................................................ 45 
Methods ......................................................................................................................................................................................... 46 
CreateUser ................................................................................................................................................................................. 46 
GetUserByID .............................................................................................................................................................................. 46 
GetUserByUserID ....................................................................................................................................................................... 47 
AddUserToPartition ................................................................................................................................................................... 47 
AddUserToProfile ...................................................................................................................................................................... 47 
AddToGroup .............................................................................................................................................................................. 48 
InGroup ...................................................................................................................................................................................... 48 
Delete ........................................................................................................................................................................................ 48 
DelegateUser ............................................................................................................................................................................. 49 
UnDelegateUser ........................................................................................................................................................................ 49 
RemoveFromGroup ................................................................................................................................................................... 49 
WORKFLOW CLASS ................................................................................................................................................................................... 50 
Methods ......................................................................................................................................................................................... 50 
ConvertSysVarsInString ............................................................................................................................................................. 50 
GetWorkflowByWFID ................................................................................................................................................................. 51 
GetWorkflowByWFINSTID ......................................................................................................................................................... 51 
PostEvent ................................................................................................................................................................................... 51 
Instantiate ................................................................................................................................................................................. 52 
JumpToStep ............................................................................................................................................................................... 52 
JumpToStepID ............................................................................................................................................................................ 52 
SetCurrentFormInstance ........................................................................................................................................................... 53 
Start ........................................................................................................................................................................................... 53 
Restart ....................................................................................................................................................................................... 53 
Run ............................................................................................................................................................................................ 54 
PostEvent ................................................................................................................................................................................... 54 
SetPriority .................................................................................................................................................................................. 54 
AddToWorkflow ......................................................................................................................................................................... 55 
Cancel ........................................................................................................................................................................................ 55 
WORKFLOWSTEP CLASS ............................................................................................................................................................................ 56 
Methods ......................................................................................................................................................................................... 57 
ConvertSysVarsInString ............................................................................................................................................................. 57 

Contents ⎜ v
 
BP Logix Inc. Process Director vi
Developers Reference

GetWorkflowStepBySTID ........................................................................................................................................................... 57 
GetWorkflowStepBySTINSTID .................................................................................................................................................... 57 
GetWorkflowStepByName ......................................................................................................................................................... 58 
AddUsersToStep ........................................................................................................................................................................ 58 
RemoveUsersFromStep ............................................................................................................................................................. 59 
SetStepMessage ........................................................................................................................................................................ 59 
SetStepError .............................................................................................................................................................................. 59 
WORKFLOWSTEPUSER CLASS ..................................................................................................................................................................... 59 
Methods ......................................................................................................................................................................................... 60 
ConvertSysVarsInString ............................................................................................................................................................. 60 
GetWorkflowStepUserBySUINSTID ............................................................................................................................................ 60 
EFORM CONTROLS ................................................................................................................................................................................... 61 
AddRow .......................................................................................................................................................................................... 61 
Array .............................................................................................................................................................................................. 61 
ArrayRemoveRow ........................................................................................................................................................................... 62 
ArrayMoveUp ................................................................................................................................................................................. 62 
ArrayMoveDown ............................................................................................................................................................................ 63 
Attach ............................................................................................................................................................................................. 63 
bpButton ........................................................................................................................................................................................ 64 
bpCheckBox .................................................................................................................................................................................... 64 
bpLabel ........................................................................................................................................................................................... 64 
bpString .......................................................................................................................................................................................... 65 
bpTextBox ...................................................................................................................................................................................... 65 
ButtonArea ..................................................................................................................................................................................... 65 
Calculate ........................................................................................................................................................................................ 66 
Cancel ............................................................................................................................................................................................. 66 
CommentLog .................................................................................................................................................................................. 67 
ContentPicker ................................................................................................................................................................................. 67 
ControlPicker .................................................................................................................................................................................. 68 
DatePicker ...................................................................................................................................................................................... 68 
DateTimePicker .............................................................................................................................................................................. 68 
DateDiff .......................................................................................................................................................................................... 69 
DBConnectorPicker ......................................................................................................................................................................... 69 
DropDown ...................................................................................................................................................................................... 69 
FormErrorStrings ............................................................................................................................................................................ 70 
FormInfoStrings .............................................................................................................................................................................. 70 
GroupPicker .................................................................................................................................................................................... 70 
HTML .............................................................................................................................................................................................. 70 
IgnoreSection ................................................................................................................................................................................. 71 
KView ............................................................................................................................................................................................. 71 
ListBox ............................................................................................................................................................................................ 71 
Print................................................................................................................................................................................................ 72 
Radio .............................................................................................................................................................................................. 72 
RemoveRow ................................................................................................................................................................................... 73 
RichText .......................................................................................................................................................................................... 73 
RoutingSlip ..................................................................................................................................................................................... 73 
Save ................................................................................................................................................................................................ 74 
Section ............................................................................................................................................................................................ 75 
ShowAttach .................................................................................................................................................................................... 75 
SignatureComments ....................................................................................................................................................................... 76 
Sum ................................................................................................................................................................................................ 77 
SysVar ............................................................................................................................................................................................ 77 
TabStrip .......................................................................................................................................................................................... 77 
Tab ................................................................................................................................................................................................. 78 
TabStripContent ............................................................................................................................................................................. 78 
TabContent..................................................................................................................................................................................... 78 
TimePicker ...................................................................................................................................................................................... 78 
UserPicker ...................................................................................................................................................................................... 79 
CUSTOMIZATION FILE .................................................................................................................................................................... 81 

Contents ⎜ vi
 
BP Logix Inc. Process Director vii
Developers Reference

CUSTOM VARIABLES ................................................................................................................................................................................. 82 
ADGrouphierarchy .......................................................................................................................................................................... 82 
ADAuthSettings .............................................................................................................................................................................. 83 
ADAuthNoDomain .......................................................................................................................................................................... 83 
BusinessHolidays ............................................................................................................................................................................ 83 
BusinessHourStart .......................................................................................................................................................................... 83 
BusinessHourStop ........................................................................................................................................................................... 84 
CheckReminderBusinessHours ....................................................................................................................................................... 84 
fAllowRetrievePassword................................................................................................................................................................. 84 
fAllowV6Import .............................................................................................................................................................................. 84 
fPDFCreateOtherAsAttachments .................................................................................................................................................... 84 
fReenableUsersOnSync .................................................................................................................................................................. 85 
fTestMode ...................................................................................................................................................................................... 85 
nFormOpenProps ........................................................................................................................................................................... 85 
EmbedDocumentTypes ................................................................................................................................................................... 85 
InlineDocumentTypes ..................................................................................................................................................................... 86 
nMaxAdminRows ........................................................................................................................................................................... 86 
sLocalIPs ......................................................................................................................................................................................... 86 
sStyleEnabled ................................................................................................................................................................................. 86 
sStyleDisabled ................................................................................................................................................................................ 86 
sStyleRequired ................................................................................................................................................................................ 87 
sStyleError ...................................................................................................................................................................................... 87 
TestUserEmails ............................................................................................................................................................................... 87 
Vars ................................................................................................................................................................................................ 87 
CUSTOM WORKFLOW REMINDER TIMES ....................................................................................................................................................... 87 
CUSTOM WORKFLOW STEP COLORS ............................................................................................................................................................. 88 
CUSTOM PROJECT REMINDER TIMES ............................................................................................................................................................ 88 
CUSTOM EFORM CONTROL STYLES ............................................................................................................................................................... 88 
WEB SERVICES ............................................................................................................................................................................... 90 
CALLING BP LOGIX WEB SERVICES ............................................................................................................................................................... 90 
EXTENDING BP LOGIX WEB SERVICES ........................................................................................................................................................... 90 
CALLING OTHER WEB SERVICES .................................................................................................................................................................. 91 
CUSTOM TASKS ............................................................................................................................................................................. 92 
WHAT CUSTOM TASKS CAN BE USED FOR ..................................................................................................................................................... 92 
HOW CUSTOM TASKS WORK ...................................................................................................................................................................... 92 
Configuration vs. Running .............................................................................................................................................................. 92 
Configuration Data .................................................................................................................................................................... 92 
Container eForm ........................................................................................................................................................................ 93 
Workflow Custom Tasks ................................................................................................................................................................. 93 
eForm Custom Tasks ...................................................................................................................................................................... 93 
CREATING A CUSTOM TASK ........................................................................................................................................................................ 93 
Building the eForm and Script ........................................................................................................................................................ 93 
INDEX ............................................................................................................................................................................................ 95 

Contents ⎜ vii
 
BP Logix Inc. Process Director 1
Developers Reference

Contents ⎜ 1
 
BP Logix Inc. Process Director 2
Developers Reference

OVERVIEW
This document describes the customization that is available for Workflow/Process Director. This is intended for companies that 
require customization of workflow or eForms processing, or that require integration into other applications. The reader should be 
familiar with Workflow/Process Director. Refer to the Workflow/Process Director System Administrators Guide for more 
information.  

Understanding Workflow/Process Director


Workflow/Process Director can be used for a variety of functions. It is a content management system with integrated workflow, 
document management, eForms processing, document imaging, and knowledge management. During the workflow, versioning, and 
review processes, corporate users can be assured of secure access to shared documents and digital content stored in 
Workflow/Process Director database.  

Script Types
Workflow/Process Director support various content types in the database. Throughout this document the term object will be used to 
generically refer to one or more of the following content types below.  

Knowledge Views   
The Knowledge View scripts are stored as ASCX files on Workflow/Process Director. They can be placed anywhere in the Content List 
and are referenced (pointed to) by the Knowledge View Definition in the database. After the Knowledge View filter is evaluated 
against the result set, the optional Knowledge View is called allowing you to programmatically modify the result set. 

eForm   
The eForm scripts are stored as ASCX files on Workflow/Process Director. They can be placed anywhere in the Content List and are 
referenced (pointed to) by the eForm Definition in the database.  The script files can contain both client‐side JavaScript and server‐
side C#. 

Workflow
The Workflow scripts are stored as ASCX files on Workflow/Process Director. They can be placed anywhere in the Content List and 
are referenced (pointed to) by the Workflow Definition in the database.  

.NET eForm
The .NET eForm allows you to develop in the .NET environment. Which will enable the full functionality that .NET offers. Integrate 
with workflows, eForms and knowledge views through customization and scripts. This guide references all classes and controls that 
can be used with eForms. To create an eForm using the eForm Builder refer to the Implementers Reference Guide. 

Customization through Scripting


Workflow/Process Director provide customization options and API’s that allow the product to provide specialized business logic 
needed by your organization. This allows you to customize the various functions and interfaces of Workflow/Process Director; it also 
allows the product to interface with external systems. There are three main areas that your custom scripts get called: eForm 
processing, workflow processing, and configuring user options. This customization is not required, but is important when you want 
to perform specific business logic for your requirements. The customization is provided by allowing you to create and write custom 
.NET controls and functions. These custom functions can get and/or modify data within Workflow/Process Director or external 
applications. 
 

Contents ⎜ 2
 
BP Logix Inc. Process Director 3
Developers Reference

To develop Scripts inside Visual Studio, use the fully functional Visual Studio project installed with the product named bpVS.zip. This 
project includes the DLL’s necessary to use Intellisense and compile‐time error checking. 

Contents ⎜ 3
 
BP Logix Inc. Process Director 4
Developers Reference

CUSTOM SCRIPTING
eForm Scripts
This section documents how to customize eForms using the eForm scripting environment. eForm scripts can be used for both 
Microsoft Word‐based eForms, and native .ASCX eForms. 
 
To develop eForm Scripts inside Visual Studio, use the fully functional Visual Studio project installed with the product named 
bpVS.zip. Refer to the sample files eform_*.ascx. 
 
Scripts for Microsoft Word‐based eForms should be placed into a separate .ASCX document in the Content List. Here is the structure 
for this type of script: 
 
<%@ Control Language="C#" AutoEventWireup="false"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>
<script runat="server">
// Events …
</script>

<script>
// Insert client-side JavaScript code and functions here ...
</script>
 
Scripts for .ASCX eForms are typically placed in the same file as the .ASCX source form. Here is the structure for this type of form: 
 
<%@ Control Language="C#" AutoEventWireup="false"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>
// Actual eForm contents …
<script runat="server">
// Events …
</script>

<script>
// Insert client-side JavaScript code and functions here ...
</script>
 
In both cases, the APIs and events available are the same. All events will be called with the following environment: 
Local Variable  Description 
CurrentForm  Reference to the current Form instance object 
CurrentUser    Optional instance of the current User object 
CurrentPartition  Instance of the current Partition object 
CurrentWorkflow  Optional instance of the current Workflow object 
CurrentWorkflowStep  Optional instance of the current WorkflowStep object 
CurrentWorkflowStepUser  Optional instance of the current WorkflowStepUser object 
CurrentProject  Optional instance of the current Project object 
CurrentProjectActivity  Optional instance of the current ProjectActivity object 
CurrentProjectActivityUser  Optional instance of the current ProjectActivityUser object 
bp    The bp environment 
bpEventHandle  The class that holds information about the event that generated postback 
bpEventHandle.EventType  The type of event 
bp.EventType.User – A custom button was hit 

Contents ⎜ 4
 
BP Logix Inc. Process Director 5
Developers Reference

bp.EventType.Complete – A process complete button was hit 
bp.EventType.Cancel – The cancel button was hit 
bp.EventType.Save – The Save button was hit 
bp.EventType.SaveAndClose – The Save and Close button was hit 
bp.EventType.Print – The Print button was hit 
bp.EventType.CancelClose – The Cancel process button was hit 
bpEventHandle.EventName  The name of the control that initiated the postback 
bpEventHandle.EventControl  The actual FormControl of the control that initiated the postback 
   
The eForm life cycle has the following event callbacks: 
<%@ Control Language="C#" AutoEventWireup="true"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>

<script runat="server">

// These methods are optionally overridden to allow custom script to be inserted into the
// eForm life-cycle.

// Called 1 time per form instance to initialize form fields


protected override void BP_FormInitialize()
{
}

// Called first time in ViewState that form is displayed


protected override void BP_ViewStateInit()
{
}

// Called for every event control and complete button


protected override void BP_Event(bp.EventType pEventType, string pEventName)
{
}

// Called prior to processing rules


protected override void BP_Rules()
{
}

// Called after processing rules


protected override void BP_Rules_Post()
{
}

// Called prior to completing before internal validation


protected override void BP_Validation()
{
}

// Called prior to completing after internal validation


protected override void BP_Validation_Post()
{
}

// Called prior to saving form data and closing form


protected override void BP_Completed()
{
}

// Called just prior to displaying a form


protected override void BP_Display()
{
}

</script>
 
These methods are optionally overridden to allow custom script to be inserted into the eForm life‐cycle: 

Contents ⎜ 5
 
BP Logix Inc. Process Director 6
Developers Reference

Event  Description 
BP_FormInitialize()  Called 1 time per form instance to initialize form fields 
BP_ViewStateInit()  Called first time in ViewState that form is displayed 
BP_Event(bp.EventType pEventType, string  Called for every event control and complete button 
pEventName)    
    pEventType – The type of control that caused the event. 
See sample above for example.  bp.EventType.User – A user event from a form
control.
bp.EventType.Complete – One of the complete buttons on a form.
bp.EventType.Save – Save form data.
bp.EventType.SaveAndClose - Save form data and close form.
bp.EventType.Print - Print form.
bp.EventType.CancelClose - Cancel workflow or form submission.
 
pEventName – The ID of the form control that cause the event. 
 
BP_Rules()  Called prior to processing rules 
BP_Rules_Post()  Called after processing rules 
BP_Validation()  Called prior to completing before internal validation 
BP_Validation_Post()  Called prior to completing after internal validation 
BP_Completed()  Called prior to saving form data and closing form 
BP_Display()  Called just prior to displaying a form 

Workflow Scripts
This section documents how to write custom workflow scripts for Workflow/Process Director. A workflow script is called from a 
Script step in a workflow definition. The Script task type specifies a Script Function Name. This function name can a custom script 
function. Your custom workflow functions can be located on a specific custom script file (in the Workflow/Process Director database) 
to use for each workflow definition. The workflow definition can only call custom functions in a single script file. 
To develop Workflow View Scripts inside Visual Studio, use the fully functional Visual Studio project installed with the product 
named bpVS.zip. Refer to the sample file workflow_script.ascx. 

Using a Specific Workflow Script File


To write a custom script for a workflow, create a script file with “.ASCX” as the file extension on your local hard drive. Add your 
custom script code and then upload the file to the Workflow/Process Director database using the Create New menu item in the 
Content List (select Document/File in the dropdown). Browse to the location of your ASCX file and upload the file to 
Workflow/Process Director. This file will be displayed in the Content List on the server. To make changes to this script file, you must 
check out the file first, update it, and then upload the new version. For information about modifying files and documents on 
Workflow/Process Director, refer to the Implementers Reference Guide. The script for a workflow is configured in the Properties 
page of the workflow definition. The script must exist in the Workflow/Process Director database and it will be called when a Script 
task is run in the workflow. For more information on configuring workflow definition properties refer to Workflow chapter in the 
Implementers Reference Guide. 

Writing a Workflow Script Function


The optional parameters specified in the Script task are used to call your Script function in the workflow custom script file. For 
example if you specify “SOME_PARM” as the Script Parameters specified in the Script task, the parameter to your C# function 
(pParm in the example below) will be set to “SOME_PARM”.  If you need to pass multiple values to the workflow script, you will 
need to encode the values by separating them by commas or other techniques (e.g. MY_PARM,1,2). The entire string will be passed 
to the workflow script function (WF_Script) as a single parameter. You will need to parse the string into its components using C# 
string manipulation functions. Your function in the script file would look as follows: 

Contents ⎜ 6
 
BP Logix Inc. Process Director 7
Developers Reference

 
<%@ Control Language="C#" AutoEventWireup="false"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>
<script runat="server">
public override void WF_Script(string pParm)
{
bp.log0("Called workflow script:" + pParm);
}
</script>

This function is immediately available to all workflows as soon as the file is saved. You may also use System Variables in the Script 
Step parameter field to extend the capabilities of the workflow script. 
This method will be called with the following environment: 
Local Variable  Description 
CurrentWorkflow  The current Workflow object 
CurrentWorkflowStep  The current WorkflowStep object 
CurrentForm  Optional Form instance object of workflow form 
CurrentPartition  Instance of the current Partition object 
CurrentProject  Optional instance of the current Project object 
CurrentProjectActivity  Optional instance of the current ProjectActivity object 
bp    The bp environment 

Debugging Workflow Scripts


To test your custom script, run the workflow that contains a Script task that calls your function. When that step in the workflow is 
run, any error will cause the step to remain running and never complete. View this step using the Graphical Administration tab in the 
Workflow Package.  
If any errors are encountered running the workflow script, the workflow step will stop with and have the status set to Error. The 
status field of the workflow step will show the exact error (e.g. a compile error for the script). Correct any errors in your custom 
script and then right click the workflow step in the Graphical Administration, and select Restart Step. When your script runs 
successfully the workflow step will complete and transition to the next step in the workflow.  
Other techniques to debug a workflow script are to use the logging functions such as bp.log0, and bp.log1.  

Knowledge View Scripts


This section provides a reference for writing custom Knowledge View scripts for Workflow/Process Director. The Knowledge View 
supports a custom script can that be called before the results are displayed to the user. The custom scripts are stored in the 
Workflow/Process Director database in the Content List. The custom script is used to inspect, modify, calculate, or remove results 
from the Knowledge View.  
To develop Knowledge View Scripts inside Visual Studio, use the fully functional Visual Studio project installed with the product 
named bpVS.zip. Refer to the sample file kview_script.ascx. 

Writing a Knowledge View Script Function


A Knowledge View can have a custom script that can alter the results of the displayed information. 
 
When the Knowledge View runs, it will call this method in the script for EVERY row in the result: 
public override bool KV_Display(List<NameValueEx> pColumns, ContentObject pObject)
 
The example below will add the HTML “bold” tag around the value for the Amount columns. 

Contents ⎜ 7
 
BP Logix Inc. Process Director 8
Developers Reference

<%@ Control Language="C#" AutoEventWireup="false"


Inherits="BPLogix.WorkflowDirector.SDK.bpScript" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="BPLogix.WorkflowDirector.SDK" %>
<script runat="server">
public override bool KV_Display(List<NameValueEx> pColumns, ContentObject pObject)
{
foreach (var entry in pColumns)
{
// Bold the Amount column
if (entry.Name == "Amount")
{
entry.Value = "<b>" + entry.Value + "</b>";
}
}
return true; // Return true if a value has changed
}
</script>
Notice that Knowledge View scripts inherit from  BPLogix.WorkflowDirector.SDK.bpScript. 
This method will be called with the following environment: 
Local Variable  Description 
CurrentUser    Optional instance of the current User object 
CurrentPartition  Instance of the current Partition object 
bp    The bp environment 

Custom ASPX Pages


You can extend the BP Logix web application by providing your own custom .ASPX pages (typically placed into the /custom folder). 
These pages can call BP Logix SDK APIs, or perform any other logic. This page can be used, for example, to perform scheduled logic 
using the Windows Scheduler. Or you can write custom pages that are called from external applications or portals. 
See the sample in the /custom/samples/SamplePage.aspx.sample file. Notice that the page is derived from the 
BPLogix.WorkflowDirector.SDK.bpCustomPage class. This allows you to call any BP Logix SDK API from the new page. Your code will 
typically be placed into the Page_Load event. 
To create custom ASPX pages inside Visual Studio, use the fully functional Visual Studio project installed with the product named 
bpVS.zip. Refer to the sample file SamplePage.aspx. 
 

Contents ⎜ 8
 
BP Logix Inc. Process Director 9
Developers Reference

CREATING ASP.NET EFORMS


This section will describe how to create and manage an eForm, how to set the different variables associated with the eForm form 
fields, and how to implement your custom scripting. You will notice some differences from previous versions such as no more form 
page refresh, the eForms now utilize AJAX which eliminates the page refresh when using events.  Please keep in mind; this is for 
eForm development using ASP.Net. We will not be using the eForm builder for this section. 

Adding a New eForm Definition


To create a new eForm definition, you will have to create an .ascx page using your development tool. There is one line of code 
that must be included before you upload your new page. Please copy and paste the following in the first line of your page: 
<%@ Control Language="C#" AutoEventWireup="false"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>

Once you have created your eForm you can upload the eForm by selecting “eForm Definition” from the “Create New” dropdown 
selection box. You will be presented with a page to browse and select. You will also have the option to provide a definition name and 
description. 

 
For more information about the eForm and it’s properties please refer to the Implementers Reference Guide.  

Developing an eForm in the .NET environment


There are two ways to develop eForms within Workflow Process Director. The first uses the eForm Builder Plugin extension of 
Microsoft Word documented in the Implementers Reference. The other approach is to develop native ASP.NET forms which is 
described here. 
 
To develop eForms inside Visual Studio, use the fully functional Visual Studio project installed with the product named bpVS.zip. 
Refer to the sample files eform_*.aspx. 
 
This section will provide you the basics of developing your eform in Visual Studio 2008. Developing in this environment requires the 
knowledge to program in ASP.NET.  You will be able to use ASP.NET controls as well as extended controls created by BP Logix. 

Contents ⎜ 9
 
BP Logix Inc. Process Director 10
Developers Reference

When creating an eForm for Workflow/Process Director, you are actually creating a custom control (.ascx). You create your eForm 
just as if you were creating in the .aspx page. Below you will see the basic structure of the eForm. 
<%@ Control Language="C#" AutoEventWireup="true"
Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %>

<script runat="server">

// Add any events here that will be called as part of the eForm life-cycle …

// See the Custom Scripting / eForm Scripts section for more information

</script>

Include Files
This allows common functions to be called from other script files. To include a file in your eform use the following syntax: 
<!--#include file="~/Custom/MyScripts/script.ascx"-->
 The .ascx must exist on the server file system and is not controlled by Workflow/Process Director (via the Content List). A good 
location for an include file is the /custom/ folder in the Workflow/Process Director web site installation directory. 

Using a .DLL file with Your Scripts


This is an approach to call code from custom scripts. Developers can make a “normal” .NET .dll and place it into the \Program 
Files\BP Logix\Workflow Process Director\website\bin folder on the server. Then they can reference the classes in that .dll through 
any script code in the Workflow/Process Director application. You can use the GAC, but it is easier to use the bin folder (assuming 
the code would not be used “outside” of the Workflow/Process Director environment). DLLs in this folder are accessible only to the 
Workflow/Process Director application. 
In your module placing the public classes into a namespace, such as: 
namespace companyname.custom
{
public class MyClass()
{
// … your methods, properties, etc
public static void MyFunc()
{
}
}
}
Then inside a form script call this function using: 
companyname.custom.MyClass.MyFunc();

Activity Check Page


Workflow/Process Director run as a virtual directory in IIS and processes all time related events like due dates when activity is 
present on the system (e.g. a login). To force this activity checking more often, you can schedule the following command in the 
Windows Scheduler: 
"PATH\bputil.exe" SU "http://localhost/activity_check.aspx"
where PATH is the installation directory for Workflow/Process Director (e.g. c:\Program Files\BP Logix\Workflow Director\). 

BP Logix Visual Studio Plug-in


The BP Logix Visual Studio Plug‐in integrates with Microsoft Visual Studio. It provides the ability to drag and drop Workflow/Process 
Director Controls onto your eforms. The easiest way to take advantage of the BP Logix Visual Studio Plug‐in, use the fully functional 
Visual Studio project installed with the product named bpVS.zip. This project already has the plug‐in installed and Intellisense 
enabled. 
 
The following is a list of the features that are available to you in the plug‐in. 
 

Contents ⎜ 10
 
BP Logix Inc. Process Director 11
Developers Reference

• Drag and Drop Control Editing. The plug-in adds an extension to the Visual Studio Toolbox giving you a list
of all controls that are available to you in the Workflow/Process Director library.
• Control Properties. Properties can now be set in the Properties box of the selected control.
• Intellisense. All controls support full Intellisense to make the parameters easier to configure while in the
Source View.
• Compile. Visual Studio will highlight compile errors.
To enable this plug‐in click on the menu item at the top named View Æ Toolbox. Once the Toolbox is open right click in an open area 
and select “Add Tab”. Name the tab “Workflow/Process Director”.  Ensure the new tab is selected and right‐click on the tab and 
select Choose Items from the list. 
A dialog box will display, select the Browse button under the .Net Framework Components tab. The 
browse dialog box will appear, navigate to the following directory: 
“C:\Program Files\BP Logix\Workflow Director\” and select “bpVSPlugin.dll” then click Open and Ok. 
Restart your Visual Studio application for the complete changes to take effect. 
 

 
 
This will populate the controls in the tab you created. You can now drag and drop the 
controls on the form in design mode or split mode only. You will also be able to use the BP 
Logix Intellisense. By typing your code you will start to see Workflow/Process Director 
Controls, classes, etc. show in the list provided from the Intellisense.  
 
To enable the Intellisense inside Visual Studio, you should create a stand‐alone ASP.NET Web 
Application, and then add the bpVSPlugin.dll to the Bin directory of the project. To create 
new eForms or scripts, use Add New Item‐>Web User Control to create a new .ascx file. Do 
not place code in separate file. For eForms, you can switch into Design or Split view to drag 
and drop controls onto the visual form. You made need to build the application to enable the Intellisense. Ensure all eForms and 
script files have this line at the top of the file: 
 
<%@ Control Language="C#" AutoEventWireup="false" Inherits="BPLogix.WorkflowDirector.SDK.bpFormASCX" %> 
 
Additionally, you can add the following registry key to set the location where the Plugin downloads temporary files (such as scripts 
and eForms): 
HKEY_LOCAL_MACHINE\SOFTWARE\BP Logix\Plugin\DocFolder 
If you set this to a folder that is in your stand‐alone Web Application, then you can use Check Out and Edit for eForms and scripts. 
When the files are opened in Visual Studio, they will gain the benefit of Intellisense and compile‐time error checking. 

Contents ⎜ 11
 
BP Logix Inc. Process Director 12
Developers Reference

CLASSES
bp Class
This object represents the SDK environment. All scripts will have access to this object. This class contains many methods with utility 
routines (such as logging, data conversion, etc). 

Methods
DateDiff
(Static Method)  
This API will determine the value of the difference between two dates. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DateFrom  The origin (starting) date 
DateTo  The termination (ending) date 
DifferenceType  The type or units of difference to calculate (e.g. days, seconds, hours, years) 

Returns 
int – An integer representing the value of the difference between the two dates in the specified units. 

Example 
int days = bp.DateDiff(bp, DateTime.Parse("2000-03-05"), DateTime.Parse("2000-03-09"),
BPLogix.WorkflowDirector.SDK.FormControls.DateDiffType.Days); // Should return the value '4'
int hours = bp.DateDiff(bp, DateTime.Parse("2000-03-05"), DateTime.Parse("2000-03-09"),
BPLogix.WorkflowDirector.SDK.FormControls.DateDiffType.Days); // Should return the value '96'
int years = bp.DateDiff(bp, DateTime.Parse("2000-01-31"), DateTime.Parse("2020-04-01"),
BPLogix.WorkflowDirector.SDK.FormControls.DateDiffType.Days); // Should return the value '20'

FormatCurr
(Static Method) 
This API will return a string that is formatted as a currency. 

Parameters 
Any integer, double, decimal, or string 

Returns 
string – the object formatted in a currency (depending on locale) 

Example 

Contents ⎜ 12
 
BP Logix Inc. Process Director 13
Developers Reference

string TempString;
// Returns $100.00 (assuming USA locale)
TempString = bp.FormatCurr("100");
// Returns $10.10 (assuming USA locale)
TempString = bp.FormatCurr(10.1);
// Returns “”
TempString = bp.FormatCurr("bad value");

HTMLEncode / HTMLDecode
(Static Method) 
These APIs will HTML‐encode or HTML‐decode a string. 

Parameters 
string – the value to convert 

Returns 
Appropriate encoded or decoded value 

Example 
// Returns "You &amp; me"
string test1 = bp.HTMLEncode("You & me");
// Returns "You & me"
string test2 = bp.HTMLDecode("You &amp; me");

HTTPRequest
(Static Method) 
This API will return the URL of the web page. 

Parameters 
String URL – the value to convert 

Returns 
Web page URL 

Example 
// This will load the web page from google.com into a string variable
string Result = bp.HTTPRequest(“http://google.com”);

Int Curr Double Decimal bpDateTime

(Static Method) 
These APIs will convert a string into the appropriate data type. 

Parameters 
string – the value to convert 

Returns 

Contents ⎜ 13
 
BP Logix Inc. Process Director 14
Developers Reference

Appropriate data type depending on method 

Example 
// returns 10
int TempInt = bp.Int("10");
// returns DateTime object
DateTime TempDate = bp.bpDateTime("1/1/2010");

log0 log1 log2 log3 log4 log5

(Static Method) 
These APIs will send a logging message to the bp.log file. This file can be viewed on disk, or you can use the web based log viewer. 
log0 will always be sent to the log file. The other methods will be sent to log file depending on the system log level setting. 
 
The actual log will be written conditionally depending on the current logging level of the system. log0 will always be written, log1 will 
only be written if the logging level is 1 or higher, etc. 

Parameters 
Any formatted string 

Returns 
None 

Example 
bp.log0(“This is a test”);
bp.log0(“Some sample data “ + CurrentForm.FormControl(“mydata”).Text;
bp.log0(“Data1: {0} Data2: {1}”, 10, 20);

Login
(Static Method) 
This API will login as the specified user. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
User  The userid to login 
Password  The password to login 

Returns     
Return Object  Description 
bool      True if success 

Example 

Contents ⎜ 14
 
BP Logix Inc. Process Director 15
Developers Reference

// This will login the user from the edit fields on a form
bp.Login(bp, CurrentForm.FormControl(“userid”), CurrentForm.FormControl(“password”));

SendEmail
(Static Method) 
This API will send an email. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
FORMID  The form ID to use as the email template. 
FORMINSTID  The optional form instance ID to use for variable substitution in the email 
Attachments  A list of document attachments to add to the email 
Subject  The subject of the outgoing email 
ToEmailUID  The UID of the destination 
FormEmailAddress  The email address of the sender of the email 

Returns     
Return Object  Description 
bool      True if success 

Example 
// This will login the user from the edit fields on a form
bp.SendEmail(bp,
oMyFORM.ID, // The form
oMyFORMINST.ID, // The form instance
null, // list of attachments
"My Email Subject", // Subject
newuser.UID, // The ID of the “to” for the email
“from_email@company.com”); // The “from” email address

ImportExcelDatabase
(Static Method) 
This API import an Excel file into a database. The sheet name will be used as the table name in the database. Only sheets with data 
in cell A1 will be imported. Row 1 in Excel is used to specify the column name in the database. You can optionally specify a column 
type for each column by separating the column name from the type with a colon. You can use several database independent column 
types, such as BP_STRING, BP_DECIMAL, BP_BOOL, BP_INT, or BP_DATATIME. If you do not specify a type, the import process will 
guess at the type by looking at the data in the first row. The first data row begins in Excel Row 2. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DestDB  The DataSource of the database to insert the Excel data. 
ExcelPath  The server local path to the Excel file to import (specify this or ExcelDID). 
ExcelDID  The ID of the document in the repository of the Excel file to import (specify this or ExcelPath). 
TBLPrefix  Optional prefix to add to all imported tables. 
DropFirst  Should the tables be DROPed before importing? 
DoCreate  Should the tables be created during the import? 
DeleteFirst  Should the rows be deleted before the import? 

Contents ⎜ 15
 
BP Logix Inc. Process Director 16
Developers Reference

Returns     
Return Object  Description 
bool      True if success 

Example 
// This will import an Excel file into the database
bp.ImportExcelDatabase(bp,
dbConnection, // The database to insert the Excel data
"C:\\db_import.xlsx", // The file path to import
null, // null since we are using a file path
"USER_", // All tables created will have USER_ prefix
true, // drop existing tables first
true, // create all tables in database
false); // no need to delete rows – entire tables were dropped

ContentObject Class
This object represents the base class for all content objects (documents, forms, workflows, etc) stored in Workflow/Process Director. 

Properties 
Property Name  Description 
PID  The internal Partition ID 
ID  The name of this partition 
Type  The description of this partition 
Parent_ID  The optional ID of the parent of this object 
Name  The name of this object 
Description  The description of this object 
GroupName  The optional group name that this object is stored in (e.g. for eForm attachments) 
Size  The size of this object 
CreateTime  The date/time the object was created 
UpdateTime  The date/time the object was last updated 
CreateUID  The UID of the user that created the object 
UpdateUID  The UID of the user that last updated the object 

Methods
GetObjectByID
(Static Method) 
This API will get a content object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
ID  The ID of the object to retrieve 

Returns   
Return Object  Description 

Contents ⎜ 16
 
BP Logix Inc. Process Director 17
Developers Reference

ContentObject  Will return null if object is not found 

Example 
// Normally not used directly
var oObject = ContentObject.GetObjectByID( bp, "1234" );

GetObjectByPathName
(Static Method) 
This API will get an object by its path. 

Parameters   
Parameter Name  Description 
BP    The bp environment. 
PartitionID  The Partition ID or name 
PathName  The complete path to the object to return 

Returns     
Return Object  Description 
ContentObject    The actual object or null if not found 

Example   
// Get the workflow named “My Workflow” in the folder named “My Project”
var SomeWorkflow = ContentObject.GetObjectByPathName(bp, "Partition1", "/My Project/My
Workflow");

AddObjectMap
This API will add a shortcut to the object into the destination. 

Parameters 
Parameter Name  Description 
DestinationID    The ID of the Content Object to add a shortcut into. 
DestinationObjectType  The Type of the Content Object to add a shortcut into. 

Returns     
Return Object  Description 
bool      True if success 

Example 
oObject.AddObjectMap("1234", ObjectType.Folder);

Add
This API will add an object as child to the current object. 

Parameters 
Parameter Name  Description 
Obj  The ContentObject to add to this object. 

Contents ⎜ 17
 
BP Logix Inc. Process Director 18
Developers Reference

ID  The ID of the object to add. 
Group  Optionally the group name to add into. 

Returns     
Return Object  Description 
bool      True if success 

Example 
oObject.Add(Form.Instantiate(bp, Some_FORMID));

AddDocumentFromFS
This API will create a new document under an object from the local file system. 

Parameters 
Parameter Name  Description 
path    The folder or full path to the local file. 
name    Optionally the file name in the path. 

Returns     
Return Object  Description 
ContentObject    The new content object or null if the add fails. 

Example 
oObject.AddDocumentFromFS("c:\\documents\\doc1.doc");

AddDocumentFromBytes
This API will create a new document under an object from a byte array. 

Parameters 
Parameter Name  Description 
Name    Name of the new document. 
Bytes  The array of bytes used to set the document contents. 

Returns     
Return Object  Description 
ContentObject    The new content object or null if the add fails. 

Example 
byte[] DocumentData;
// Set document data from reading from file, web service call, etc
// DocumentData = ….
ParentObject.AddDocumentFromBytes("My Doc.doc", DocumentData);

ConvertSysVarsInString
This API will set the group that the object is in. 

Parameters   

Contents ⎜ 18
 
BP Logix Inc. Process Director 19
Developers Reference

Parameter Name  Description 
String    The string containing optional sysvars to convert. 

Returns     
Return Object  Description 
string    The converted string 

Example 
var NewString = oObject.ConvertSysVarsInString("Convert embedded sysvars like {OBJ_NAME}");

CopyObject
This API will copy the Content Object to a destination 

Parameters 
Parameter Name  Description 
DestinationID    The ID of the Content Object to copy into. 
DestinationObjectType  The Type of the Content Object to copy into. (optional parameter) 

Returns     
Return Object  Description 
string  The ID of the new object, or “” if the copy failed. 

Example 
oObject.CopyObject

DeleteObject
This API will delete the Content Object. Click here for more information on the Content Object. 

Parameters 
none   

Returns   
Return Object  Description 
bool  True if success 

Example 
oObject.DeleteObject();

GetAttribute
This API will get a specific attribute from the object’s meta data. 

Parameters   
Parameter Name  Description 
Category  The Category of the Attribute to retrieve 
Attribute  The Attribute name to retrieve 

Contents ⎜ 19
 
BP Logix Inc. Process Director 20
Developers Reference

Returns     
Return Object  Description 
DataItem    The data corresponding to the Attribute 

Example   
var dataAtt = oObject.GetAttribute("Category 1.Category 2", “Attribute Name”);
var val = dataAtt.String;

GetAttributes
This API will get a list of attributes from the object’s meta data. 

Parameters   
Parameter Name  Description 
Category  The optional Category of the Attributes to retrieve.  Not specifying this will return all Attributes for a particular 
object. 

Returns     
Return Object  Description 
List    The Name‐Value pairs of each Attribute 

Example   
var atts = oObject.GetAttributes("Category 1.Category 2");
foreach( var att in atts )
{
var name = att.Name;
var val = att.Value;
}

GetChildren
This API will create a list of all the children for the content object. 

Parameters   
Parameter Name  Description 
ObjectType  The optional type of objects to filter. 
MapType  The optional map type of the objects to filter. 
GroupName  The optional group name of the objects to filter. 

Returns     
Return Object  Description 
string    The converted string 

Example   
var childList = CurrentWorkflow.GetChildren(ObjectType.Document);

GetFileType
This API will return the file type for documents and eForms. 

Parameters 

Contents ⎜ 20
 
BP Logix Inc. Process Director 21
Developers Reference

none   

Returns     
Return Object  Description 
string    The file extension (e.g. “docx”, “ascx”) of the document or eForm. 

Example   
Var FileType = oObject.GetFileType();

MoveObject
This API will move the Content Object to a new destination 

Parameters 
Parameter Name  Description 
DestinationID    The ID of the Content Object to move into. 
DestinationObjectType  The Type of the Content Object to move into. (optional parameter) 

Returns     
Return Object  Description 
bool  True if success 

Example 
oObject.MoveObject("1234");

RemoveObjectFromParent
This API will remove the Content Object from its parent 

Parameters 
none   

Returns   
Return Object  Description 
bool  True if success 

Example 
oObject.RemoveObjectFromParent();

SetAttribute
This API will set a specific attribute in the object’s Meta Data 

Parameters   
Parameter Name  Description 
Category  The Category of the Attribute to set 
Attribute  The Attribute name to set 
Value  The string or DataItem to assign to the Attribute 

Contents ⎜ 21
 
BP Logix Inc. Process Director 22
Developers Reference

Returns     
Return Object  Description 
bool    True if success 

Example   
oObject.SetGroupName("Category 1.Category 2", "Attribute Name", "1");

SetGroupName
This API will set the group that the object is in. 

Parameters   
Parameter Name  Description 
GroupName    The group for this object. 

Returns     
Return Object  Description 
bool    True if success 

Example   
oObject.SetGroupName("My Group");

UpdateObject
This API will update the name and description properties in the database 

Parameters 
none   

Returns 
Return Object  Description 
bool  True if success 

Example 
oObject.UpdateObject();
("1234");

DataSource Class
This object represents a database DataSource which contains the connection details to connect to a database. The Provider and 
Connection can be used with native ADO.NET calls to connect to external databases. 
This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for this 
object, plus the properties below. 

Properties 
Property Name  Description 
Provider    The Provider string of this connection 
Connection  The connection string for this SQL connection 

Contents ⎜ 22
 
BP Logix Inc. Process Director 23
Developers Reference

DBType  The optional type of database 

Methods
GetDataSourceByDSID
(Static Method) 
This API will get a DataSource object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DSID    The ID of the DataSource to retrieve 

Returns   
Return Object  Description 
DataSource  Will return null if data source is not found 

Example   
// Normally not used directly
var oDS = DataSource.GetDataSourceByDSID(bp, "1234" );

GetDataSourceByName
(Static Method) 
This API will get a DataSource object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
Name    The name of the DataSource to retrieve. 

Returns   
Return Object  Description 
DataSource  Will return null if data source is not found 

Example   
// Get the datasource to my ERP system
var oDS = DataSource.GetDataSourceByName(bp, "ERP System" );

Document Object Class


This object represents a Document.  
This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for the 
Document object, plus the properties below. 

Properties 

Contents ⎜ 23
 
BP Logix Inc. Process Director 24
Developers Reference

Property Name  Description 
FileType  The file extension of the document 
DOS_FileName  The DOS “friendly” file name of the document 
WebViewableOID  The OID of the optional web viewable object 
ManagedOID  The OID of the actual document object 

Methods
GetDocumentByDID
(Static Method) 
This API will get a document object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DID  The ID of the document to retrieve 

Returns   
Return Object  Description 
Document  Will return null if document is not found 

Example 
// Normally not used directly
var oDocument = Document.GetDocumentByDID( bp, "1234" );

WriteDocumentToDisk
This API will write the document to a local file. 

Parameters 
Parameter Name  Description 
DestPath    The full path of the local output file 

Returns 
Return Object  Description 
bool  True if operation succeeds 

Example 
oDocument.WriteDocumentToDisk("c:\\Documents\\SavedDoc.docx");

SetDocReviewable
This API will set the web viewable object for a document 

Parameters 
Parameter Name  Description 
SourcePath  The full path to the local file system of the web viewable object 

Contents ⎜ 24
 
BP Logix Inc. Process Director 25
Developers Reference

Returns 
Return Object  Description 
bool  True if operation succeeds 

Example 
oDocument.SetDocReviewable("c:\\Import\\File.pdf");

Dropdown Object Class


This object is derived from the ContentObject class. This object represents a Content Object of the DropDown type.  It contains a list 
of name/value pairs which can fill a DropDown on a Form. 

Properties 
Property Name  Description 
Values  The list of name/value pairs for the dropdown as a List<DropDownValue> class 
DDID  The DropDown ID of the DropDown Content Object (same as ID property) 

Methods
GetDropDownByDDID
(Static Method) 
This API will return a DropDownObject which corresponds to the ID you pass it. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DDID  The ID of the dropdown object to retrieve 

Returns   
Return Object  Description 
DropDownObject  An instance of the DropDownObject, or null if no DropDown could be found 

Example 
var cDD = CurrentForm.FormControl( "DropDownPick" ).Value; // if "DropDownPick" is a
ContentPicker on a Form
var dd = DropDownObject.GetDropDownByDDID( bp, cDD ); // Now we can use dd for our
DropDownObject
bp.log0( "Number of entries in the DropDown: " + dd.Values.Count );

SetDropDownValues
This API sets the list of DropDown name/value pairs. 

Parameters 
Parameter Name  Description 
Values    The list of name/value pairs for the DropDown as a List<DropDownValue> (or other IEnumerable) class. 

Returns 

Contents ⎜ 25
 
BP Logix Inc. Process Director 26
Developers Reference

Return Object  Description 
True/False  Whether or not the call could set the DropDownObject's values. 

Example 
var ddvlist = new List<DropDownValue>();
ddvlist.Add( new DropDownValue( "[Select a State]", "" ) );
ddvlist.Add( new DropDownValue( "California", "CA" ) );
ddvlist.Add( new DropDownValue( "Texas", "TX" ) );
var cDD = CurrentForm.FormControl( "DropDownPick" ).Value; // if "DropDownPick" is a
ContentPicker on a Form
var dd = DropDownObject.GetDropDownByDDID( bp, cDD );
dd.SetDropDownValues( ddvlist ); // Will set DropDown to contain { "[Select a State]/''",
"California/CA", "Texas/TX" }

DropdownValue Object Class


This object represents a single name/value pair for use in a DropDown and similar controls. 

Properties 
Property Name  Description 
Text  The text to display for the DropDown entry 
Value  The actual value to use when using the DropDown entry 

Methods
GetDropDownValues
(Static Method) 
This API will return the list of name/value pairs for a dropdown as a List<DropDownValue> class. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
DDID  The ID of the DropDown Object from which to retrieve the DropDownValue List 

Returns   
Return Object  Description 
List<DropDownValue>  The list of name/value pairs for the DropDown 

Example 
var cDD = CurrentForm.FormControl( "DropDownPick" ).Value; // if "DropDownPick" is a
ContentPicker on a Form
var ddlist = DropDownValue.GetDropDownValues( bp, cDD );
bp.log0( "Number of entries in the DropDown: " + ddlist.Count );

SetDropDownValues
This API sets the list of DropDown name/value pairs. 

Parameters 
Parameter Name  Description 
Values    The list of name/value pairs for the DropDown as a List<DropDownValue> (or other IEnumerable) class. 

Contents ⎜ 26
 
BP Logix Inc. Process Director 27
Developers Reference

Returns 
Return Object  Description 
True/False  Whether or not the call could set the DropDownObject's values. 

Example 
var ddvlist = new List<DropDownValue>();
ddvlist.Add( new DropDownValue( "[Select a State]", "" ) );
ddvlist.Add( new DropDownValue( "California", "CA" ) );
ddvlist.Add( new DropDownValue( "Texas", "TX" ) );
var cDD = CurrentForm.FormControl( "DropDownPick" ).Value; // if "DropDownPick" is a
ContentPicker on a Form
var dd = DropDownObject.GetDropDownByDDID( bp, cDD );
dd.SetDropDownValues( ddvlist ); // Will set DropDown to contain { "[Select a State]/''",
"California/CA", "Texas/TX" }

Constructor
Parameters 
Parameter  Description 
Name 
Text    The text to display for the DropDown entry 
Value (Optional)  The actual value to use when using the DropDown entry.  If the constructor doesn't receive this parameter, it will 
use the 'Text' parameter for the Value as well. 

Example 
var ddv1 = new DropDownValue( "[Select a Value]", "" ); // Create a value with Text:"[Select a
Value]" and Value:""
var ddv2 = new DropDownValue( "Item1" ); // Creates a value with Text:"Item1" and
Value:"Item1"
var ddv3 = new DropDownValue( "Item1", "Item1" ); // Creates the same DropDownValue as above
("Item1"/"Item1")

Folder Class
This object represents an Folder. 
 
This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for this 
object, plus the properties below. 

Properties 
Property Name  Description 
ID  The ID of this specific form instance 
Name  The text name of this specific form instance 
PID  The Partition ID of the partition where this form resides 
CreateTime  The date/time of this specific form instance’s creation 
UpdateTime  The most recent date/time that a user changed this specific form instance 
CreateUID  The User ID of the user which created this specific form instance 
UpdateUID  The User ID of the user who most recently update this specific form instance 

Contents ⎜ 27
 
BP Logix Inc. Process Director 28
Developers Reference

Methods
GetFolderByID
(Static Method) 
This API will get a Folder from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
FID  The ID of the folder to retrieve 

Returns   
Return Object  Description 
Folder  The actual folder or null if not found 

Example 
Var oFolder = Folder.GetFolderByID ( bp, SomeFolderID );

GetFolderByPathName
(Static Method) 
This API will get a Folder object from the specified Folder Path  . 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
PID  The Paritiion ID or name 
PathName  The complete path of folder to retrieve 

Returns   
Return Object  Description 
Folder  Will return null if partition is not found 

Example 
var oFolder = Folder.GetFolderByPathName ( bp, CurrentPartition, "/folder1/folder2" );

CreatePath
(Static Method) 
This API will create the complete folder path for the specific input. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
PartitionID  The ID of the partition to use 
Path  The complete path to of the folder structure to create 

Contents ⎜ 28
 
BP Logix Inc. Process Director 29
Developers Reference

Returns   
Return Object  Description 
Folder  The newly created folder 

Example 
// Normally not used directly
var oFolder = Folder.CreatePath( bp, CurrentPartition, "/folder1/folder2" );

CreateNewFolder
(Static Method) 
This API will create a new folder in the specified parent. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
ParentID  The ID of the parent 
FolderName  The name of the new folder to create 

Returns   
Return Object  Description 
Folder    The newly created folder 

Example 
// Normally not used directly
var oFolder = Folder.CreateNewFolder( bp, SomeParentID, "New Folder" );

CreateSubFolder
This API will create a sub folder under the current folder 

Parameters 
Parameter Name  Description 
FolderName    The name of the folder to create. 

Returns   
Return Object  Description 
Folder    The newly created folder 

Example 
var NewFolder = oFolder.CreateSubFolder(“Another New Folder”);

Form Class
This object represents an eForm instance. An instance is a completed eForm, or one that is currently being edited. 
When developing eForm scripts (in the various callback methods such as BP_Event) or Workflow scripts, you are automatically given 
an instance of the “current” eForm with the CurrentForm variable. 
 

Contents ⎜ 29
 
BP Logix Inc. Process Director 30
Developers Reference

This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for this 
object, plus the properties below. 

Properties 
Property Name  Description 
ID  The ID of this specific form instance 
FORMID  The ID of the eForm Definition for this instance 
Name  The text name of this specific form instance 
PID  The Partition ID of the partition where this form resides 
CreateTime  The date/time of this specific form instance’s creation 
UpdateTime  The most recent date/time that a user changed this specific form instance 
CreateUID  The User ID of the user which created this specific form instance 
UpdateUID  The User ID of the user who most recently update this specific form instance 
CloseOptions  This can be set in any form script. This property can be set to the following: 
 
FormCloseOptions.CancelAndClose    This will cancel the form when script returns. 
FormCloseOptions.SaveAndClose    This will save and close the form when script returns. 
FormCloseOptions.None      No Action(default) 
FORMINSTID    The optional ID of the eForm instance 
DOCTYPE_HTML        If set to true will use HTML rather than XHTML 
FormPartition  Set to the Partition object of the eForms partition 
ReturnNullsForErrors  If set to true, APIs such as FormControl will return a null if the form control is not found. Otherwise an 
empty class will be returned. The default is false. 

Methods
GetFormByFORMINSTID
(Static Method) 
This API will get an eForm instance object based on the ID. 

Parameters 
Parameter Name  Description 
BP  The bp environment 
FORMINSTID  The ID of the form instance to retrieve 

Returns 
Return Object  Description 
Form  An instance of the form object, or null if it could not be found 

Example 
// This example will get a form instance, and log it’s name
var OtherForm = Form.GetFormByFORMINSTID(bp, "123");
bp.log0("The form instance name is: " + OtherForm.Name);

Instantiate
(Static Method) 
This API will instantiate a new form instance. 

Contents ⎜ 30
 
BP Logix Inc. Process Director 31
Developers Reference

Parameters 
Parameter Name  Description 
BP  The bp environment 
FORMID  The ID of the form definition to instantiate 
SkipDefaultValues  Optional parameter to tell the eForm processor to skip setting default form values. 
true / false 

Returns 
Return Object  Description 
Form  An instance of the form object, or null if it could not be found 

Example 
// This example will create a new form instance
var NewFormInstance = Form.Instantiate(bp, ContentObject.GetObjectByPathName(bp, “Partition1”,
“/My Project/My Form Definition”).ID);
bp.log0("The form instance name is: " + NewFormInstance.Name);

AddErrorMessage
This API will add an error message to the form which will be displayed to the user. If an error message is added, the user will not be 
able to submit the form. 

Parameters 
Parameter Name  Description 
Message  The error message to return (this can be a string or the FormMessageString class). 

Returns 
None 

Example 
// This example will be called in the validation event of a form script
protected override void BP_Validation()
{
// Display an error on the form if the Amount form field is > 100
// and place the focus on the form field “Amount”
If (CurrentCurrentForm.FormControl("Amount").Number > 100)
{
CurrentForm.AddErrorMessage(new FormMessageString("Must be < 100","Amount"));
}
}

AddInfoMessage
This API will add an informational message to the form which will be displayed to the user. If an informational message is added, the 
user will not be able to submit the form. 

Parameters 
Parameter Name  Description 
Message  The informational message to return (this can be a string or the FormMessageString class). 

Returns 
None 

Contents ⎜ 31
 
BP Logix Inc. Process Director 32
Developers Reference

Example 
// This example will be called in every event
protected override void BP_Event()
{
// Display a message on the form if the Amount form field is > 100
If (CurrentCurrentForm.FormControl("Amount").Number > 100)
{
CurrentForm.AddInfoMessage("The amount is > 100");
}
}

AddJavaScript
This API adds a block of JavaScript code to the form. 

Parameters 
Parameter Name  Description 
JavaScript  The actual JavaScript code to add. 

Returns 
None 

Examples 
// We will add our JavaScript in the initial load
protected override void BP_ViewStateiInit()
{
BaseForm.AddJavaScript( "alert( 'Please submit the form before closing it.' )" );
}

ConvertSysVarsInString
This API converts system variables in a string. 

Parameters 
Parameter Name  Description 
String  The string in which to find the system variables. 
FormControl  (Optional) The form control to reference for control‐specific system variables (e.g. "{ROW_NUM}") 

Returns 
Return Object  Description 
string  The resultant string after converting every system variable. 

Examples 
// Returns "USER1 editing this form on 2008-01-01"
bp.log0( Form.ConvertSysVarsInString( "{CURR_USER} editing this form on {CURR_DATE}" ) );
var cText = CurrentForm.FormControl( "Item", 2 );
// Returns "Row number: 2"
string result2 = Form.ConvertSysVarsInString( "Row number: {ROW_NUM}", cText );

FormControl
This API will return a single form control. When using arrays, if you retrieve a form object without specifying a row number, you are 
acting on the entire column. 

Contents ⎜ 32
 
BP Logix Inc. Process Director 33
Developers Reference

Parameters 
Parameter Name  Description 
Name  The name of the form control to retrieve. 
ArrayNum  (optional) Form controls in an array, the row number of the specific control 
ReturnNullIfNotFound  (optional) If set to true, the API will return a null if the form control is not found. If set to false (default), the 
API will return an empty FormControl object if it is not found 

Returns 
Return Object  Description 
FormControl  The form control instance. 

Example 
// Add 1 to the Count form control
CurrentCurrentForm.FormControl("Amount").Number += 1;
// Make the Item in row 2 required
CurrentCurrentForm.FormControl("Item", 2).Display.Required = eYNU.Yes;
// Make the entire Description column required
CurrentCurrentForm.FormControl("Description").Display.Required = eYNU.Yes;

FormControls
This API will return the list of all form controls for this form instance. 

Parameters 
Message – The actual error message to add 

Returns 
List<FormControl> ‐ The list of all form controls for this form instance. 

Example 
var formControls = BaseCurrentForm.FormControls;

FormControlByID
This API will return a form control which corresponds to the ID you pass it.  You would use this when you have a Form's ID (e.g. from 
a ControlPicker control). 

Parameters 
Parameter Name  Description 
ControlID  The ID of the control to retrieve 
ArrayNum  (optional) Form controls in an array, the row number of the specific control 

Returns 
Return Object  Description 
FormControl  The form control instance. 

Examples 

Contents ⎜ 33
 
BP Logix Inc. Process Director 34
Developers Reference

var cPicker = CurrentForm.FormControl( "ControlsPick" ).Value;


// if "ControlsPick" is a ControlPicker on the Form
// Set the form control's text to "Add Another"
CurrentForm.FormControlByID( cPicker ).Text = "Add Another";
var cPick2 = CurrentForm.FormControl( "ControlsPickArray" ).Value;
// Increment the control's value by 1
CurrentForm.FormControlByID( cPick2 ).Number += 1;
// Disable the whole column of the control
CurrentForm.FormControlByID( cPick2 ).Display.Enabled = false;

GetJavaScript
This API gets the current blocks of JavaScript that are added to the form. 

Parameters 
None 

Returns 
Parameter Name  Description 
List<string>  The blocks of JavaScript that will be added to the form. 

RecalcFormInstanceName
This API will force the eForm engine to recalculate the form instance name. This should be used, for example, if you change a form 
field value that is used in the instance name programmatically. 

Example 
CurrentForm.RecalcFormInstanceName();

SaveForm
This API will save the form that is being displayed. It will increment the form internal version number. If this is a new form instance, 
calling this API will not automatically start a workflow or project associated with this form definition. 

Parameters 
None 

Returns 
None 

Example 
CurrentForm.SaveForm();

GetErrorMessages
This API will get the list of all current error messages. The error messages may have been placed there from the built‐in validation, or 
from messages added from script. 

Parameters 
None 

Returns 
Return Object  Description 

Contents ⎜ 34
 
BP Logix Inc. Process Director 35
Developers Reference

List<FormMessageString>  The list of form error messages. 

Example 
// This example will be called after built-in validation has occured
protected override void BP_Validation_Post()
{
var ErrorList = CurrentForm.GetErrorMessages();
if (ErrorList.Count > 5)
{
CurrentForm.AddInfoMessage("Wow, that’s a lot of errors");
}
}

GetInfoMessages
This API will get the list of all current informational messages. The info messages must have been previously added from script. 

Parameters 
None 

Returns 
Return Object  Description 
List<FormMessageString>  The list of form error messages. 

Example 
// This example will be called immediately prior to displaying the form
protected override void BP_Display()
{
var InfoList = CurrentForm.GetInfoMessages();
foreach (var info in InfoList)
{
bp.log0("INFO MESSAGE: " + info);
}
}

FormControl Class
This object represents a single form field. 

Properties 
Property Name  Description 
Name  The name of the form field 
FCID  The ID of this form field 
Text  The string/text representation of the form field’s value 
Value  The raw value of a form field 
Number  The numerical representation of the form field’s value 
DateTime  The DateTime object that represents the form field’s value 
Checked  This represents whether the control is checked (true/false, for Check Box controls only) 
Expanded  This represents whether the control is expanded or collapsed (true/false, for Sections only) 
IsInArray  True if the control exists within an array; false otherwise 
DDHasItems  This represents if the DropDown control has items in it (true/false, for DropDown controls only) 
ColumnChildren  A list of controls in an array column (for Array column controls only) 

Contents ⎜ 35
 
BP Logix Inc. Process Director 36
Developers Reference

ArrayFCID  If this control is in an array, the FCID of the array control 
ArrayNum  If this control is in an array, the row number 
ArrayName  If this control is in an array, the name of the array 
ArrayControl  If this control is in an array, the FormControl of the array 
ArrayColumns  If this control is an actual array, the List<FormControl> of children 
Display.EventField  Sets if the control is an event field (eYNU) 
Display.DataType  Sets the Data Type of the control (FormEnums.eDataType enum) 
Display.FriendlyName  Sets the friendly name of the control 
Display.Visible  Gets or sets if the control is visible (eYNU) 
Display.Enabled  Gets or sets if the control is enabled (eYNU) 
Display.Required  Gets or sets if the control is required (eYNU) 
Display.Style  Gets or sets the style of the control 
Display.ToolTip  Gets or sets the tooltip for this control 
Display.Control  Gets the actual ASP.NET Control of this eForm control 

Examples 
// Sets the control “MyTextBox” as an event field
CurrentForm.FormControl("MyTextBox").Display.EventField = eYNU.Yes;

// Sets the control “MyTextBox” as an event field


CurrentForm.FormControl("MyTextBox").Display.FriendlyName = "Your current address";

Methods
AddRow
This API adds a row to an Array 

Parameters 
Parameter  Description 
Name 
Position  (Optional) The position to insert the new row.  Without this parameter, the API will add the new row to the end 
of the Array. 

Returns 
Return Object  Description 
int  The number of rows in the array after the Add 

Examples 
// This will add a row to the beginning of "Array1"
CurrentForm.FormControl( "Array1" ).AddRow( 1 );
// This will add a row to the end of "Array1"
CurrentForm.FormControl( "Array1" ).AddRow();

AddToDropDown
This API adds an item or list of items to a DropDown control 

Parameters 
Parameter Name  Description 

Contents ⎜ 36
 
BP Logix Inc. Process Director 37
Developers Reference

DDList  A DropDownValue objects or strings to add to the dropdown. 
Item1, Item2, Item3, etc  DropDown items to add to the DropDown control. 
TextList  List of Text (name) values (use with ValuesList) 
ValuesList  List of Values to add to the dropdown (use with TextList) 

Returns 
None 

Examples 
// This example will build a DropDownValue list and a name/value pair of lists
var ddList = new DropDownValue();
var textList = new List<string>();
var valList = new List<string>();
for( int i = 0; i < 10; i++ )
{
ddList.Add( new FormControl.DropDownValue( "Entry " + i, i.ToString() ) );
textList.Add( "Entry " + i );
valList.Add( i.ToString() );
}
// Both of the following AddToDropDown calls will add the same ten entries
CurrentForm.FormControl( "Dropdown1" ).AddToDropDown( ddList );
CurrentForm.FormControl( "Dropdown2" ).AddToDropDown( textList, valList );
// The next AddToDropDown call will add only the numerical portion to the DropDown control
CurrentForm.FormControl( "Dropdown3" ).AddToDropDown( valList ); // Items: 1, 2, 3, 4, etc.
// Add the entries "Item 1", "Item 2", and "Item 3" to the DropDown control
CurrentForm.FormControl( "Dropdown4" ).AddToDropDown( "Item 1", "Item 2", "Item 3" );

ClearDropDown
This API removes all of the items from a DropDown control 

Parameters 
None 

Returns 
None 

Examples 
CurrentForm.FormControl( "Dropdown1" ).ClearDropDown();

ClearRows
This API removes all of the rows in an Array control 

Parameters 
None 

Returns 
None 

Examples 

Contents ⎜ 37
 
BP Logix Inc. Process Director 38
Developers Reference

CurrentForm.FormControl( "Array1" ).ClearRows();

ColumnSum
This API adds all of the values in an Array Column control 

Parameters 
None 

Returns 
Return Object  Description 
decimal  The total of each value in the Array Column 

Examples 
// Sums up each "Price" field in the Array
decimal tot = CurrentForm.FormControl( "Price" ).ColumnSum();

FillDropDown
This API adds an item or list of items to a DropDown control, but clears the DropDown first.  The API will attempt to re‐select the 
previous value of the dropdown control, but will not select it if the value no longer exists in the DropDown. 

Parameters 
Parameter Name  Description 
DDList  A DropDownValue objects or strings to add to the dropdown. 
Item1, Item2, Item3, etc.  DropDown items to add to the DropDown control. 
TextList  List of Text (name) values (use with ValuesList). 
ValuesList  List of Values to add to the dropdown (use with TextList). 

Returns 
None 

Examples 
// This example will build a DropDownValue list and a name/value pair of lists
var ddList = new DropDownValue();
var textList = new List<string>();
var valList = new List<string>();
for( int i = 0; i < 10; i++ )
{
ddList.Add( new FormControl.DropDownValue( "Entry " + i, i.ToString() ) );
textList.Add( "Entry " + i );
valList.Add( i.ToString() );
}
// Both of the following AddToDropDown calls will fill the DropDown with the same ten entries
CurrentForm.FormControl( "Dropdown1" ).FillDropDown( ddList );
CurrentForm.FormControl( "Dropdown2" ).FillDropDown( textList, valList );
// The next AddToDropDown call will fill the DropDown with only the numerical portion
CurrentForm.FormControl( "Dropdown3" ).FillDropDown( valList ); // Items: 1, 2, 3, 4, etc.
// Fill the DropDown with the entries "Item 1", "Item 2", and "Item 3"
CurrentForm.FormControl( "Dropdown4" ).FillDropDown( "Item 1", "Item 2", "Item 3" );

RemoveRow
This API removes a row in an Array 

Contents ⎜ 38
 
BP Logix Inc. Process Director 39
Developers Reference

Parameters 
Parameter  Description 
Name 
Position  (Optional) The position of the row to remove.  Without this parameter, the API will remove the last row in the 
Array. 

Returns 
Return Object  Description 
int  The number of rows in the array after the Remove. 

Examples 
// This will remove the first row in "Array1"
CurrentForm.FormControl( "Array1" ).RemoveRow( 1 );
// This will remove the last row in "Array1"
CurrentForm.FormControl( "Array1" ).RemoveRow();

SelectDropDown
This API selects a value in the DropDown control.  The API may add the value if it doesn't find it, depending on the parameters. 

Parameters 
Parameter Name  Description 
Value  The value to select in the DropDown. 
Text  (Optional) The text to add if the API can't find the value. 
AddIfNotFound  (Optional) Whether or not to add an entry in the DropDown if the API can't find the value (true/false). 

Returns 
None 

Examples 
// This example will try to select the value "1", and will add
// "[1]"/"1" (name/value) to the DropDown if the API can't find "1" already in the DropDown
CurrentForm.FormControl( "Dropdown1" ).SelectDropDown( "1" );
// This example will try to select the value "1", and will add
// "[Item 1]"/"1" (name/value) to the DropDown if the API can't find "1" already in the
DropDown
CurrentForm.FormControl( "Dropdown2" ).SelectDropDown( "1", "Item 1" );
// This example will try to select the value "1", and will not add
// anything to the DropDown if the API can't find "1" already in the DropDown
CurrentForm.FormControl( "Dropdown3" ).SelectDropDown( "1", false );

SwapRows
This API exchanges the positions of two rows in an Array 

Parameters 
Parameter Name  Description 
RowFrom  The first row number to swap 
RowTo  The second row number to swap 

Returns 
None 

Contents ⎜ 39
 
BP Logix Inc. Process Director 40
Developers Reference

Examples 
// Swap the 1st row with the 4th
CurrentForm.FormControl( "Array1" ).SwapRows( 1, 4 );

Sub-Class

FormMessageString Class
Allows adding a string message to a form. 

Properties 
Properties Name  Description 
Text  Message to use on form. 
ControlName  Control on form to focus on. 
ArrayNum  If in an array specify the array row number. 

Constructor
Parameters 
Parameter Name  Description 
Text  Message to use on form. 
ControlName  Control on form to focus on. 
ArrayNum  If in an array specify the array row number. 

Example 
var msg = new FormMessageString("Please provide a name.", "Name");

Group Class
This object represents a group of users. 

Properties 
Property Name  Description 
GID  The internal ID of the group 
GroupName  The unique string to identify the group 
Users  The list of users which belong to the group 
 
// Gets a list of the users in Group 1
var Users = User.GetGroupByName ( bp, "Group 1" ).Users;

Methods
GetGroupByID
(Static Method) 

Contents ⎜ 40
 
BP Logix Inc. Process Director 41
Developers Reference

This API will get a group object from the specified ID. 

Parameters 
Parameter Name  Description 
BP  The bp environment 
ID  The ID of the group to retrieve 

Returns 
Return Object  Description 
Group  A Group object representation of the group 

Example 
// Normally not used directly
var oUser = User.GetGroupByID( bp, "4321" );

GetGroupByName
(Static Method) 
This API will get a group object from the specified name. 

Parameters 
Parameter Name  Description 
BP  The bp environment 
Name  The name of the group to retrieve 

Returns 
Return Object  Description 
Group  A Group object representation of the group 

Example 
var oGroup = User.GetGroupByName( bp, "Group 1" );

AddUser
This API adds the specified user to the group.. 

Parameters 
Parameter Name  Description 
User (ID)  The ID of the user to add to the group 
User (object)  The actual user object to add to the group 

Returns 
None 

Example 

Contents ⎜ 41
 
BP Logix Inc. Process Director 42
Developers Reference

var oUser = User.GetUserByUserID( bp, "User 1" );


var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
// The following two calls do the same thing (add "User 1" to "Group 1" )
oGroup.AddUser( oUser ); // Call with the User object
oGroup.AddUser( oUser.UID ); // Call with the User ID

HasUser
This API checks if the specified user exists in the group.. 

Parameters 
Parameter Name  Description 
User (ID)  The ID of the user to test in the group 
User(object)  The actual user object to test in the group 

Returns 
Return Object  Description 
True/False  Whether or not the specified user exists in the group 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
// The following two conditional tests test the same thing (is "User 1" in "Group 1")
if( oGroup.HasUser( oUser ) )
{
// Do action
}
if( oGroup.HasUser( oUser.UID ) )
{
// Do action
}

Delete
This API will remove the Group from the system. 

Parameters 
None 

Returns 
None 

Example 
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
oGroup.Delete()

RemoveUser
This API will remove the specified user from the group. 

Parameters 
Parameter Name  Description 
User (ID)  The ID of the user to remove from the group 
User (object)  The actual user object to remove from the group 

Contents ⎜ 42
 
BP Logix Inc. Process Director 43
Developers Reference

Returns 
None 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
oGroup.RemoveUser( oUser );

Partition Class
This object represents a Partition.  
When developing eForm scripts (in the various callback methods such as BP_Event), you are automatically given an instance of the 
“current” Partition with the CurrentPartition variable. 

Properties 
Property Name  Description 
PID  The internal Partition ID 
Name  The name of this partition 
Description  The description of this partition 

Methods
GetPartitionID
(Static Method) 
This API will get a partition ID from the specified Partition Name. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
PID  The Name or ID of the partition to retrieve 

Returns   
Return Object  Description 
string  The ID of the Partition or “” if not found 

Example 
Var oPID = Partition.GetPartitionID( bp, "HR Partition" );

GetPartition
(Static Method) 
This API will get a partition from either a name or ID 

Parameters 
Parameter Name  Description 
BP    The bp environment. 

Contents ⎜ 43
 
BP Logix Inc. Process Director 44
Developers Reference

PartitionID  The Name or ID of the partition to retrieve 

Returns   
Return Object  Description 
Partition  Will return null if partition is not found 

Example 
var oPartition = Partition.GetPartition( bp, "HR Partition" );

GetPartitionByName
(Static Method) 
This API will get a partition object from the specified Partition Name. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
PartitionName  The ID of the partition to retrieve 

Returns   
Return Object  Description 
Partition  Will return null if partition is not found 

Example 
var oPartition = Partition.GetPartitionByName( bp, "HR Partition" );

GetPartitionByID
(Static Method) 
This API will get a partition object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
PartitionID  The ID of the partition to retrieve 

Returns   
Return Object  Description 
Partition  Will return null if partition is not found 

Example 
// Normally not used directly
var oPartition = Partition.GetPartitionByID( bp, "1234" );

GetRootFolder
This API will return the ContentObject of the root folder for the partition 

Parameters 

Contents ⎜ 44
 
BP Logix Inc. Process Director 45
Developers Reference

none     

Returns   
Return Object  Description 
ContentObject  The root folder ContentObject or null if the operation fails 

Example 
var RootFolder = CurrentPartition.GetRootFolder();

CreateFolder
This API will create a folder structure in a Partition 

Parameters 
Parameter Name  Description 
PathName    The complete path of the folder structure to create 

Returns   
Return Object  Description 
Folder  The folder object created 

Example 
var NewFolder = CurrentPartition.CreateFolder(“/folder1/folder2”);

GetDataSources
This API will return a list of DataSource objects. 

Parameters 
none   

Returns 
Return Object  Description 
List< DataSource>  A list of DataSource objects 

Example 
var DataSources = CurrentPartition.GetDataSources();

User Class
This object represents a user in an eForm instance. An instance is a completed eForm, or one that is currently being edited. 
When developing eForm scripts (in the various callback methods such as BP_Event), you are automatically given an instance of the 
“current” user with the CurrentUser variable. 

Properties 
Property Name  Description 
AuthType  The type of user.  
User.eAuth is an enum which can be User.eAuth.BuiltIn, User.eAuth.Windows, User.eAuth.External 

Contents ⎜ 45
 
BP Logix Inc. Process Director 46
Developers Reference

Delegate  A different user to which the user delegates (if null, the user has no delegate) 
Groups  The list of groups to which the user belongs 
UID  The internal ID of the user 
UserID  The unique string to identify the user 
UserName  The "friendly" name of the user (for display) 

Example 
// Setting a variable to the current username
var cUser = CurrentUser.UserName;

Methods
CreateUser
(Static Method) 
This API will get a user object from the specified ID. 

Parameters 
Parameter Name  Description 
BP  The bp environment 
UserID  The User ID to create 
Email  The email address of the new user 
UserName  The name of the new user 
Password  The initial password of the new user 
MustChangePassword  If set to true, the new user must change the password after logging in 

Returns 
Return Object  Description 
User  A user object representation of the new user 

Example 
// Create a user, and force the user to change the password after login
var oUser = User.CreateUser(bp, "NewUserID", "new@acme.com", "New User", "TEMP_PASSWORD",true);

GetUserByID
(Static Method) 
This API will get a user object from the specified ID. 

Parameters 
Parameter Name  Description 
BP  The bp environment. 
ID  The ID of the user to retrieve 

Returns 
Return Object  Description 
User  A user object representation of the user 

Contents ⎜ 46
 
BP Logix Inc. Process Director 47
Developers Reference

Example 
// Normally not used directly
var oUser = User.GetUserByID( bp, "1234" );

GetUserByUserID
(Static Method) 
This API will get a user object from the specified UserID. 

Parameters 
Parameter Name  Description 
BP  The bp environment. 
ID  The unique user string of the user to retrieve 

Returns 
Return Object  Description 
User  A user object representation of the user 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );

AddUserToPartition
This API adds the user to the specified partition. 

Parameters 
Parameter Name  Description 
Partition    The Partition object to which to add the user 

Returns 
Return Object  Description 
bool  True if the operation succeeds 

Example 
// Create a user, and force the user to change the password after login
var oUser = User.CreateUser(bp, "NewUserID", "new@acme.com", "New User", "TEMP_PASSWORD",true);
// Add the new user to a partition
oUser.AddUserToPartition(Partition.GetPartition(bp, "Default Partition"));

AddUserToProfile
This API adds the user to the specified profile. 

Parameters 
Parameter Name  Description 
Profile    The name of the profile to which to add the user 

Returns 
Return Object  Description 
bool  True if the operation succeeds 

Contents ⎜ 47
 
BP Logix Inc. Process Director 48
Developers Reference

Example 
// Create a user, and force the user to change the password after login
var oUser = User.CreateUser(bp, "NewUserID", "new@acme.com", "New User", "TEMP_PASSWORD",true);
// Add the new user to a profile
oUser.AddUserToProfile("Default Profile");

AddToGroup
This API adds the user to the specified group. 

Parameters 
Parameter Name  Description 
Group (ID)  The ID of the group to which to add the user 
Group (object)  The actual group object to which to add the user 

Returns 
None 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
// The following two calls do the same thing (add "User 1" to "Group 1" )
oUser.AddToGroup( oGroup ); // Call with the Group object
oUser.AddToGroup( oGroup.GID ); // Call with the Group ID

InGroup
This API checks if the user exists in the specified group.. 

Parameters 
Parameter Name  Description 
Group (name)  The name of the group in which to test the user 
Group (object)  The actual group object in which to test the user 

Returns 
Return Object  Description 
True/False  Whether or not the user exists in the specified group 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
// The following two conditional tests the same thing (is "User 1" in "Group 1")
if( oUser.InGroup( oGroup ) )
{
// Do action
}
if( oUser.InGroup( oGroup.GID ) )
{
// Do action
}

Delete
This API will remove the User from the system. 

Contents ⎜ 48
 
BP Logix Inc. Process Director 49
Developers Reference

Parameters 
None 

Returns 
None 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
oUser.Delete()

DelegateUser
This API allows a user to delegate all tasks. 

Parameters 
Parameter Name  Description 
UID    The UID to delegate to 

Returns 
Return Object  Description 
bool  True if the operation succeeds 

Example 
// Delegate current users tasks to another user
CurrentUser.DelegateUser(oOtherUser);

UnDelegateUser
This API allows a user to un‐delegate all tasks. 

Parameters 
Parameter Name  Description 
none       

Returns 
Return Object  Description 
bool    True if the operation succeeds 

Example 
// Un-Delegate current users tasks
CurrentUser.UnDelegateUser();

RemoveFromGroup
This API will remove the User the specified group. 

Parameters 
Parameter Name  Description 
Group (name)  The name of the group from which to remove the user 
Group (object)  The actual group object from which to remove the user 

Contents ⎜ 49
 
BP Logix Inc. Process Director 50
Developers Reference

Returns 
None 

Example 
var oUser = User.GetUserByUserID( bp, "User 1" );
var oGroup = BPLogix.WorkflowDirector.SDK.Group.GetGroupByName( bp, "Group 1" );
oUser.RemoveFromGroup( oGroup );

Workflow Class
This object represents a Workflow (definition and/or instance).  
This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for this 
object, plus the properties below. 
When developing eForm scripts (in the various callback methods such as BP_Event) or Workflow scripts, you are automatically given 
an instance of the “current” Workflow with the CurrentWorkflow variable. 

Properties 
Property Name  Description 
WFID    The ID of the workflow definition 
WorkflowInstanceObject  The optional content object of the workflow instance 
WFINSTID  The ID of the optional workflow instance 
InstanceName  The optional workflow instance name 
Status  The status of this workflow 
TermReason  If the workflow is inactive, the reason 
TermDesc    If the workflow is inactive, the optional description 
Priority  The priority of this workflow 
StartTime  The time the workflow started 
EndTime  The time the workflow ended 
DueTime  The time the workflow is due 
Error  Is the workflow in an error state 
Attachments  The list of ContentObject attachments for this workflow instance 
WorkflowInitiator  The User object of the user that initiated the workflow 

Methods
ConvertSysVarsInString
(Static Method) 
This API converts system variables in a string. 

Parameters 
Parameter Name  Description 
String  The string in which to find the system variables. 

Returns 
Return Object  Description 
string  The resultant string after converting every system variable. 

Contents ⎜ 50
 
BP Logix Inc. Process Director 51
Developers Reference

Examples 
bp.log0(CurrentWorkflow.ConvertSysVarsInString( "Created on {CREATE_DATE}" ) );

GetWorkflowByWFID
(Static Method) 
This API will get a workflow definition object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
WFID    The ID of the workflow definition to retrieve 

Returns   
Return Object  Description 
Workflow  Will return null if workflow is not found 

Example   
// Normally not used directly
var oWorkflowDef = Workflow.GetWorkflowByWFID( bp, "1234" );

GetWorkflowByWFINSTID
(Static Method) 
This API will get a workflow instance object from the specified ID. 

Parameters 
Parameter Name  Description 
BP      The bp environment. 
WFINSTID  The ID of the workflow instance to retrieve 

Returns   
Return Object  Description 
Workflow  Will return null if workflow is not found 

Example   
// Normally not used directly
var oWorkflowInstance = Workflow.GetWorkflowByWFINSTID( bp, "1234" );

PostEvent
(Static Method) 
This API will Post an event to a workflow that is waiting on a wait step 

Parameters 
Parameter Name  Description 
BP      The bp environment. 
WFINSTID  The ID of the workflow instance to retrieve 

Contents ⎜ 51
 
BP Logix Inc. Process Director 52
Developers Reference

EventName  The name of the event to Post 

Returns   
Return Object  Description 
bool    True if the operation succeeds 

Example   
// Wake up a workflow
Workflow.PostEvent( bp, "1234", “My Event” );

Instantiate
This API will write the instantiate a workflow definition. After instantiating the workflow definition, you can optionally add items to 
the workflow package (using AddToWorkflow). Finally, you must call the Start method to actually run the instantiated workflow. 

Parameters 
none     

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
oWorkflowDef.Instantiate();
// Add items to workflow package here
oWorkflowDef.Start();

JumpToStep
This API will jump to a specific workflow step. 

Parameters 
Parameter Name  Description 
JumpFrom    Workflow step name to jump from 
JumpTo  Workflow step name to jump to 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
// Restarts the workflow instance at a specific step
oWorkflowInst.JumpToStep(“Approve Step”,”Finance Step”);

JumpToStepID
This API will jump to a specific workflow step. 

Parameters 
Parameter Name  Description 

Contents ⎜ 52
 
BP Logix Inc. Process Director 53
Developers Reference

FromSTID    Workflow step ID to jump from 
ToSTID  Workflow step ID to jump to 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
// Restarts the workflow instance at a specific step
oWorkflowInst.JumpToStepID(oFromStep,oToStep);

SetCurrentFormInstance
This API will set the current form instance (the default form instance which will be used to complete tasks) for a workflow package. 
The Form instance must already be part of the workflow package. 

Parameters 
Parameter Name  Description 
FORMINSTID    The form instance ID to make the current 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
// Restarts the workflow instance at a specific step
CurrentWorkflow.SetCurrentFormInstance(oFORMINSTID);

Start
This API will write the start a workflow that has previously been instantiated. 

Parameters 
none     

Returns 
Return Object  Description 
bool  True if operation succeeds 

Example 
oWorkflowDef.Instantiate();
// Add items to workflow package here
oWorkflowDef.Start();

Restart
This API will start a workflow instance which has previously completed. You can optionally pass the WorkflowStep or STID of the step 
to start. If neither is passed, the workflow will restart at the beginning. 

Parameters 
Parameter Name  Description 

Contents ⎜ 53
 
BP Logix Inc. Process Director 54
Developers Reference

RestartStep    Optional WorkflowStep object of step to start 
RestartAtSTID  Optional STID of the workflow step to start 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
// Simply restarts the workflow instance
oWorkflowInst.ReStart();
// Restarts the workflow instance at a specific step
oWorkflowInst.ReStart(oWorkflowInst.GetWorkflowStepByName("User Step”));

Run
This API will instantiate and start a workflow definition in one step. You can optionally add a single item to the workflow package. 

Parameters 
Parameter Name  Description 
ID    Optional ID of the object to add to the workflow 
Type    Optional Type of the object to add to the workflow 
Group  Optional Group of the object to add to the workflow 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
oWorkflowDef.Run("1234", ObjectType.Document);

PostEvent
This API will Post an event to a workflow that is waiting on a wait step 

Parameters 
Parameter Name  Description 
EventName  The name of the event to Post 

Returns   
Return Object  Description 
bool    True if the operation succeeds 

Example   
// Wake up the current workflow
CurrentWorkflow.PostEvent( “My Event” );

SetPriority
This API will set the workflow priority 

Contents ⎜ 54
 
BP Logix Inc. Process Director 55
Developers Reference

Parameters 
Parameter Name  Description 
Priority  The priority to set (1‐5) 

Returns   
Return Object  Description 
bool    True if the operation succeeds 

Example   
// Change this workflow to a high priority
CurrentWorkflow.SetPriority(1);

AddToWorkflow
This API will add an item to a workflow instance. 

Parameters 
Parameter Name  Description 
ID    ID of the object to add to the workflow 
Type    Type of the object to add to the workflow 
Group  Optional Group of the object to add to the workflow 

Returns 
Return Object  Description 
bool  True if operation succeeds 

Example 
oWorkflowInstance.AddToWorkflow("1234", ObjectType.Document);

Cancel
This API will cancel a running workflow instance. 

Parameters 
none   

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 
oWorkflowInstance.Cancel();

GetChildren 
This API will get all children of the workflow instance. 

Parameters 
Parameter Name  Description 

Contents ⎜ 55
 
BP Logix Inc. Process Director 56
Developers Reference

ObjectType    Optional filter of object types to return 
MapType    Optional filter of map types to return 
GroupName  Optional filter of items in a Group to return 

Returns 
Return Object  Description 
List<ContentObject>  List of ContentObjects or null if the operation fails 

Example 
// Gets all workflow items in the group named “Group 1”
var MyChildren = oWorkflowInstance.GetChildren("Group 1");

GetWorkflowStepByName 
This API will get the specified WorkflowStep 

Parameters 
Parameter Name  Description 
BP      The bp environment. 
StepName  The name of the Workflow Step to get 

Returns 
Return Object  Description 
WorkflowStep  The actual WorkflowStep or null if the operation fails 

Example 
var ApproveStep = oWorkflowInstance.GetWorkflowStepByName("Approve Step");

WorkflowStep Class
This object represents a Workflow Step.  
This object is derived from the ContentObject class. All properties and methods from the ContentObject are supported for this 
object, plus the properties below. 
When developing eForm scripts (in the various callback methods such as BP_Event) or Workflow scripts, you are automatically given 
an instance of the “current” Workflow with the CurrentWorkflowStep variable. 

Properties 
Property Name  Description 
WFID    The ID of the workflow definition 
STID  The ID of the workflow step 
StepName  The name of this step 
Instructions  The instructions for users in this step 
Description    The description of this workflow step 
WFINSTID  The ID of the workflow instance 
STINSTID  The ID of the workflow step instance 
Status  The status of the step 
Message  The optional message if this step is complete 

Contents ⎜ 56
 
BP Logix Inc. Process Director 57
Developers Reference

Start  The time the workflow step started 
End  The time the workflow step  ended 
Due  The time the workflow step  is due 
Error  Is the workflow step in an error state 

Methods
ConvertSysVarsInString
(Static Method) 
This API converts system variables in a string. 

Parameters 
Parameter Name  Description 
String  The string in which to find the system variables. 

Returns 
Return Object  Description 
string  The resultant string after converting every system variable. 

Example 
bp.log0(CurrentWorkflowStep.ConvertSysVarsInString( "Created on {CREATE_DATE}" ) );

GetWorkflowStepBySTID
(Static Method) 
This API will get a workflow step definition object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
STID    The ID of the workflow step to retrieve 

Returns   
Return Object  Description 
WorkflowStep  Will return null if workflow step is not found 

Example   
// Normally not used directly
var oWorkflowStepDef = WorkflowStep.GetWorkflowStepBySTID( bp, "1234" );

GetWorkflowStepBySTINSTID
(Static Method) 
This API will get a workflow step instance object from the specified ID. 

Parameters 
Parameter Name  Description 

Contents ⎜ 57
 
BP Logix Inc. Process Director 58
Developers Reference

BP    The bp environment. 
STINSTID    The ID of the workflow step instance to retrieve 

Returns   
Return Object  Description 
WorkflowStep  Will return null if workflow step is not found 

Example   
// Normally not used directly
var oWorkflowStepInst = WorkflowStep.GetWorkflowStepBySTINSTID( bp, "1234" );

GetWorkflowStepByName
(Static Method) 
This API will get a workflow step object from the specified Name. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
Workflow    The workflow object 
StepName  The name of the step to get 

Returns   
Return Object  Description 
WorkflowStep  Will return null if workflow step is not found 

Example   
var oWorkflowStep = WorkflowStep.GetWorkflowStepByName( bp, oMyWorkflow, "Approve Step" );

AddUsersToStep
This API will add users to a workflow step. 

Parameters 
Parameter Name  Description 
User    A single User object to add 
IEnumerable<User>    A list of User objects to add 
UIDList    A string of UIDs to add (separated by commas) 

Returns   
Return Object  Description 
bool  True if operation succeeds 

Example 

Contents ⎜ 58
 
BP Logix Inc. Process Director 59
Developers Reference

// Add the workflow initiator to the current workflow step


CurrentWorkflowStep.AddUsersToStep(CurrentWorkflow.WorkflowInitiator);

RemoveUsersFromStep
This API will remove users from a workflow step. 

Parameters 
Parameter Name  Description 
UIDList    A string of UIDs to remove (separated by commas) 

Returns     
Return Object  Description 
bool  True if operation succeeds 

Example 
// Remove the workflow initiator from the current workflow step
CurrentWorkflowStep.RemoveUsersFromStep(CurrentWorkflow.WorkflowInitiator);

SetStepMessage
This API will set the Step Message. 

Parameters 
Parameter Name  Description 
Message    The text to set in the step status message 
Prepend  Default true, if true, it will pre‐pend the text to the existing Message. If false, it will replace the existing message 
(if any) 

Example 
//Set step message
CurrentWorkflowStep.SetStepMessage("This is a step Status Message", false);

SetStepError
This API will set the Step Error Message. 

Parameters 
Parameter Name  Description 
Message    The message to add to the step 

Example 
//Set step error message
CurrentWorkflowStep.SetStepError("This is a step Error Message");

WorkflowStepUser Class
This object represents a user in a Workflow Step.  
When developing eForm scripts (in the various callback methods such as BP_Event) or Workflow scripts, you are automatically given 
an instance of the “current” Workflow User with the CurrentWorkflowStepUser variable. 

Contents ⎜ 59
 
BP Logix Inc. Process Director 60
Developers Reference

Properties 
Property Name  Description 
WFID    The ID of the workflow definition 
STID  The ID of the workflow step 
SUID  The ID of the workflow step user 
TLID  The optional task list ID 
WFINSTID  The ID of the workflow instance 
STINSTID  The ID of the step instance 
SUINSTID  The ID of the step user instance 
User  The user object 
Status  The status of this user in this workflow step 
Comment  If the user completed this task, the optional comments 
Start  The time that the user started in this step 
End  The time that the user completed this step 
TermReason  The termination reason for this user in this step 
BranchName  The branch the user selected to complete this step 

Methods
ConvertSysVarsInString
(Static Method) 
This API converts system variables in a string. 

Parameters 
Parameter Name  Description 
String  The string in which to find the system variables. 

Returns 
Return Object  Description 
string  The resultant string after converting every system variable. 

Examples 
bp.log0(CurrentWorkflowStepUser.ConvertSysVarsInString( "Created on {CREATE_DATE}" ) );

GetWorkflowStepUserBySUINSTID
(Static Method) 
This API will get a workflow step definition object from the specified ID. 

Parameters 
Parameter Name  Description 
BP    The bp environment. 
SUINSTID    The ID of the workflow step user to retrieve 

Returns   
Return Object  Description 

Contents ⎜ 60
 
BP Logix Inc. Process Director 61
Developers Reference

WorkflowStepUser  Will return null if workflow step is not found 

Example   
// Normally not used directly
var oWorkflowStepUser = WorkflowStepUser.GetWorkflowStepUserBySUINSTID( bp, "1234" );

eForm Controls
This section outlines the various Workflow/Process Director controls that can be placed onto eForms. These controls are used to 
create and enhance eForms in addition to “normal” ASP.NET controls (such as TextBox, DropDownList, etc). The properties can be 
set in the actual <bpx> control tag, or can be set via normal C# properties. 

AddRow
 This eForm control will create a button a user can click to add row(s) to an array.  2.0  

Properties 
Property  Description  Default 
Name  Value 
ArrayName  The name of the array this button is attached to.   
Rows  The number of Rows to add.   1 
At  The location to add the new row(s).   0 (end of 
array). 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 
<bpx:AddRow runat="server" ArrayName="MyArray"/>

Array
 This eForm control places a repeating templated section on an eForm.  See ASP Repeater. To default the array to a number of rows 
simply go to the eForm properties page and click on the edit link next to the array control that is in the list of controls. Select Value 
Æ Number from the Default Value dropdown and enter the number to default the number of rows to.  2.0  

Properties 
None 

Example 

Contents ⎜ 61
 
BP Logix Inc. Process Director 62
Developers Reference

<bpx:Array ID="ArrayTest" runat="server">


<HeaderTemplate>
<table>
<tr>
<th>City</th>
<th>State</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><bpx:bpTextBox ID="ArrayCity" runat="server" /></td>
<td><bpx:bpTextBox ID="ArrayState" runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</bpx:Array>

ArrayRemoveRow
 This eForm control will create a button a user can click to remove a specific row from an array. You should place this control directly 
in an array, so that the button is displayed on each row.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 
<bpx:ArrayRemoveRow runat="server"/>

ArrayMoveUp
 This eForm control will create a button a user can click to move a Row up in the array.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 

Contents ⎜ 62
 
BP Logix Inc. Process Director 63
Developers Reference

<bpx:ArrayMoveUp runat="server"/>

ArrayMoveDown
This eForm control will create a button a user can click to move a Row down in the array.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 
<bpx:ArrayMoveDown runat="server"/>

Attach
This eForm control will display a button to allow the user to attach files to the form.  2.0  

Properties 
Property Name  Property  Description  Default 
Attributes  Value 
AttachType  eForm  Attach object(s) directly to eForm,   Workflow 
Workflow  Attach object(s) to the current workflow instance as a Workflow reference. 
  Attach object(s) to the current project instance as a Workflow reference. 
Project 
ObjectType  Document  Allow user to upload document   Document 
Form  Allow user to choose existing forms on the system 
Clipboard   Allow the user to use an item from the clipboard 
GroupName    Optional name of the group to place the attachment(s) into.   
Text    Sets the optional button text.   
ImageURL    Sets an optional image for the button.   
ConfirmText    Pops up a confirmation box when a user clicks the button with the specified   
text, allowing a user to cancel or confirm the action which the button will 
take. 
OnClientClick    Used to execute client‐side JavaScript or call client JavaScript functions. To   
prevent the button from causing a Post‐back, place a return false; at the end 
of the JavaScript string. 
ClipboardImageName    The optional name to use for the attached images. This parameter can use   
SysVars to make the name dynamic. If the items on the clipboard are files, 
the actual file name will be used as the new attachment name. 

Example 

Contents ⎜ 63
 
BP Logix Inc. Process Director 64
Developers Reference

<bpx:Attach ID="AttachDoc" runat="server" GroupName="Review Documents"/>

bpButton
 This eForm control is used to place a button on a Form. The button will typically be used when hooking up to a Custom Task, or 
when writing custom C#.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 
This example will cause a Post‐back to the server to process the event. 
<bpx:bpButton ID="CalcTotal" Text="Calculate Totals" runat="server" />

This example will execute client JavaScript, and prevent a Post‐back. 
<bpx:bpButton ID="TestButton" Text="Run Client Function" OnClientClick="MyFunc();return false;"
runat="server" />

bpCheckBox
 This eForm control places a two‐state (checked ‐ true/unchecked ‐ false) checkbox on the eForm.  Useful for yes/no data and 
enabling/disabling sections on an eForm.  For more information, see the ASP CheckBox documentation. 2.0  

Properties 
Property Name  Description  Default Value 
Text  (optional) Accompanying label text for the check box   
CssClass  To set the CSS class name for this control.   

Example 
<bpx:bpCheckBox ID="EnableSection" runat="server" Text="Section Enabled" />

bpLabel
This eForm control will simply display Text. This can be used, for instance, when you would like to conditionally show text. You can 
associate rules with this control to affect the visibility. You will use C# to get / set the actual Text contents.  2.0  

Properties 
Property Name  Description  Default Value 
CssClass  To set the CSS class name for this control.   

Example 

Contents ⎜ 64
 
BP Logix Inc. Process Director 65
Developers Reference

<bpx:bpLabel runat="server" ID="MyText"/>

bpString
This eForm control will display Text from a localized resource file. You can create custom localized strings in the strings.resx files to 
easily display strings in different languages on forms. You can associate rules with this control to affect the visibility.  

Properties 
Property Name  Description  Default Value 
CssClass  To set the CSS class name for this control.   
ResourceID  Name of resource in strings.resx or resource.resx   
ResourceType  Does string exist in strings.resx (Custom) or resource.resx (Internal)  Custom 
DefaultString  String display while editing form definition in Design mode using VS plugin   

Example 
<bpx:bpString runat="server" DefaultString="Company Name" ResourceID=”Company_Name” />

bpTextBox
 This eForm control puts a space for a user to enter text on an eForm.  For more information, see the ASP TextBox documentation. 
2.0  

Properties 
Property Name  Description  Default Value 
CssClass  To set the CSS class name for this control.   
Columns  To set the number of columns the control will use.   
Rows  To set the number of rows the control will use.   
TextMode  SingleLine, Multiline, or Password   

Example 
This example will cause a Post‐back to the server 
<bpx:bpTextBox ID="UserEmail" runat="server" Columns="40"/>

ButtonArea
 This eForm control is used to control where the complete buttons for the eForm are placed. Complete buttons are buttons such as 
OK, Cancel, Approve, Reject etc. The actual buttons that are placed in this area are dependent on the current workflow step if any. If 
this control is not present on an eForm, then the buttons are added to the bottom of the form.  2.0  

Properties 
Property Name  Property  Description  Default 
Attributes  Value 
OKText    Sets the text for the OK button  OK 
CancelText    Sets the text for the Cancel button  Cancel 
OKImageURL    Optional path to the image used for the OK button on an eForm   
OKShow  True  Allows the form to show or hide the OK button.  True 
False 
OKConfirmText    Pops up a confirmation box when a user clicks the OK button with the   

Contents ⎜ 65
 
BP Logix Inc. Process Director 66
Developers Reference

specified text, allowing a user to cancel the OK or continue submitting the 
form. 
CancelImageURL    Optional path to the image used for the Cancel button on an eForm   
CancelConfirmText    Pops up a confirmation box when a user clicks the Cancel button with the   
specified text, allowing a user to return to the form or cancelling out of the 
form. 
CancelShow  True  Allows the form to show or hide the Cancel button.  True 
False 
CompleteConfirmText    Pops up a confirmation box when a user clicks the Complete button with the   
specified text, allowing a user to cancel the Complete or continue to submit 
the form. 
CompleteShow  True  Allows the form to show or hide the Complete button.  True 
False 

Example 
This example controls the location of the complete buttons, and changes the default text of the OK and Cancel buttons. 
<bpx:ButtonArea runat="server" OKText="Submit Form" CancelText="Cancel Submission"/>

Calculate
This eForm control calculates an expression and places the result as text on an eForm.  2.0  

Properties 
Property  Property  Description  Default 
Name  Attributes  Value 
Formula    Expression to calculate a numerical value (can accept System Variables)   
FormatString    (optional) The format in which to display the result of the Formula (Defaults to   
"{0:0.00}") ‐ See documentation on ASP/C# string formatting 

Example 
<bpx:Calculate ID="ItemTotal" runat="server" Formula="{#FORM:ItemQty} * {#FORM:ItemPrice}"
FormatString="{0:0.0}" />

Cancel
This eForm control will place a button on an eform which will cancel or delete the current form or workflow.  2.0  

Properties 
Property Name  Description 
Text  Sets the optional button text. 
CancelWorkflow  This allows you to cancel the associated workflow.   
CancelProject  This allows you to cancel the associated project. 
DeleteForm  This allows you to delete the form. 
DeleteWorkflow  This allows you to delete the workflow.   
DeleteProject  This allows you to delete the project. 
ImageURL  Sets an optional image for the button. 
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to cancel or 
confirm the action which the button will take. 

Contents ⎜ 66
 
BP Logix Inc. Process Director 67
Developers Reference

Examples 
To cancel associated workflow:
<bpx:Cancel runat="server" CancelWorkflow ="true" Text="Cancel Request"></bpx:Cancel>

To just delete this form:


<bpx:Cancel runat="server" DeleteForm="true" Text="Delete This Form"></bpx:Cancel>

To delete workflow and form:


<bpx:Cancel runat="server" DeleteWorkflow ="true" DeleteForm="true" Text="Delete Form and
Workflow"></bpx:Cancel>

CommentLog
This eForm control allows a user to place a Comment Log on an eForm.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Rows  (Optional) The number of rows to display while prompting for a comment  4 
Columns  (Optional) The number of columns to display while prompting for a comment  70 
Width  (Optional) Width of the displayed comments  100% 
Text  (Optional) The text for the button used to add a comment  Add 
Comment 
ControlName  (Optional) The name of the comment log section. Use this property if you have multiple comment   
logs on an eForm 

Example 
Simple Comment Log
<bpx:CommentLog runat="server" />

The second comment log at 50% width


<bpx:CommentLog runat="server" ControlName=”CL2” Width=”50%”/>

ContentPicker
This eForm control allows a user to choose an object in the content list. 2.0  

Properties 
Property  Property  Description  Default 
Name  Attributes  Value 
StartingFolder    (Optional) The path to a folder, limiting a user to choose only objects in that   
folder and its subfolders 
DocExtension    (Optional) Limits the user to choose only documents of the specified extension   
(Type of "Document" only) 
Type    (Optional) The type of object (Folder, ContentObject, Script, etc.) to pick.    Folder 

Example 

Contents ⎜ 67
 
BP Logix Inc. Process Director 68
Developers Reference

<bpx:ContentPicker ID="ReferenceObject" runat="server" Type="ContentObject" />


<bpx:ContentPicker ID="InstructionsDoc" runat="server" Type="Document" DocExtension="pdf" />

ControlPicker
This eForm control will display a dropdown of all controls on this page.  2.0  

Properties 
Property Name  Property Attributes  Description  Default 
Value 
ControlType  Input, Textarea, Date, Button, Dropdown, Password, Array, Section,  Limits the type of   
Radio, CheckBox, Custom, CustomTaskConfigSection,  control to show in the 
CustomTaskRunSection, UserPicker, GroupPicker, Attach, ShowAttach,  dropdown. 
Label. 
DropdownPrompt    Optional text to show   
on the dropdown if no 
user is selected 
Style  To set the style (using any CSS style).     

Example 
<bpx:ControlPicker ID="SelectedControl" DropdownPrompt="[Pick a Control]" runat="server" />

DatePicker
 This eForm control is a date picker control.  2.0  

Properties 
Property Name  Description  Default Value 
Style  To set the style (using any CSS style).   
BlockControl  If set to true, will surround the control within an HTML block element.   

Example 
<bpx:DatePicker ID="HireDate" runat="server"/>

DateTimePicker
 This eForm control is a date/time combination picker control.  2.0  

Properties 
Property  Description  Default 
Name  Value 
StartTime  (Optional) Sets the beginning time (of day) for the pre‐selected values available for the picker.   
EndTime  (Optional) Sets the maximum time (of day) for the pre‐selected picker values.  Must exceed the   
StartTime value. 
Interval  (Optional) The amount of time (in minutes) between pre‐selected picker values.   

Example 

Contents ⎜ 68
 
BP Logix Inc. Process Director 69
Developers Reference

<bpx:DateTimePicker ID="WhenDue" runat="server" />

DateDiff
This eForm control is used to calculate the difference between 2 dates. 

Properties 
Property Name  Description  Default Value 
Date1    The first date or date / time   
Date2  The second date or date / time   
Type  (Optional) The type of the difference  Days 
Years 
Months 
Days 
BusinessDays 
Hours 
BusinessHours 
Minutes 
Seconds 

Example 
<bpx:DateDiff ID="DateDiff" Date1="1/1/2009" Date2="{form:my_date2}" runat="server"/>

DBConnectorPicker
This eForm control will display a Database Connector Picker on the form. 2.0  

Properties 
Property Name  Property Attributes  Description  Default Value 
DropdownPrompt    Optional text to show on the dropdown if no connector is selected    

Example 
<bpx:DBConnectorPicker ID="PickDB" DropdownPrompt="[Pick a Database]" runat="server" />

DropDown
This eForm control puts a dropdown control on the form.  For more information, see the ASP DropDownList control documentation. 
2.0  

Properties 
Property Name  Description  Default Value 
CssClass  To set the CSS class name for this control.   

Example 

Contents ⎜ 69
 
BP Logix Inc. Process Director 70
Developers Reference

<bpx:DropDown ID="States" runat="server" >


<asp:ListItem Text="California" Value="Ca" />
<asp:ListItem Text="Washington" Value="Wa" />
</bpx:DropDown>

FormErrorStrings
This eForm control is used to identify the area(s) where error messages are displayed on the eForm. If this control is not present on 
an eForm, then the error messages are placed at the top and bottom of the form.  2.0  

Properties 
None 

Example 
<bpx:FormErrorStrings runat="server"/>

FormInfoStrings
 This eForm control is used to identify the area(s) where informational messages are displayed on the eForm. If this control is not 
present on an eForm, then the informational messages are placed at the top and bottom of the form.   2.0  

Properties 
None 

Example 
<bpx:FormInfoStrings runat="server"/>

GroupPicker
This eForm control will display a Group Picker on the form.  2.0  

Properties 
Property Name  Property Attributes  Description  Default Value 
Multiple  True  Allow multiple users to be selected.   
PickerType  Dropdown   Dropdown – use a dropdown control   
Popup   Popup – use a popup control. 
ListBox  ListBox – use a ListBox control. 
DropdownPrompt    Optional text to show on the dropdown if no user is selected   
Height    For ListBox PickerType only; sets the height of the ListBox control   
Width    For ListBox PickerType only; sets the width of the ListBox control   

Example 
<bpx:GroupPicker ID="AssignGroup" DropdownPrompt="[Pick a Group]" PickerType="Popup"
runat="server" Multiple="false" />

HTML
This eForm control will display an HTML string.  2.0  

Contents ⎜ 70
 
BP Logix Inc. Process Director 71
Developers Reference

Properties 
Property  Property  Description  Default 
Name  Attributes  Value 
HTMLString    Allows you to use HTML on an eForm. You can use multiple sysvars in this   
control. 

Example 
<bpx:HTML ID="test1" runat="server" HTMLString="<a href='{EMAIL_URL}'>click here</a>"/>

IgnoreSection
This eForm control is used to create a group or section of controls and text on an eForm. This section is used to tell the eForm 
processor to ignore the controls inside this section. This can be used, for example, to surround custom controls so that the eForm 
processor does not attempt to process the internal form fields.   2.0  

Properties 
None 

Example 
<bpx:IgnoreSection runat="server">
Items in here are ignored by the eForm processor
</bpx:IgnoreSection>

KView
This eForm control is used to place a Knowledge View on the eForm. You can use a button to open a Knowledge View or you can 
view a Knowledge View inline on the form. 2.0  

Properties 
Property  Description  Default Value 
Name 
KVID  The kvid of the knowledge view to display   
Text  Only for Popup – The text on the button.   View Knowledge 
View 
Height  Only for iframe – The height of the iframe.  300px 
Width  Only for iframe – The width of the iframe  100% 
Type  IFrame – Displays the kview in an inline IFRAME on the form.  IFrame 
Popup – A button will be shown on the form. When clicked, a pop window showing the kview 
will be launched 
QS  Optional list of querystring parameters to pass to the kview. The kview can, for example, use   
these querystring parameters in its filters. 

Example 
<bpx:KView ID="kv1" runat=”server" KVID=12 Text="Click Here To View" Type="Popup" />

ListBox
This eForm control is used to place a List Box control on an eForm, allowing a user to select more than one entry in the list.  This 
ListBox control can be populated via Custom Tasks, scripts, or with the asp:ListItem tag. Note that commas in a ListBox item value 

Contents ⎜ 71
 
BP Logix Inc. Process Director 72
Developers Reference

are not valid.  For any ListBox item with a comma in the value, the comma will become a semi‐colon upon ListBox creation (this does 
not apply when programmatically adding items).  2.0  

Properties 
Property Name  Description  Default 
Value 
Items  The collection of items in the ListBox ‐ See ASP ListControl Items property for usage   
examples. 
SelectedValues  A list of selected values in the Items collection   
SelectedValuesString  A comma‐separated string representation of the list of selected values in the Items   
collection 
Height  (optional) The height of the ListBox control (e.g., 100px, 15ex, 25%, etc.)   
Width  (optional) The width of the ListBox control (e.g., 200px, 20em, 30%, etc.)   

Example 
<bpx:ListBox ID="Departments" runat="server">
<asp:ListItem Value="SALES" Text="Sales" />
<asp:ListItem Value="HR" Text="Administrative" />
<asp:ListItem Value="IT" Text="Information" />
</bpx:ListBox>

Print
This eForm control puts a single print button control on the form.  2.0  

Properties 
Property  Description  Default 
Name  Value 
Text  Displays the label of the button.    
Style  To set the style for this control.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 

Example 
<bpx:Print ID="PRINTBtn" Text="Print this form" runat=”server” />

Radio
This eForm control puts Radio group control on the form.  For more information, see the ASP RadioButton control documentation. 
2.0  

Properties 
Property Name  Description  Default Value 
CssClass  To set the CSS class name for this control.   

Example 

Contents ⎜ 72
 
BP Logix Inc. Process Director 73
Developers Reference

<bpx:Radio ID="States" runat="server" CssClass="MyRadioClass">


<asp:ListItem Text="California" Value="Ca" />
<asp:ListItem Text="Washington" Value="Wa" />
</bpx:Radio>

RemoveRow
 This eForm control will create a button a user can click to remove row(s) to an array.  2.0  

Properties 
Property  Description  Default 
Name  Value 
ArrayName  The name of the array this button is attached to.   
Rows  The number of Rows to remove.   1 
At  The location to remove the new row(s).   0 (end of 
array). 
Text  Sets the optional button text.   
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 
OnClientClick  Used to execute client‐side JavaScript or call client JavaScript functions. To prevent the button from   
causing a Post‐back, place a return false; at the end of the JavaScript string. 

Example 
<bpx:RemoveRow runat="server" ArrayName="MyArray"/>

RichText
This eForm control places a rich text editor on an eForm.  This allows a user to enter text as well as format it and place links and 
other rich text controls within the eForm control.  2.0  

Properties 
Property Name  Description  Default Value 
Height  (optional) The height of the ListBox control (e.g., 100px)   
Width  (optional) The width of the ListBox control (e.g., 200px)   

Example 
This example will cause a Post‐back to the server. 
<bpx:RichText ID="CoverPage" runat="server" Height="250px" Width="550px" />

RoutingSlip
Display the routing slip for the workflow package on the form.  2.0  

Properties 
Property Name  Description  Property  Default 
Attributes  Value 
ActiveStepOnly  Should the routing slip only display the active step?  True  False 
False 

Contents ⎜ 73
 
BP Logix Inc. Process Director 74
Developers Reference

MostRecentInstance  Should the routing slip display only the most recent step instance? If this is  True  False 


false, then the routing slip will show the users every time a step ran.  False 
ShowSignatures  Should routing slip display user’s signatures?  True  True 
False 
ShowRunning  Should routing slip display users currently running?  True  True 
False 
ShowCompleted  Should routing slip display users that have completed the step?  True  True 
False 
ShowCompletedOn  Shows the date the task was completed for each participant in the routing  True  False 
slip.  False 
ShowComments  Should Routing Slip display the comments?  True  True 
False 
ShowStatus  Shows the Status column in the routing slip.  True  True 
False 
ShowResult  Shows the Result column in the routing slip.  True  True 
False 
ShowStep  Groups the users in the routing slip according to the step they ran in.  True  True 
False 
ShowPending  Should routing slip display users that have not began?  True  False 
False 
ShowParticipants  Shows the name of each participant. You can use this, for example, to hide  True  True 
the names of the participants, and only show the signature image.  False 
ShowCancelled  Should routing slip display users that have been cancelled?  True  True 
False 
ShowReassigned  Should routing slip display users that have been reassigned?  True  True 
False 
ShowTimedOut  Should routing slip display users that have timed out?  True  True 
False 
StepName  Optional name of the step to show the routing slip for.    
UseDateTime  Optionally shows Date and Time if true  True  False 
False 
ShowHeader  Should Routing Slip display the header.  True  True 
False 
ShowInitiator  Should the process initiator be displayed?  True  false 
False 

Example 
This example will show the routing slip for a single step 
<bpx:RoutingSlip runat="server" StepName="Approve Step"/>
This example will show the routing slip for the active step and only show the active users. 
<bpx:RoutingSlip runat="server" ActiveStepOnly="true" ShowRunning="true" ShowCompleted="false"
ShowCancelled="false" ShowTimedOut="false"/>

Save
The “save” (close=false) will only appear when the user is viewing the form in a workflow task. The “save and close” (close=true) will 
always appear. The “save and close” will add an entry to the users task list (unless they are in a workflow, in that case an entry 
already exists).  2.0  

Properties 

Contents ⎜ 74
 
BP Logix Inc. Process Director 75
Developers Reference

Property  Description  Default 


Name  Value 
Text  Sets the optional button text.   
Close  The Close parameter can be set to true or false.  True 
ImageURL  Sets an optional image for the button.   
ConfirmText  Pops up a confirmation box when a user clicks the button with the specified text, allowing a user to   
cancel or confirm the action which the button will take. 

Example 
This example will cause a Post‐back to the server to save the form contents. 
 
<bpx:Save ID="SaveBTN" runat="server" Text="Save and Close" Close="True"/>

Section
 This eForm control is used to create a group or section of controls and text on an eForm. This section can be used to apply 
formatting, required setting, enablement, or visibility rules to all elements in a section.  2.0  

Properties 
Property Name  Description  Default 
Value 
WrapperTag  The section can optionally be enclosed with an HTML element such as a div or span. A div uses  Div 
“block” formatting in HTML (so that the section appears on the next line), where the span uses 
“inline” formatting. 
CanCollapse  Set this property to “true” males this section a collapsible section.  False 
Expanded  Set to true to have the control viewed in the Expanded state initially. Set to false to have the  True 
control viewed collapsed initially. 
Text  The text for the “header” of the CollapseSection   
HeaderStyle  To set the style (using any CSS style) for the header.   
HeaderCssClass  To set the CSS class name for the header.   
BodyStyle  To set the style (using any CSS style) for the body of the section.   
BodyCssClass  To set the CSS class name for the body of the section.   
CollapseImageURL  Optional URL to image to use for Collapse   
ExpandImageURL  Optional URL to image to use for Expand   

Example 
This sample will create a section on a form to collect addresses. The section will be surrounded with an HTML DIV block. 
<bpx:Section runat="server" ID="AddressSection">
Some eForm controls …
</bpx:Section>

This sample will create a section that flows “inline” with the surround HTML. 
Some HTML content <bpx:Section runat="server" ID="InlineSection" WrapperTag="span">
Some more eForm controls and HTML …
</bpx:Section>
Some content after the inline section

ShowAttach
This eForm control will display a table showing the attachments that match the desired criteria.  2.0  

Contents ⎜ 75
 
BP Logix Inc. Process Director 76
Developers Reference

Properties 
Property Name  Property  Description  Default 
Attributes  Value 
AttachType  eForm   Attach object(s) directly to eForm  Workflow 
Workflow   Attach object(s) to the current workflow instance as an Workflow reference 
Project 
ObjectType  Document  Allow user to upload document   Document 
Form  Allow user to choose existing forms on the system 
Clipboard   Allow the user to use an item from the clipboard 
GroupName    Optional name of the group to place the attachment(s) into.   
Text    Sets the optional button text.   
ImageURL    Sets an optional image for the button.   
OnClientClick    Used to execute client‐side JavaScript or call client JavaScript functions. To   
prevent the button from causing a Post‐back, place a return false; at the end of 
the JavaScript string. 
ViewInline  True  Allows the user to select a document to view inline on the eForm in an IFRAME.  False 
False 
ViewInlineHeight    Optional parameter to set the height of the IFRAME for the selected document.  200px 
Use any HTML compatible string such as 300px. 
ShowView  True  Show the View link for each attachment?  True 
False 
ShowEdit  True  Show the Edit link for each document attachment?  False 
False 
ShowDownload  True  Show the Download link for each document attachment?  True 
False 
ShowRemove  True  Show the Remove  link for each attachment?  True 
False 
ShowDate  True  Show the date for each attachment?  True 
False 
ShowUser  True  Show the user for each attachment?  True 
False 
NameAsView  True  Allows the attachment name to be a hot link. Same fucntionality as the  False 
False  ShowView property. 

Example 
<bpx:ShowAttach ID="AttachDoc" runat="server" GroupName="Review Documents"/>

SignatureComments
This eForm control will display a textbox on the form to enter workflow comments.  2.0  

Properties 
Property Name  Description  Default Value 
Rows  Sets the height of the textbox.  4 
Columns  Sets the width of the textbox.  70 
Style  To set the style for this control.   
Text  Sets the optional default text in the textbox.   

Example 

Contents ⎜ 76
 
BP Logix Inc. Process Director 77
Developers Reference

<bpx:SignatureComments id="sigBox" runat="server" Text="Please enter your comments here"/>

Sum
This eform control sums all items of a column in an array. Please note the ID is optional as it can be a system variable.  2.0  

Properties 
Property Name  Description 
Column  The column in an array that you would like to sum up. 

Example 
<bpx:Sum ID="Sum1" runat="server" Column="Expenses"/>

SysVar
 This eForm control is used to evaluate and display a System Variable. You can pass an entire System Variable string in the 
SysVarString property, or you can break apart the System Variable into individual properties.  2.0  

Properties 
Property Name  Description  Default 
Value 
SysVarString  Set this property to pass an entire System Variable in one string.   
  ‐Or‐   
SysVarName  Set the system Variable name.   
SysVarParms  Optionally sets the System Variable parameters. Multiple parameters can be passed   
separated by a colon. 
SysVarNamedParms  Optionally sets the System Variable named parameters. Multiple parameters can be passed   
separated by a comma. 
Pre  Optionally set the “prefix” string.   
Post  Optionally set the “postfix” string.   
IfNull  Optionally set the “If sysvar is null” string.   
Encode  Optionally set the encoding type.   

Example 
This example displays the date 1 week from now. 
<bpx:SysVar ID="SysVar1" runat="server" SysVarName="CURR_DATE" SysVarNamedParms="Days=7"/>

 
This example displays the current user’s ID on the form. Notice the ! to HTML‐encode the string. 
<bpx:SysVar ID="SysVar2" runat="server" SysVarString="{!CURR_USER }"/>

TabStrip
This eForm control creates a tab strip section. 

Properties 
Property Name  Description  Default Value 
MultiPageID  The ID of the related TabStripContent control   

Contents ⎜ 77
 
BP Logix Inc. Process Director 78
Developers Reference

ID  Optional ID if the value of the selected tab should be maintained   

Tab
This control is used to identify each tab in a tab strip. The value of the TabStrip will be the selected Tab. 

Properties 
Property Name  Description  Default Value 
PageViewID  The ID of the related TabContent control   
Text  Optional text for the actual Tab   
Value  Optional value for the control if this tab is selected   

TabStripContent
This control identifies the actual contents of the various tabs. 

Properties 
Property Name  Description  Default Value 
ID  The ID of the content for the tab strip   

TabContent
This eForm control contains the actual content for a single tab. You can place any number of eForm controls inside a TabContent 
section. 

Properties 
Property Name  Description  Default Value 
ID  The ID of the content for the tab strip   

Example 
<bpx:TabStrip runat="server" ID="MyTabStrip" MultiPageID="MyTabStrip_Content">
<Tabs>
<bpx:Tab runat="server" PageViewID="tab1" />
<bpx:Tab runat="server" PageViewID="tab2" />
</Tabs>
</bpx:TabStrip>

<bpx:TabStripContent runat="server" ID="MyTabStrip_Content">


<bpx:TabContent ID="tab1" runat="server">
Form data inside tab 1 ... this can include any form control
</bpx:TabContent>
<bpx:TabContent ID="tab2" runat="server">
Form data inside tab 2 ...
</bpx:TabContent>
</bpx:TabStripContent>

TimePicker
This eForm control places a picker for selecting time values on an eForm. 

Properties 
Property  Description  Default 

Contents ⎜ 78
 
BP Logix Inc. Process Director 79
Developers Reference

Name  Value 
StartTime  (Optional) Sets the beginning time (of day) for the pre‐selected values available for the picker.   
EndTime  (Optional) Sets the maximum time (of day) for the pre‐selected picker values.  Must exceed the   
StartTime value. 
Interval  (Optional) The amount of time (in minutes) between pre‐selected picker values.   

Example 
<bpx:TimePicker ID="BreakTime" runat="server" StartTime="11AM" EndTime="3:45pm" Interval="15"
/>

UserPicker
This eForm control will display a User Picker on the form.  2.0  

Properties 
Property Name  Property  Description  Default 
Attributes  Value 
Multiple  True  Allow multiple users to be selected.   
InGroup    Optional filter to only show users that are members of the specified   
group. 
PickerType  Dropdown   Dropdown – use a dropdown control   
Popup   Popup – use a popup control. 
ListBox  ListBox – use a listbox control. 
DropdownPrompt    Optional text to show on the dropdown if no user is selected   
Height    For ListBox PickerType only; sets the height of the ListBox control   
Width    For ListBox PickerType only; sets the width of the ListBox control   

Example 
<bpx:UserPicker ID="AssignUser" DropdownPrompt="[Pick a User]" PickerType="Popup"
runat="server" Multiple="true" InGroup="AdminUsers" />

Contents ⎜ 79
 
BP Logix Inc. Process Director 80
Developers Reference

Contents ⎜ 80
 
BP Logix Inc. Process Director 81
Developers Reference

CUSTOMIZATION FILE
Workflow/Process Director provide the ability to customize functions available to users and the user interface with a customization 
script file named vars.cs.aspx. To modify these settings edit the vars.asp file and configure any of the settings documented below. 
The vars.cs.aspx file is located in the “/Workflow Director/website/custom/” directory that was created during the installation. This 
file is preserved during a server upgrade.  
 
The following are called only for the vars files: 

Contents ⎜ 81
 
BP Logix Inc. Process Director 82
Developers Reference

// Called BEFORE database initialized


public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
}

// Called after database initialized


public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
}

// Called on pages that are "in" a partition


public override void SetPartitionVars(BPLogix.WorkflowDirector.SDK.bp bp,
BPLogix.WorkflowDirector.SDK.Partition Partition)
{
}

// Called to return the optional page to navigate to after the login occurs
public override string GetFirstPage(BPLogix.WorkflowDirector.SDK.bp bp, string pFirstPage)
{
}

// Called when a user clicks on "forgot password". In this callback, you can set
// a new password for the user, and you can force the user to change their password
// after their first login. Return true to allow the password retrieval, or false
// to prevent the password retrieval. Note that fAllowRetrievePassword must be set
// to true to allow any user to retrieve their password. Only built-in
// (vs Active Directory) users can retrieve their password.
public override bool ForgotPassword(BPLogix.WorkflowDirector.SDK.bp bp, string UserID, string
OldPassword, out string NewPassword, out bool MustChangePassword)
{
}

// Called to validate a password change for a user. Return true to allow the
// password change, or false to prevent the change. You can set the Reason
// parameter to a string representing the reason for the invalid password (eg, password
// too short)
public override bool ValidatePassword(BPLogix.WorkflowDirector.SDK.bp bp, string UserID, string
OldPassword, string NewPassword, out string Reason)
{
}

// This event is called prior to synchronizing a user from Active Directory using the
// AD Sync Profiles. Returning true allows the user to be sync'ed. Returning false
// will prevent the user from being sync'ed.
public override bool AD_Sync_User(BPLogix.WorkflowDirector.SDK.bp bp, string ProfileName,
System.DirectoryServices.AccountManagement.UserPrincipal User)
{
return true;
}

// This event is called prior to synchronizing a group from Active Directory using the
// AD Sync Profiles. Returning true allows the group to be sync'ed. Returning false
// will prevent the group from being sync'ed.
public override bool AD_Sync_Group(BPLogix.WorkflowDirector.SDK.bp bp, string ProfileName,
System.DirectoryServices.AccountManagement.GroupPrincipal Group)
{
return true;
}

Custom Variables
Workflow/Process Director provide miscellaneous customization variables that control various functions on the system. Most 
configuration variables should be set in the SetSystemVars method. 

ADGrouphierarchy
This variable allows you to configure the type(s) of groups the user is a member of when using the Active Directory synch.

Contents ⎜ 82
 
BP Logix Inc. Process Director 83
Developers Reference

Values 
Value Name  Description  Default 
ADGroupHierarchyOptions.AllAuthGroups This will enable adding the user to every security group (even   
    hierarchical) they are a member of. 
ADGroupHierarchyOptions.AllGroups  This will enable adding the user to every group (security AND  Default 
distribution) (even hierarchical) they are a member of. 
ADGroupHierarchyOptions.None  setting will only add the users to the groups they are directly a member   
of. 

Example 
// The default
// This will enable adding the user to every security group (even hierarchical) they are a
member of.
bp.Vars.ADGrouphierarchy = ADGroupHierarchyOptions.AllAuthGroups;
// This will enable adding the user to every group (security AND distribution) (even
hierarchical) they are a member of.
bp.Vars.ADGrouphierarchy = ADGroupHierarchyOptions.AllGroups;
// This setting will only add the users to the groups they are directly a member of
bp.Vars.ADGrouphierarchy = ADGroupHierarchyOptions.None;

ADAuthSettings
This variable allows you to configure specific authentication settings for each domain for validating users at login. The account used 
for each domain must have permission to open the Active Directory and validate credentials. 

Example 
// Configure specific administrator accounts to use to validate logins for 2 domains.
bp.Vars.ADAuthSettings.Add(new ADAuthSetting("MY_DOMAIN_1", "AD_Admin", "pwd1"));
bp.Vars.ADAuthSettings.Add(new ADAuthSetting("MY_DOMAIN_2", "AD_Admin", "pwd2"));

ADAuthNoDomain
Certain Active Directory installations cannot accept a domain as part of the credential validation. This flag can be set to ensure the 
domain is not passed to the Active Directory validation. 

Example 
// Do not use the domain on the credential validation
bp.Vars.ADAuthNoDomain = true;

BusinessHolidays
This variable allows you to control which dates are considered Holidays. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Only add a few dates as holidays
//You must decare the (i.e. Using System.Collections.Generic) namespace or use it inline
to use HashSet
bp.Vars.BusinessHolidays = new HashSet<DateTime>();
bp.Vars.BusinessHolidays.Add(new DateTime(2009, 1, 1).Date);
bp.Vars.BusinessHolidays.Add(new DateTime(2010, 1, 1).Date);
}

BusinessHourStart
This variable allows you to control when business hours start. This affects workflow due dates. 

Contents ⎜ 83
 
BP Logix Inc. Process Director 84
Developers Reference

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This organization starts at 7 am
bp.Vars.BusinessHourStart = 7;
}

BusinessHourStop
This variable allows you to control when business hours end. This affects workflow due dates. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This organization ends at 6 pm
bp.Vars.BusinessHourStop = 18;
}

CheckReminderBusinessHours
This variable allows you to control if workflow / project reminders should be sent ONLY during business hours 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Only send reminders during business hours
bp.Vars.CheckReminderBusinessHours = true;
}

fAllowRetrievePassword
This variable allows you to control whether built‐in users can retrieve their passwords if they are forgotten. If set to true, a prompt 
will appear on the login page. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars.fAllowRetrievePassword = true;
}

fAllowV6Import
This variable allows you to control whether the iMarkup Server V6 import option appears in the Content List. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars.fAllowV6Import = true;
}

fPDFCreateOtherAsAttachments
This variable allows you to control whether the CreatePDFFromDocument API will create a container PDF file for documents that 
cannot be converted directly to a PDF file. 

Example 

Contents ⎜ 84
 
BP Logix Inc. Process Director 85
Developers Reference

public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)


{
bp.Vars.fPDFCreateOtherAsAttachments = true;
}

fReenableUsersOnSync
This variable determines what happens to pre‐existing disabled users on an AD Sync.  If set, the sync will re‐enable these users, but 
will not if the flag is not set.  The default value of this flag is ‘true’. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars.fReenableUsersOnSync = false;
}

fTestMode
This variable allows you to set the system into a test mode. In this mode, Windows Integrated authentication is disabled. This mode 
allows anyone to log into the server without a password. Use this setting with caution. It should only be used on non‐production 
systems to test processes and eForms. Use this in conjunction with TestUserEmails for the ability to use 1 email address to test all 
workflows. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars.fTestMode = true;
bp.Vars.TestUserEmails = User.GetUserByUserID(bp, "my_test_id");
}

nFormOpenProps
This variable allows you to set an option to open a form normal, maximized or full screen mode. 

Values 
Value Name  Description  Default 
FormOpenProps.Normal    Comes up as a popup window smaller than the screen size   
FormOpenProps.Maximized  Comes up as a popup sized to the full screen  Default 
FormOpenProps.UseFullScreen  Uses the IE full screen parm to maximize the popup window   

Example 
// Called BEFORE database initialized
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Sets popup windows to open in a normal window
bp.Vars.nFormOpenProps = FormOpenProps.Normal;
}

EmbedDocumentTypes
This variable allows you to control document types are displayed using the EMBED tag in the browser. You can inspect or modify this 
list. 

Example 

Contents ⎜ 85
 
BP Logix Inc. Process Director 86
Developers Reference

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");
}

InlineDocumentTypes
This variable allows you to control document types are displayed “inline” in the browser. You can inspect or modify this list. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Add the ZIP file type as one to display “inline”
bp.Vars.InlineDocumentTypes.Add("ZIP");
}

nMaxAdminRows
This variable allows you to set the maximum number of rows in the Admin section for any list. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will set the maximum number of rows to 400 in any list of the admin section.
bp.Vars.nMaxAdminRows = 400;
}

sLocalIPs
This variable is used to set the optional list of local IP addresses on the server. This is used so that any browser request from one of 
the local IP addresses will be able to access all administration functions. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will set the the following IP addresses as “local” IP addresses for this
// multi-NIC server
bp.Vars.sLocalIPs = "10.1.5.14,10.1.5.32";
}

sStyleEnabled
This variable allows you to set the system default style for enabled form fields. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will set the default style for Enabled form fields to a white background
bp.Vars.sStyleEnabled = "background-color:White;";
}

sStyleDisabled
This variable allows you to set the system default style for disabled form fields. 

Example 

Contents ⎜ 86
 
BP Logix Inc. Process Director 87
Developers Reference

public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)


{
// This will set the default style for disabled form fields to a gray background
bp.Vars.sStyleDisabled = "background-color:#CCCCCC;";
}

sStyleRequired
This variable allows you to set the system default style for required form fields. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will set the default required style for form fields to a yellow background
bp.Vars.sStyleRequired = "background-color:#FFFF99;";
}

sStyleError
This variable allows you to set the system default style for form fields in an error state. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// This will set the default style for form fields in an error state to a red background
bp.Vars.sStyleError = "background-color:Red;";
}

TestUserEmails
This variable allows you to route all process emails (task list emails, notifications, etc) to a single user. Use this setting with caution. It 
should only be used on non‐production systems to test processes and eForms. Use this in conjunction with fTestMode for the ability 
to use 1 email address to test all workflows. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars.fTestMode = true;
bp.Vars.TestUserEmails = User.GetUserByUserID(bp, "my_test_id");
}

Vars
This can be used to set system global variables in the vars.cs.ascx file. Using {CustomVar:mayvar} will return the custom variable (in 
this case myvar) that was defined in the vars.cs.ascx file. 

Example 
public override void SetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
bp.Vars["myvar"] = "My string";
}

Custom Workflow Reminder Times


Workflow/Process Director allow the reminder times in the workflow builder to be customized in the dropdown lists. To modify the 
default time values displayed in the dropdown, edit the vars.cs.aspx file in the “\Program Files\BP Logix\Workflow 
Director\website\custom\” directory created during the installation. Set the StepReminderTimes array variable in this file. This file is 
preserved during a server upgrade. 

Contents ⎜ 87
 
BP Logix Inc. Process Director 88
Developers Reference

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
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"));
}

Custom Workflow Step Colors


Workflow/Process Director allow the step colors in the workflow builder to be customized in the dropdown lists. To modify the 
default color values displayed in the dropdown, edit the vars.cs.aspx file in the “\Program Files\BP Logix\Workflow 
Director\website\custom\” directory created during the installation. Set the WorkflowColors array variable in this file. This file is 
preserved during a server upgrade. 
public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)
{
// Workflow colors
// If you comment out this next line, it will append new values to the default list
bp.Vars.WorkflowColors = new List<ColorValue>();
bp.Vars.WorkflowColors.Add(new ColorValue("Default", "", ""));
bp.Vars.WorkflowColors.Add(new ColorValue("333366", "#333366", "#FFFFFF"));
bp.Vars.WorkflowColors.Add(new ColorValue("FFCCFF", "#FFCCFF", "#666666"));
bp.Vars.WorkflowColors.Add(new ColorValue("FFFF00", "#FFFF00", "#666666"));
bp.Vars.WorkflowColors.Add(new ColorValue("FFFF99", "#FFFF99", "#666666"));
}

Custom Project Reminder Times


Workflow/Process Director allow the reminder times in the project definition to be customized in the dropdown lists. To modify the 
default time values displayed in the dropdown, edit the vars.cs.aspx file in the “\Program Files\BP Logix\Workflow 
Director\website\custom\” directory created during the installation. Set the ProjectReminderTimes array variable in this file. This file 
is preserved during a server upgrade. 
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
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"));
}

Custom eForm Control Styles


eForms 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 eForm properties page. To modify the list of default styles displayed in the dropdown, edit 
the vars.cs.aspx file in the “\Program Files\BP Logix\Workflow Director\website\custom\” directory created during the installation. 
Set the WorkflowColors array variable in this file. This file is preserved during a server upgrade. 

Contents ⎜ 88
 
BP Logix Inc. Process Director 89
Developers Reference

public override void PreSetSystemVars(BPLogix.WorkflowDirector.SDK.bp bp)


{
// eForm style choices
// If you comment out this next line, it will append new values to the default list
bp.Vars.StyleOptions.Clear();
bp.Vars.StyleOptions.Add("border:3px solid #AD1A10;");
bp.Vars.StyleOptions.Add("border:3px solid red;");
bp.Vars.StyleOptions.Add("border:3px solid blue;");
bp.Vars.StyleOptions.Add("border:1px solid blue;");
bp.Vars.StyleOptions.Add("border:1px dashed blue;");
bp.Vars.StyleOptions.Add("border:1px dotted red;");
}

Contents ⎜ 89
 
BP Logix Inc. Process Director 90
Developers Reference

WEB SERVICES
This section provides a reference for calling or extending Web Services in Workflow/Process Director.  

Calling BP Logix Web Services


There are numerous APIs that can be called from any platform that supports Web Services. The BP Logix Web Services are divided 
into functional areas, providing separate WSDL’s for each area. The following sections describe the Web Service areas. 
 
Web Service  Description  Documentation URL / WSDL URL 
wsContent  Services to manipulate content items (get, delete, 
http://<servername>/Services/wsContent.asmx 
get/set categories and meta data, etc), in the BP 
Logix repository.   http://<servername>/Services/wsContent.asmx?WSDL 
wsDocument  Services to manipulate/add documents in the BP  http://< servername>/Services/wsDocument.asmx 
Logix repository.   
http://<servername>/Services/wsDocument.asmx?WSDL 
wsForm  Services to manipulate eForms including getting and  http://<servername>/Services/wsForm.asmx 
setting form data.   
http://<servername>/Services/wsForm.asmx?WSDL 
wsGroup  Services to iterate and manipulate groups.  http:// <servername>/Services/wsGroup.asmx 
 
http:// <servername>/Services/wsGroup.asmx?WSDL 
wsUser  Services to iterate and manipulate users.  http:// <servername>/Services/wsUser.asmx 
 
http:// <servername>/Services/wsUser.asmx?WSDL 
wsUtil  Utility Services such as version query.  http:// <servername>/Services/wsUtil.asmx 
 
http:// <servername>/Services/wsUtil.asmx?WSDL 
wsWorkflow  Services to query, start, and manipulate workflows  http:// <servername>/Services/wsWorkflow.asmx 
 
http:// <servername>/Services/wsWorkflow.asmx?WSDL 

Where <servername> is the host and the optional virtual directory (e.g. /wd/) where the product is installed. 
Your specific development environment will have documentation to process a WSDL files and calling web services.  
You will need to enable the Web Services in BP Logix using the Administration‐>Installation Settings. Ensure that “Web Service 
Enabled” is set to True. You can optionally require all Web Service calls to authenticate by setting “Require Web Service 
Authentication” to True. When this is set, you will need to call the Authenticate Web Service call prior to any other calls. You can 
optionally set the “Web Service Restrictions” to a list of comma separated IP addresses that can call Web Services. If this field is set, 
only request from these IP Addresses will be allowed. 

Extending BP Logix Web Services


You can also write new or extend the web services provided by BP Logix by developing your own custom .asmx pages in the custom 
folder. Your new Web Service, for example, can be a “proxy” to a remote web service that takes a parameter list that the Web 
Service Custom tasks support. Or you can provide Web Services that search for and return custom data. 
See the sample in the /custom/samples/SampleService.asmx.sample file. Notice that the Web Service is derived from the 
bpWebService class. This allows you to call any BP Logix SDK API from the new Web Service. 

Contents ⎜ 90
 
BP Logix Inc. Process Director 91
Developers Reference

To extend BP Logix Web Services inside Visual Studio, use the fully functional Visual Studio project installed with the product named 
bpVS.zip. Refer to the sample file SampleService.asmx. 

Calling Other Web Services


The easiest way to call Web Services provided by other Enterprise Applications is to use the Web Service custom task. This custom 
task allows you to call a remote Web Service without writing any code. You can map the inputs and outputs of the Web Service call 
to Form Fields, system variables, or custom variables. 
Additionally, you can use any .NET language to call other Web Services. To do this, use the .NET WSDL compiler to generate the 
proxy code for the Web Service. Then package the proxy into a .DLL and place it into the /Bin folder of the BP Logix application. Your 
custom eForm, Workflow, or Knowledge View scripts can then call these Web Services. 

Contents ⎜ 91
 
BP Logix Inc. Process Director 92
Developers Reference

CUSTOM TASKS
Custom Tasks can be written in Workflow/Process Director and used by eForms and workflow definitions. A Custom Task allows 
common business logic to be packaged in a reusable way and made available to users that are building eForms and workflows. You 
should be familiar with writing custom scripts for eForms and workflows before writing a Custom Task. There are two types of 
custom tasks; eForm Custom Tasks and Workflow Custom Tasks.  

What Custom Tasks Can Be Used For


Custom Tasks can provide various types of business functions that are unique to your environment, or common functions that can 
be used across multiple eForms and workflow definitions. For sample Custom Tasks contact BP Logix. 

eForm Custom Tasks 
The eForm Custom Tasks can be used for various business logic. It can assist in the pre‐population of form data from external 
sources (e.g. database). A Custom Task can be triggered when an event occurs (e.g. change to a dropdown), and use the information 
in the form fields to make additional external queries, mapping the returned data to the main eForm. The Custom Task can access 
and modify any of the fields on the main eForm it is mapped to.  

Workflow Custom Tasks 
The workflow Custom Tasks can be used to perform functions like making calls to external systems or reading/writing information in 
an external database. Workflow Custom Tasks can also be used to encapsulate logic for sending emails to external users, custom PDF 
creation logic, exporting a document to an external source (e.g. file system), or dynamically assigning users to workflow steps when 
the workflow is running. 

How Custom Tasks Work


Custom Tasks in Workflow/Process Director provide a way to package reusable functions for eForm builders and workflow 
implementers. They consist of an eForm and a script file. This allows your business logic to be placed in the script, and the eForm is 
used to collect configuration information for the script, and optionally can display an interface (eForm Custom Tasks only). An eForm 
Custom Task can be mapped to different events (e.g. form display, button, etc.) on a standard eForm and are run when the event 
occurs. Workflow Custom Tasks automatically appear in the Workflow Builder toolbar as a new task type that can be dragged and 
dropped on the workflow palette. 

Configuration vs. Running


The Custom Tasks are executed in the following modes: 
 
Configuration  This is when the user is configuring the data needed for the Custom Task to run. During the 
configuration, it is common to display a list of the form fields in the container eForm. This allows fields 
to be mapped to external sources by the builder of an eForm, without requiring them to have any 
special naming convention for their form fields. 
Run‐time (run)  The Custom Task is run when a mapped eForm event is trigged or when a workflow step. When a 
Custom Task is run, it has access to the configuration data and the container eForm. 
 

Configuration Data
When a Custom Task is configured, a form data instance is created that contains the configuration data entered. This form instance 
is stored “under” the eForm Definition or Workflow Definition, depending on the type of Custom Task. When the Custom Task is run 
(in an eForm or workflow) it has access to all this configuration data in this form instance.  

Contents ⎜ 92
 
BP Logix Inc. Process Director 93
Developers Reference

Container eForm
A Custom Task can have a “container eForm”. This is the standard eForm that is displayed to the user. An eForm Custom Task is 
mapped to an event on the container eForm. A container eForm is optional for a workflow Custom Task, but can be specified as part 
of the step configuration in the workflow builder. The eForm and script part of a Custom Tasks has access to the container form 
data. 

Workflow Custom Tasks


A workflow Custom Task provides users that are building workflows the ability to use custom business logic in the workflow 
definition. A workflow Custom Task can be dragged to the workflow palette just as built‐in workflow task can. The Custom Tasks will 
display an eForm interface to the user building the workflow that allows them to configure the data required for the Custom Task. 
This configuration data will be available to the Custom Task script when the workflow step is run. The Custom Task script will run in a 
similar environment to a workflow script and has access to all workflow objects and their data. 
 
A Workflow Custom Task cannot display an interface to the end‐user participating in the workflow process. The only interface 
displayed is during the configuration of the Custom Task in the workflow builder. 

eForm Custom Tasks


An eForm Custom Task provides users that are building eForms the ability to execute custom business logic when the end‐user is 
filling out the form. A Custom Task is mapped to an event on the eForm (e.g. button). When the end‐user triggers this event, the 
eForm Custom Task script will be executed. A Custom eForm Task can provide a mapping of external fields (e.g. database) to the 
fields on an eForm. 
 
When the script for an eForm Custom Task is run, it can optionally display an interface to the user. The Custom Task script can query 
and/or set any of the form data on the container eForm. 

Creating a Custom Task

Building the eForm and Script


A Custom Task requires an eForm created in the .NET environment similar to how an eform is created. To create an eForm for a 
Custom Task, use the Create New menu item in the Content List and select eForm Definition in the dropdown. Then select from the 
template dropdown “Use Empty .ASCX form”.  The eForm must be created using the special options in the eForm Definition page 
that is displayed. A Custom Task can be created as an eForm‐only Custom Task, a Workflow‐only Custom Task, or a Custom Task the 
can be used by both eForms and Workflows. This eform will also display any Custom task configuration. 
 
These events are called for eforms and while configuring a Custom Task:   
public override void BP_Init()
public override void BP_Event(bp.EventType pEventType, string pEventName)
public override void BP_Validation()
public override void BP_Display()
public override void BP_Completed()
 
When a custom task is mapped to an eForm, the following custom task function will be called: 
protected override bool CT_RunTask(bp.eFormCTMappedTo pMappedTo, string pEventName) This event is called to "run" a custom 
task. It should return "true" to show the custom task GUI, or false to continue processing the form. 
public override bool CT_RunTask(bp.eFormCTMappedTo pMappedTo, string pEventName)
This function should return "true" to show the custom task GUI. 
 
This is created like any other custom task (eform, workflow), and when the rule is evaluated that uses the CT, this event will be 
called: 
public override DataItem CT_RunRuleTask()
This is so the custom task can return a string, a list of UIDs, etc. 
These events are called for custom tasks while running a GUI: 

Contents ⎜ 93
 
BP Logix Inc. Process Director 94
Developers Reference

public override void CT_Init()


public override void CT_Event(bp.EventType pEventType, string pEventName)
public override bool CT_Validation()
public override void CT_Display()
public override void CT_Completed()
Use this.FormInfo to access the current eform info. For example: 
this.FormInfo.FormControl("SomeTextControl").Text = "This is new text";
 
While in a custom task run or GUI, use this.ContainerFormInfo to access the containers form info (get/set form fields, etc). For 
example: 
this.ContainerFormInfo.FormControl("SomeContainerControl").Required = true;
Use this.FormInfo.AddInfoMessage and this.FormInfo.AddErrorMessage to add error or info messages to forms (eg for validation). 
For example: 
this.FormInfo.AddInfoMessage(new FormMessageString("This info message will display on the
form!"));
A custom task may have 2 sections, FormControlCustomTaskConfig and FormControlCustomTaskRun. For example: 
<bpx:FormControlCustomTaskConfig runat="server">
This section includes stuff that is shown when a custom task is being configured
<asp:TextBox ID="config_text1" runat="server"></asp:TextBox>
</bpx:FormControlCustomTaskConfig>
 
<bpx:FormControlCustomTaskRun runat="server">
This section includes stuff that is shown when a custom task is run inside an eform (if
CT_RunTask returns true).
<asp:TextBox ID="run_text1" runat="server"></asp:TextBox>
</bpx:FormControlCustomTaskRun>
 
 

Contents ⎜ 94
 
BP Logix Inc. Process Director 95
Developers Reference

Calling BP Logix Web Services 90 
Calling Other Web Services 91 
Cancel 55, 66 
INDEX CheckReminderBusinessHours 84 
Classes 12 
ClearDropDown 37 
ClearRows 37 
ColumnSum 38 
.  CommentLog 67 
Configuration Data 92 
.NET eForm 2 
Configuration vs. Running 92 
Constructor 27, 40 
A  Container eForm 93 
ContentObject Class 16 
Activity Check Page 10 
ContentPicker 67 
ADAuthNoDomain 83 
ControlPicker 68 
ADAuthSettings 83 
ConvertSysVarsInString 18, 32, 50, 57, 60 
Add 17 
CopyObject 19 
AddDocumentFromBytes 18 
CreateFolder 45 
AddDocumentFromFS 18 
CreateNewFolder 29 
AddErrorMessage 31 
CreatePath 28 
AddInfoMessage 31 
CreateSubFolder 29 
Adding a New eForm Definition 9 
CreateUser 46 
AddJavaScript 32 
Creating a Custom Task 93 
AddObjectMap 17 
Creating ASP.NET eForms 9 
AddRow 36, 61 
Curr 13 
AddToDropDown 36 
Custom ASPX Pages 8 
AddToGroup 48 
Custom eForm Control Styles 88 
AddToWorkflow 55 
Custom Project Reminder Times 88 
AddUser 41 
Custom Scripting 4 
AddUsersToStep 58 
Custom Tasks 92 
AddUserToPartition 47 
Custom Variables 82 
AddUserToProfile 47 
Custom Workflow Reminder Times 87 
ADGrouphierarchy 82 
Custom Workflow Step Colors 88 
Array 61 
Customization File 81 
ArrayMoveDown 63 
Customization through Scripting 2 
ArrayMoveUp 62 
ArrayRemoveRow 62 
Attach 63  D 
DataSource Class 22 
B  DateDiff 12, 69 
DatePicker 68 
bp Class 12 
DateTimePicker 68 
BP Logix Visual Studio Plug‐in 10 
DBConnectorPicker 69 
bpButton 64 
Debugging Workflow Scripts 7 
bpCheckBox 64 
Decimal 13 
bpDateTime 13 
DelegateUser 49 
bpLabel 64 
Delete 42, 48 
bpString 65 
DeleteObject 19 
bpTextBox 65 
Developing an eForm in the .NET environment 9 
Building the eForm and Script 93 
Document Object Class 23 
BusinessHolidays 83 
Double 13 
BusinessHourStart 83 
DropDown 69 
BusinessHourStop 84 
Dropdown Object Class 25 
ButtonArea 65 
DropdownValue Object Class 26 


Calculate 66 

Contents ⎜ 95
 
BP Logix Inc. Process Director 96
Developers Reference

E  GetWorkflowStepBySTID 57 
GetWorkflowStepBySTINSTID 57 
eForm Controls 61  GetWorkflowStepUserBySUINSTID 60 
eForm Custom Tasks 93  Group Class 40 
eForm Scripts 4  GroupPicker 70 
EmbedDocumentTypes 85 
Extending BP Logix Web Services 90 

F  HasUser 42 
How Custom Tasks Work 92 
fAllowRetrievePassword 84  HTML 70 
fAllowV6Import 84  HTMLEncode / HTMLDecode 13 
FillDropDown 38  HTTPRequest 13 
Folder Class 27 
Form Class 29 
FormatCurr 12  I 
FormControl 32  IgnoreSection 71 
FormControl Class 35  ImportExcelDatabase 15 
FormControlByID 33  Include Files 10 
FormControls 33  InGroup 48 
FormErrorStrings 70  InlineDocumentTypes 86 
FormInfoStrings 70  Instantiate 30, 52 
FormMessageString Class 40  Int 13 
fPDFCreateOtherAsAttachments 84 
fReenableUsersOnSync 85 
fTestMode 85  J 
JumpToStep 52 
G  JumpToStepID 52 
GetAttribute 19 
GetAttributes 20  K 
GetChildren 20 
Knowledge View Scripts 7 
GetDataSourceByDSID 23 
KView 71 
GetDataSourceByName 23 
GetDataSources 45 
GetDocumentByDID 24  L 
GetDropDownByDDID 25 
ListBox 71 
GetDropDownValues 26 
log0 14 
GetErrorMessages 34 
log1 14 
GetFileType 20 
log2 14 
GetFolderByID 28 
log3 14 
GetFolderByPathName 28 
log4 14 
GetFormByFORMINSTID 30 
log5 14 
GetGroupByID 40 
Login 14 
GetGroupByName 41 
GetInfoMessages 35 
GetJavaScript 34  M 
GetObjectByID 16 
GetObjectByPathName 17  Methods 12, 16, 23, 24, 25, 26, 28, 30, 36, 40, 43, 46, 50, 57, 
GetPartition 43  60 
GetPartitionByID 44  MoveObject 21 
GetPartitionByName 44 
GetPartitionID 43  N 
GetRootFolder 44 
GetUserByID 46  nFormOpenProps 85 
GetUserByUserID 47  nMaxAdminRows 86 
GetWorkflowByWFID 51 
GetWorkflowByWFINSTID 51 
GetWorkflowStepByName 58 

Contents ⎜ 96
 
BP Logix Inc. Process Director 97
Developers Reference

O  TabStripContent 78 
TestUserEmails 87 
Overview 2  TimePicker 78 

P  U 
Partition Class 43  UnDelegateUser 49 
PostEvent 51, 54  Understanding Workflow/Process Director 2 
Print 72  UpdateObject 22 
User Class 45 
R  UserPicker 79 
Using a .DLL file with Your Scripts 10 
Radio 72  Using a Specific Workflow Script File 6 
RecalcFormInstanceName 34 
RemoveFromGroup 49 
RemoveObjectFromParent 21  V 
RemoveRow 38, 73  Vars 87 
RemoveUser 42 
RemoveUsersFromStep 59 
Restart 53  W 
RichText 73  Web Services 90 
RoutingSlip 73  What Custom Tasks Can Be Used For 92 
Run 54  Workflow Class 50 
Workflow Custom Tasks 93 
S  Workflow Scripts 6 
WorkflowStep Class 56 
Save 74  WorkflowStepUser Class 59 
SaveForm 34  WriteDocumentToDisk 24 
Script Types 2  Writing a Knowledge View Script Function 7 
Section 75  Writing a Workflow Script Function 6 
SelectDropDown 39 
SendEmail 15 
SetAttribute 21 
SetCurrentFormInstance 53   
SetDocReviewable 24 
SetDropDownValues 25, 26 
SetGroupName 22 
SetPriority 54 
SetStepError 59 
SetStepMessage 59 
ShowAttach 75 
SignatureComments 76 
sLocalIPs 86 
sStyleDisabled 86 
sStyleEnabled 86 
sStyleError 87 
sStyleRequired 87 
Start 53 
Sub‐Class 40 
Sum 77 
SwapRows 39 
SysVar 77 


Tab 78 
TabContent 78 
TabStrip 77 

Contents ⎜ 97

You might also like