Business Processes Infinity SDK Training

baasopchoppySecurity

Nov 5, 2013 (3 years and 9 months ago)

158 views
















Business Processes

Infinity SDK Training



Products Group

Blackbaud

November 5, 2013




Blackbaud



Internal Use Only

Page
1

7/16/2010

Table of Contents

1

Course Prerequisites

................................
................................
................................
...............................

4

2

Learning Objectives

................................
................................
................................
................................
.

5

3

Business Process Overview

................................
................................
................................
....................

6

3.
1

Parameter Sets and Instances

................................
................................
................................
.........

6

3.2

Processing the Data

................................
................................
................................
.........................

6

3.3

SDK Developer Responsibilities

................................
................................
................................
.......

7

3.3.1

Parameter Set Page

................................
................................
................................
...............

7

3.3.
2

Business Process Logic

................................
................................
................................
.........

8

3.3.1

Status Page

................................
................................
................................
..........................

10

4

Business Process Parameters

................................
................................
................................
..............

13

4.1

Overview

................................
................................
................................
................................
........

13

4.2

Managing Par
ameter Sets and Starting a Business Process without a Pre
-
Process Edit Data
Form

................................
................................
................................
................................
..............

13

4.2.1

Configuring the Start Process Action
Button

................................
................................
.........

15

4.3

Managing Parameter Sets and Starting a Business Process with a Pre
-
Process Edit Data Form
...

16

4.3.1

Configuring the Start Process Action Button with a Pre
-
Process Edit Data Form

..................

18

4.4

Using a QueryViewSpec as a Parameter for Output Formatting

................................
.....................

20

4.4.1

Understanding the
QueryViewSpec’s
JoinField

................................
................................
....

24

4.5

Using a Selection as a Parameter to Restrict the Row Set

................................
.............................

26

5

Building the Business Process Processing Logic

................................
................................
...............

27

5.1

When a business process instance starts…

................................
................................
...................

27

5.1.1

Application Locks

................................
................................
................................
.................

27

5.1.2

Infinity ASP.Net WebHealth Events

................................
................................
......................

27

5.1.3

Status Updated
................................
................................
................................
.....................

28

5.1.4

Simultaneous Run Check

................................
................................
................................
.....

28

5.1.5

Validate() and Retrieving th
e Parameters

................................
................................
.............

28

5.1.6

StartBusinessProcess() Performs the Bulk of Data Processing

................................
............

28

5.2

Typical Duties for your Sub Class
................................
................................
................................
...

29

5.2.1

Retrieve and Validate the Parameters: Validate()

................................
................................

29

5.2.2

Start the Business Process: StartBusinessProcess()

................................
...........................

30

5.3

AppBusinessProcess base class’ OutputView Property

................................
................................
.

33

5.4

Creating an Output Table via the CreateOutputTableFromView() function

................................
.....

34

5.5

Optionally Creating a Selection of Processed Records via CreateIDSet() Function

........................

36

5.6

Creating an Output Table via the CreateOutputTable() function

................................
.....................

37


Blackbaud



Internal Use Only

Page
2

7/16/2010

5.7

AppBusinessProcess base class’ CreateFieldsList Func
tion

................................
..........................

37

6

Business Process Instance Status Page

................................
................................
..............................

38

6.1

Expression Data Form Drives Expressions on the Status Page

................................
.....................

41

6.2

Summary View Data Form

................................
................................
................................
.............

42

6.3

Recent Status Tab

................................
................................
................................
.........................

43

6.4

History Tab

................................
................................
................................
................................
.....

44

6.4.1

Deleting History

................................
................................
................................
....................

48

6.5

Jo
b Schedules

................................
................................
................................
................................

48

6.5.1

Add, Edit, and Delete Job Schedule Actions

................................
................................
.........

49

6.6

Action Group

................................
................................
................................
................................
..

50

6.6.1

Start
Process Action

................................
................................
................................
.............

50

6.6.2

Edit Process Action

................................
................................
................................
..............

50

6.6.3

Generate WSF Action
................................
................................
................................
...........

51

6.6.4

Create Job Schedule Action

................................
................................
................................
.

53

6.6.5

Create Task Action

................................
................................
................................
...............

55

6.6.6

Delete Process Action

................................
................................
................................
..........

57

7

Typical Catalog Project Specs and Code
................................
................................
..............................

58

7.1

BusinessProcessSpec

................................
................................
................................
....................

58

7.1.
1

BusinessProcessSpec XML Element

................................
................................
....................

59

7.1.2

ProcessorComponent Element

................................
................................
.............................

60

7.1.3

BusinessProcessOutputHeader Element

................................
................................
..............

62

7.1.4

FormMetaData Element

................................
................................
................................
.......

63

7.1.5

QueryViewSpec(s) to Define the Output Format (Optional)

................................
..................

63

7.1.6

SQLFunctionSpec to Limit the Output

................................
................................
..................

63

7.1.7

SQLStoredProcedureSpec to Retrieve the Parameter
s within the Processing Code

............

63

7.2

Specs to Manage the Parameter Sets

................................
................................
............................

63

7.2.1

TaskSpec to Launch the Parameter Set Page

................................
................................
......

63

7.2.2

PageDefinitionSpec for the Parameter Set Page

................................
................................
..

64

7.2.3

TableSpec for the Custom Parameter Set Table

................................
................................
..

64

7.2.4

AddDataFormTemplateSpec to Add a Parameter Set

................................
..........................

64

7.2.5

EditDataFormTemplateSpec to Edit a Parameter Set

................................
...........................

64

7.2.6

EditDataFormTemplateSpec for the Pre
-
Process Edit Data Form

................................
........

64

7.2.7

RecordOperationSpec to Delete a Parameter Set

................................
................................

64

7.2.8

DataListSpec to List the Param
eter Sets

................................
................................
..............

64

7.3

Specs to Manage the Business Process Status

................................
................................
.............

65


Blackbaud



Internal Use Only

Page
3

7/16/2010

7.3.1

TaskSpec to Launch the Status Page

................................
................................
...................

65

7.3.2

PageDefinitionSpec for the Status Page

................................
................................
...............

65

7.3.3

ViewDataFormTemplateSpec for the Summary Section on the Status
Page

........................

65

7.3.4

ViewDataFormTemplateSpec for the Expression View Data Form on the Status Page

........

65

7.3.5

DataListSpec to Return a Status List

................................
................................
....................

65

8

Tables

................................
................................
................................
................................
......................

66

8.1

Overview

................................
................................
................................
................................
........

66

8.2

BusinessProcessCatalog Table

................................
................................
................................
......

66

8.3

BusinessProcessStatus Table

................................
................................
................................
........

67

8.4

Business Process Parameter Set Table (USR_INVENTORYPROCESS)

................................
.......

68

8.4.1

Sample Business Process Parameter Table

................................
................................
.........

69

8.4.2

Business Process Parameter Status Table (USR
_INVENTORYPROCESSSTATUS)

..........

72

8.4.3

Business Process Parameter Export Format Table
(USR_INVENTORYPROCESSEXPORTFORMAT)

................................
................................
............

73

8.5

BusinessProcessView Table

................................
................................
................................
..........

74

8.6

BusinessProcessOutput Table

................................
................................
................................
.......

77

8.7

BusinessProcessInstance Table Secures Parameter Sets

................................
.............................

78

9

Queue Processes

................................
................................
................................
................................
...

79

10

Exercise 1


Adding the Custom Parameter Set Table for the Business Process

.............................

80

11

Exercise 2
-

Adding the
Selections for the Food Bank Inventory Business Processes

....................

85

12

Exercise 3


Building the Processing Logic for the Food Bank Inve
ntory Business Process

.........

96

13

Exercise 4


Adding Parameters Sets

................................
................................
................................
.

109

14

Exercise 5
-

Building the Status Page

................................
................................
................................
.

114

15

Parameter Set
Page

................................
................................
................................
..............................

138

15.1

Business Process Parameter Set Data List

................................
................................
..................

138

15.2

Exercise 6


Review and Load the Business Process Parameter Set Data List
............................

139

15.3

Exercise 7
-

Building the Business Process Parameter Set Page

................................
.................

140

16

Business Process Tasks

................................
................................
................................
......................

156

16.1

Using a Task’s StartBusinessProcess Action Type

................................
................................
......

15
6

16.2

Using a Task’s RunBusinessProcess Action Type

................................
................................
.......

158





Blackbaud



Internal Use Only

Page
4

7/16/2010

1

Course Prerequisites

The following Infinity SDK course prerequisites or related experience are required before registering for this
course.

1.

An understanding of XML, XSL schemas, and XML namespaces

2.

Understanding of the Infinity Platform, SDK, and Catalog Sy
stem

3.

Creating and managing solutions and projects using Microsoft Visual Studio

4.

Building class libraries (assemblies) using Microsoft Visual Studio and Visual Basic.NET

5.

Authoring classes and inheritance using Visual Basic.NET

6.

Experience with Microsoft SQL
Server Management Studio

7.

An understanding of T
-
SQL including authoring SQL SELECT statement
s
, views, user defined functions, and
stored procedures.

8.

Knowledge of

SQL Server Agent Jobs

9.

Ability to navigate and understand Infinity feature metadata within the s
hell

10.

Ability to configure new pages, tabs, sections, and actions

11.

Experience authoring the following types of Infinity Catalog Items (specs):

a.

TableSpec

b.

CodeTableSpec

c.

AddDataFormTemplateSpec

d.

EditDataFormTemplateSpec

e.

ViewDataFormTemplateSpec

f.

DataListSpec

g.

Expr
ession Data Form

h.

QueryViewSpec

i.

Recor
dOperationSpec

j.

SQLFunctionSpec

k.

SQLStoredProcedureSpec

l.

PageDefinitionSpec

m.

TaskSpec

n.

Configuring Ad
-
Hoc Queries and Selections


Blackbaud



Internal Use Only

Page
5

7/16/2010

2

Learning Objectives

1.

Recognize the role of business processes within an Infinity based
application

2.

Understand the importance of parameter sets to a business process

3.

Learn common patterns
and best practices
for formatting and restricting the output from a business process

4.

Understand the difference between a business process and a business
process instance

5.

Learn how data processing occurs within a business process

6.

List the Infinity SDK software developer responsibilities for building and supporting the functionality
required for a business process

7.

Describe the database tables used by Blackba
ud Enterprise CRM to manage business processes

8.

Describe how a
QueryViewSpec

can be used to define the output format for a business process

9.

Describe how a selection can be used to limit the rows processed by a business process

10.

Gain experience building a wo
rking inventory business process for the food bank sub application within
Blackbaud Enterprise CRM including

hands on experience in the building of:

a.

Parameter

set page to view, manage and secure parameter sets

b.

S
tatus page to view status of current and hist
orical business processe
s
-

c.

B
usiness process logic to generate the output




Blackbaud



Internal Use Only

Page
6

7/16/2010

3

Business Process

Overview

Freedom is the best word to discuss business processes
. With business process you have freedom to
process data
to produce any output type.
Y
ou are

free
to design any number of

input parameters

to get the
job done. You are free to query, process, and transform the data however you wish. You are free to create
the final
output

as there is no restriction on the format of the final processed data. From an a
rchitectural
perspective, business processes are free to process the data and leave that data in a state that can be
used by any number of future processes.

3.1

Parameter Sets and Instances

Individual parameters are
organized into a parameter set.
The end user
can

define
multiple

parameter sets

for a given
business
process and then select a
specific parameter set prio
r to
launching the business process.


A
business process can be designed
to accept zero, one or several
parameters.
Before a business
process is run, the end user selects
a parameter set and starts the
business

process instance.
Using
the parameter set
for guidance, the
business process instance will
process the data.
The parameters
are used within the processing logic to
produce the desired output.
A business process can have a history of business process instances. Each
instance is associated with a

specific parameter set.

The custom business process

described here
includes a name to label the parameter set, a description to
describe the business process instance, a reference to a query view to help format
the output
, and a
selection to help
restri
ct

the row set being processed.


While this material highlights the best practice of using
a
QueryViewSpec to help format the
output and a selection to help restrict the row set

of a business process, k
eep in mind you are
free to develop whatever parame
ters you see fit to create your custom solution. You are also
free to create any type of output your requirements dictate.

3.2

Processing the Data

D
ata processing for a business process occurs
within a
.NET

CLR class that exists within an assembly
which is deployed
on the
Infinity
web server
. This code
runs within the web services layer
.

Within this CLR
class file, the parameter set values are retrieved and the processing on the data begins in earnest. How
the processing occurs is up to you and t
he output data format is completely open.

A common practice is to use a
QueryViewSpec

to define the output format. A reference to
a

QueryViewSpec

can be passed
to the business process instance
as a parameter within the parameter set.
Different paramete
r sets can contain references to different
QueryViewSpec
which will in turn affect how
Figure
1

-

An end user can configure multiple parameter sets for business process.


Blackbaud



Internal Use Only

Page
7

7/16/2010

the data is processed and which columns will appear within the final output.
See
Using a QueryViewSpec
for Output Formattin
g

for details.

Often business processes will require a
way to r
etrict the row set being processed
. A best practice is to
use

a “selection”
to accomplish this. A selection
is a set of record id’s for a particular record type.
A
selection can be a static
or unchanging list of record ids or it can be a dynamic list of record id
s

which are
derived when called upon by a business process
.
Selections can be created using Blackbaud’s query tool
by first creating either an ad
-
hoc query or smart query and then sa
ving the query results as a selection.
See
Using a Selection to Restrict the Row Set

for details.


The output for a business process could be a
new flat file, xml file or

database table which in turn could be
used as
the input for a subsequent business process for further processing.
As another example
, the
output for a business process could
be
the creation a
nd population of a new
batch
.
Or, y
ou
could create a
process that generates a flat file to be used by a

separate,
3
rd

party system.
Or
,

y
ou could create and
populate a database table that provides data for a report.
The figure below depicts a business process
instance running with a specific

parameter set to produce a database table.
Remember, a custom
business process can use any number parameters as input to produce a table, xml file, flat file, batch,
series of web service calls to another system, etc. You have freedom to create the para
meters,
processing, and output to solve your organization’s challenges.


Figure
2

-

Business Process

A


utilizes parameter set
“C”
and produces
an
output

table.


3.3

SDK Developer Responsibilities

When building a business process,
a
n Infinity SDK developer
typically will need to account for the

following
functionality:

1.

Build a parameter set page

to view, manage, and secure the parameter sets

2.

Build the business process logic

to generate the output

3.

Build a business process instance status page
to view the status of current and historical processes

3.3.1

Parameter Set Page

One of the tasks a business process administrator/end user will need to accomplish is managing parameter
sets for a given business proce
ss. Once a parameter set has been established, the user should be able to
start a new instance of the business process and view
the
history of previous business process instances.
In addition, the user will need to permission and secure a parameter set
for a particular site and/or role.



Blackbaud



Internal Use Only

Page
8

7/16/2010


Figure
3

-

A typical parameter set page


An Infinity SDK developer will need to build
a parameter set

page and the individual f
eatures referenced by
the page. Below is a listing of the
Infinity features that are typically used within a parameter set page:

1.

Custom
DataListSpec to view the list of parameter sets that the user has permission to view

2.

Custom
EditDataFormTemplateSpec to edit a parameter set

3.

Custom
AddDataFormTemplateSpec to ad
d a parameter set

4.

Custom
RecordOperationSpec to delete a parameter set

5.

Custom
Page definition spec that references the following:

a.

A tab with a section that references the data list to display the parameter sets

b.

Add action to open the data form to add a new

parameter set

c.

Edit action to open the data form to edit the selected parameter set

d.

Delete action to call upon the record operation to delete the selected parameter set

e.

Start Process action to start the business process using the selected parameter set

f.

Go
to Process action to view the business process instance status page.

g.

Security action to permissi
on the selected parameter set which occurs via an out of the box Add
Data Form provided by Blackbaud Product Development.

For more information on building the

status page see
Building a Page to Manage Business Process
Parameter Sets
.

3.3.2

Business Process Logic

A BusinessProcessSpec is used to reference the .NET class. The ProcessorComponent tag references
the assembly name and

a fully qualified
class name that contains the processing logic.

The fully qualified
class name consists of the class name (InventoryProcessBusinessProcess) appended to the assembly
name (Blackbaud.CustomFx.FoodBank.Catalog).


Blackbaud



Internal Use Only

Page
9

7/16/2010


Figure
4

-

Sample BusinessProcessSpec


Your business process processing will occur within a .NET class that inherits from Blackbaud’s
AppCatalog.AppBusinessProcess class. Overriding the Validate() sub within this class enables you to
retri
eve the parameter set values for the instance. Overriding the StartFunctionBusinessProcess() function
enables you to write code tha
t processes the data and produce

the output.
StartFunctionBusinessProcess() will send back an object of type
Blackbaud.AppF
x.Server.AppCatalog.AppBusinessProcessResult

which

provides the Infinity platform with
the number of record successfully process and the number of exceptions, if any.


Blackbaud



Internal Use Only

Page
10

7/16/2010


Figure
5

-

Sample business process code


This class will be
located within your catalog assembly along with your catalog items/specs. The assembly
will run within the web service layer
. For custom catalog assemblies

built by Blackba
ud Professional
Services, customers, and other 3
rd

party development staff, the as
semblies should be
deployed to the
vroot
\
bin
\
custom sub folder for
your Infinity web application on the web server.

3.3.1

Status Page

A business process will spawn many business process instances.
When an instance is started, the
designated parameter set is a
ssociated with the instance.
The Infinity SDK developer will need to build a
business process instance status page to view the status of
the
current
business process instance along
with

historical
instances
.
A busine
ss process instance status page
is prim
arily used to view the recent and
historical statuses for a business process and its associated parameter set. After a business process is
started manually, the task or action typically will redirect the user to the status page. Users typically
navigate
to the status page from the parameter set page or other pages or tasks, if needed
.

How you design your status page is up to you. Keep in mind that a typical business process instance
status page should provide the ability to:

1.

View business process insta
nce paramete
r set information via a custom view data f
orm

2.

View recent status of the business process instance by levera
ging an out of the box view data f
orm

3.

Start the most recent business process instance using the parameter set provided for the instance

v
ia a Start
Process a
ction button

4.

Edit the parameter set for the business process

via an action th
at calls upon an edit data form

5.

Generate a windows script file to launch the business process with the current parameter set

via an action
that calls upon out
of the box

CLR code


Blackbaud



Internal Use Only

Page
11

7/16/2010

6.

Create a job schedule to launch the business process with the current parameter set

by leveraging
an out of
the box add data form

7.

Create an Infinity Task that

launch
es

the business process with the current parameter set

via an action that
calls upon a
n out of the box add data form

8.

Delete the current parameter set for the business process


Figure
6

-

Status page, recent status tab, and actions

9.

View historical business process instances via a cust
om data list

10.

Delete status history and any related output tables, if they exist, by leveraging an out of the box record
operation
.


Figure
7



History Tab: s
tatus history requires a custom data list and an action to call a reco
rd operation that deletes the selected history

11.

View and manage job schedules by leveraging out of the box data list, add data form, edit data form, and
delete record operation


Blackbaud



Internal Use Only

Page
12

7/16/2010


Figure
8

-

Job Schedules Tab




Blackbaud



Internal Use Only

Page
13

7/16/2010

4

Business Process

Parameters

4.1

Overview

Individual parameters are organized into a parameter set. A business process can be designed to accept
zero, one or several parameters.
The end user can define multiple parameter

sets for a given business
process.

Before a business process is started, the end user
creates one or several parameter sets, selects a
parameter set, and starts the business process
instance. Using the parameter set for guidance,
the business process in
stance will process the
data.

An end user will rely upon an add data form and an
edit data form to save the parameter data into a
custom database table. This table is built with a
table spec and the name of the database table is
referenced within the busi
ness process spec.

4.2

Managing Parameter Sets
and
Starting a Business Process
without a

Pre
-
Process Edit Data Form

Business processes can be configured to start with or without a pre
-
process edit data form.

Using the
diagram below as a guide, let’s walk th
rough the high level steps involved with managing parameter sets
and starting a business process.


Step1:
End User
Manages D
ata

-

An end user manages parameter values in sets via an Add Data Form and
Edit Data Form which persist the parameter sets to the

database within a custom parameter set table.

At this point
the business process has not been called upon to start. We are just managing data in a database table.

Step 2: Save the Parameter D
ata

-

The business process (BP) parameter table is a custom database table that
stored parameter data for a specific business process.


This table is referenced within the BusinessProcessSpec’s
ParameterTableName attribute.


Each row within the
custom
table hol
ds a reference to a parameter set.


The primary
key value of the row is passed to a BP when the BP is started.



Step 3: Start the Business Process

-

The Start process action button is configured with an ActionType property
value of StartBusinessProcess.


The context passed to the BP is the primary key value of the custom BP parameter
table (blue table).


There is no PreProcessEditForm configured in this scenario. After the BP is started the user is
directed to the status page.

Step 4:
BP Processor Retrie
ves the Parameters and Crunches the Data
-

Using the primary key value of
the parameter set which was selected by the end user prior to starting the business process, the BP will retrieve the
parameters from the custom parameter table and process the data.


Step 5: Create Output Table

-

To fulfill the business requirements the business process can produce a new
output table filled with th
e processed data.


See related

BUSINESSPROCESSOUTPUT

and
BUSINESSPROCESSSTATUS

tables.


Figure
9

-

Parameter Sets


Blackbaud



Internal Use Only

Page
14

7/16/2010


Figure
10

-

Managing Parameter Sets and Starting a Business Process without a Pre
-
Process Edit Data Form


Blackbaud



Internal Use Only

Page
15

7/16/2010

4.2.1

Configuring

the Start Process Action Button

An end user will typically click an action button within a section on a page start a business proces
s. The
action should be configured to use the StartBusinessProcess action type p
assing the appropriate context
value to the business
process. The context
value should be the
primary key value of a
row within the custom
parameter set table
.

With the user interface
in design mode, right
click the “Start process”
button and select
Properties from the
context menu. This will
open a property sheet
for the action button.

Here

is a screen shot of a “Start
process”
action button that resides within a section
which contains a data list of a parameter sets.

The BusinessProcess property should be set
the business process as defined by the
BusinessProcessSpec.

The StatusPage property should be set to a
status page

which will need to be constructed
for the BP.

The ContextType property should be the
primary key value of a row within the custom
parameter set table. Here we are setting it to
the ID column on the
data list which is the
primary key value for the
parameter set table
.


Once a parameter set is selected and the
action button has its context value, the “Start
process” button can be selected to launch the

BP and navigate the end user to the status
page.

See below.






Figure
11

-

Configuring the "Start Process" action button

Figure
12

-

"Sta
rt process" action button property sheet


Blackbaud



Internal Use Only

Page
16

7/16/2010


Figure
13

-

Business Process Status Page

4.3

Managing Parameter Sets and Starting a Business Process
with a

Pre
-
Process Edit
Data Form

You may run across a scenario w
here an end
user wants to change
parameter values for a parameter set
each time the business process is launched
. Through configuration a SDK developer or anyone familiar
with the capabilities of page designer can provide additional parameters for the “St
art process” action
button to include a pre
-
process edit form.

Using the diagram below as a guide
, the red stars help to high
light the differences

between

starting a
business process with
and without
a pre
-
process edit data form
.

Step 2:
Saving the
Parameter D
ata

-

The save implementation of the add data form will need to provide
default values for any additional parameters managed by the pre
-
process edit data form.
One must save
all the parameter values for the parameter set to support the queuing
of business processes.

Step 4:
Start
ing

the BP
-

A PreProcessEditForm

is configured in this scenario.


The edit data form
appears prior to the BP being started.


This allows the end user to modify additional parameter values that
typically get each time t
he business process is launched. Please note that an end user will no
t have the
opportunity to select parameters via a PreProcessEditForm when a BP is launched within a Queue.

S
tep 5
: Saving the Data from the Pre
-
Process Data Form
-

A pre
-
process data form is a stand alone
data form that saves data to a parameter table.
After the save is complete, the system launch
es

the
business process.

S
tep 6
:
BP Processor Retrieves the Par
ameters and Crunches the Data
-

Using the primary key value
of the parameter set which was selected by the end user prior to starting the busines
s process, the BP will

Blackbaud



Internal Use Only

Page
17

7/16/2010

retrieve the parameters from the custom parameter table and process the data.


Note: any additional
parameters managed by the pre
-
process edit data form should be retrieved by the BP logic.


Figure
14

-

Ma
naging Parameter Sets and Sta
rting a Business Process with

a Pre
-
Process Edit Data Form


Blackbaud



Internal Use Only

Page
18

7/16/2010

Note: Pre
-
p
rocess edit data forms cannot be invoked at run time when a business process is
launched as a step within a Queue.
Queues are used to set up a series of
business
processes to
run automatically and unattended.
Each step in a queue refers to a business process and a
specific parameter set
.
Since
a queue can

launch a series of business processes automatically there is no
opportunity

for human interaction and

therefore no opportunity to modify the parameters via the pre
-
process edit data form.
For more information on Queue see the section titled
Queue Processes
.

4.3.1

Configuring

the Start Process Action Button with a

Pre
-
Process

Edit Data Form

The pre
-
process edit form is meant to as a way for end users to modify parameter values that typically
change with each business process instance run. The PreProcessEditForm should be set to an edit data
form which has been built to save pa
rameter values to the parameter set table or other related parameter
table(s).



Here is an example of a business process named “
Print Membership Cards

Process
” t
h
at comes with
Blackbaud CRM.
A

new parameter set is added prior to starting the business process.

After the

parameter set is saved to the database a
“Start process” button is selected,
the action has been
configured to display
the pre
-
process edit form
prior to starting the process. The pre
-
process edit form

allows the user to modify parameter values that change with each business process run.
See below.

Figure
15

-

Adding a Parameter Set for the Print Membership Card Process


Blackbaud



Internal Use Only

Page
19

7/16/2010


Figure
16

-

Configuring the "Start process"

ac
tion button’s PreProcessEditForm property


Below a pre
-
process edit form allows an end user to name and create a constituent selection from the
results of the business process.
After the pre
-
process edit form saves the settings to the database, the
action

will launch the BP and navigate the end user to the status page.


Blackbaud



Internal Use Only

Page
20

7/16/2010


Figure
17

-

An example of a pre
-
process edit form


4.4

Using a
QueryViewSpec
as a Parameter
for Output Formatting

A QueryViewSpec is traditionally used to provide tables and fields to
se
le
ct

within Blackbaud Enterprise
CRM’s ad
-
hoc query tool.
As an example, within
the food bank source code
,

the FoodBank.Query.xml file
contains a QueryViewSpec which leverages t
he
cus
tom
USR_FOODBANK
and
U
SR_FOODBANKTYPECODE

table
s. The FoodBank.Query.xml file can be found within the food bank
source code’s catalog project. The USR_FOODBANK table

extends the constituent table in a one to one
relationship providing additional columns of data for a
food bank
organization.
When the QueryViewSpec
is loaded into the Infinity catalog (database), we can see the result by creating a new ad
-
hoc query that

is
based on the Constituent source view. Below we can see the additional food bank columns as defined by
the
custom
QueryViewSpec:


Blackbaud



Internal Use Only

Page
21

7/16/2010


Figure
18

-

The traditional use of a QueryViewSpec is to support ad
-
hoc query.


But, how can a

software developer use a QueryViewSpec
in
conjunction

with a business process?
While
not required, a
best

practice is to use a
QueryViewSpec
to define the output format

of a business process
.
Typically, before starting an instance, an end user may selec
t a reference to a specific QueryViewSpec as
one of the input parameters into a process.
Different parameter sets can contain references to different
QueryViewSpecs which will in turn affect how the data is processed and which columns will appear within
t
he final output.
In short, a QueryViewSpec can be used to drive the columns of data created by a
business process.

The best practice to define the output columns is to utilize a reference to an “Output Format”
QueryViewSpec as a parameter value into the

business process instance. The QueryViewSpec
is used to define a database view.


Blackbaud



Internal Use Only

Page
22

7/16/2010

Once a parameter set is selected and a business process instance is started, the Infinity platform will call
upon .
NET

code to process a set of records.
Within the busines
s process vb code, a base set of record
may be combined with the records
and columns
defined by the
QueryViewSpec
.
If necessary, t
he T
-
SQL
logic within the QueryViewSpec influences the processing
of data

within the business

process.
The output
fields def
ined within the QueryFiewSpec determine the columns of data created as the output from the
business process.

Below is an example of a QueryViewSpec that
is used to drive
the output format for the food bank
inventory

business process

that we will be build
ing
. Specific tags within the QueryViewSpec help
relate

the
query to a specific business process

and the processing that occurs therein
:



Blackbaud



Internal Use Only

Page
23

7/16/2010

The figure below displays
the
same
QueryViewSpec
shown above along with
the BusinessProcessSpec
spec
. The
highlighted areas illustrate the relationships between the two

specs
.



Blackbaud



Internal Use Only

Page
24

7/16/2010

4.4.1

Understanding the
QueryViewSpec’s
JoinField

Look again at the sample QueryViewSpec used to provide the output formatting for a business

process.
W
e can see the JoinField element wi
thin the BusinessProcessOutput element. Within the business process
code a base set of record
s

may be combined with the records

defined by the QueryViewSpec via this join
field.


The business process class the developer creates must inherit from
Bla
ckbau
d.AppFx.Server.AppCatalog.
AppBusnessProcess.
The JoinField value defines how these two
record sets can be joined together across a common field.
See below for an example of how the vb class
uses the JoinField property.

The JoinField value within the spec

is directly related to the value within the
AppBusinessProcess.OutputView’s JoinField property which is used to join the records defined within the
QueryViewSpec’s view to the processing that occurs within the business process code.
See below.




Blackbaud



Internal Use Only

Page
25

7/16/2010



Blackbaud



Internal Use Only

Page
26

7/16/2010

4.5

Using a Selection
as a Parameter
to Restrict the Row Set

Another common situation a developer will run into is the necessity to restrict the row set to a specified set
of records.
A selection is a set of record id’s for a particular record type. A select
ion can be a static or
unchanging list of record ids or it can be a dynamic list of record ids which are derived when called upon by
a business process.
Selections can be created using Blackbaud’s query tool by first creating either an ad
-
hoc query or smart query and then saving the query results as a selection.
Selections can also be created
by other business processes.
Check out the following materials

on
query
and selections
within the
Query
and Export Guide

i
f you are unfamiliar with
either

topic.

Different parameter sets can contain references to different selection
s which will in turn affect the restriction
of rows within the output of the business process. In short, a selection can be used to rows of data created
by a business process.

Once a parameter set is selected and a business process instance is started, t
he Infinity platform will call
upon .NET code to process a set of records.
Within the business process vb code, a base set of record
may be restricted by the set of ids defined by the “Selection” parameter.
Below is an example of the
“selection” paramete
r
is used
within the join clause to filter the rows. A standard user defined function
named
UFN_IDSETREADER_GETRESULTS is used

to read the GUIDs from an IDSET (selection) in the
database using the id of the selection (IDSETID).



Figure
19

-

Restricting the rows using a join clause and the selection parameter




Blackbaud



Internal Use Only

Page
27

7/16/2010

5

Building the Business Process Processing Logic

We will now walk through
a
business process code
example. The goal is to highlight

typical
activities
and
patterns an
Infinity developer would encounter when building a business process.

The business process
code exists as a .NET class that lives within an asse
mbly which is deployed on the Infinity web server.
Typically this is the “catalog” assembly where your
other
xml

specs
reside
. Your .NET class must
inherit

from the base class Blackbaud.AppFx.Server.AppCatalog.AppBusinessProcess that is housed within the
Blackbaud.AppFx.Server.dll assembly.
Inhe
ritance is the ability to use all of the functionality of an existing
class, and extend those capabilities without re
-
writing the original class.
1
0
For brevity, we will refer to the
inherited class as AppBusinessProcess.


5.1

When a business process
instance
starts…

When

a
business process
instance
begins
the
inherited

(Blackbaud)

code
within
the
AppBusinessProcess

base class will
do the following:

5.1.1

Application Locks

o

The system uses the
sp_
getapplock()

s
ystem stored procedure to create a
n
exclusive application lock
using
the BUSINESSPROCESSSTATUSID
as the lock’s resource name

(
@Resource
)
.
Using
sp_getapplock

g
uarantee
s

ser
ial access to application database code and database objects by issuing an application lock
.

This is a way
to synchronize code and it effectively
blocks other users from entering the section of code until the lock is
released
.
Any process calling sp_geta
pplock with the same @Resource variable will be blocked until the app
lock is released.

The resource/lock name
is a
unique
string specifying a name that identifies the lock
resource.

The application lock is made on the database connection.
Since the
BUS
INESSPROCESSSTATUSID
is a global unique identifier the resource/lock name will be unique. The lock mode is exclusive. The
lock
owner is set to ‘Session’ meaning the code will ultimately have to call
sp_releaseapplock()

to release
the

lock.


5.1.2

Infinity
ASP.Net WebHealth

Events

o

Before creating the app lock, the code will raise an ASP.NET WebHealth event named
InfoBusinessProcessDetailMessage
stating
"Business process: CreateAppLock

entered".


o

Once the lock is
acquired

a
n

ASP.NET
WebHealth Event is raised
named
InfoBusinessProcessDetailAppLockAcquired stating "Business process status app lock acquired"
.


o

The code will then attempt to get an application lock
for the specific parame
ter set using
"BPappLock:" &
ParameterSetID as the lock name. Before the lock is attempted a
"Business process:
CreateParameterSetAppLock entered", WebHealth InfoBusinessProcessDetailMessage is raised. Web events
will be raised if a lock could not be a
chieved. If the business process is already running a message of
"Business process parameter set app lock not acquired, return code=X" along with error information
including “The buisness process ‘<Your BP Spec Name>’ is already running.

Database Applic
ation Lock Status Codes

0

'Lock was successfully granted synchronously.

1

Lock was granted successfully after waiting for other incompatible locks to be released.


Blackbaud



Internal Use Only

Page
28

7/16/2010

-
1

Lock request timed out

-
2

Lock request was cancelled

-
3


Lock request was chosen as a
deadlock victim.

-
999

Parameter validation or other call error.

The Infinity Platform and the applications that are built on it have been instrumented using the
standard ASP.Net WebHealth system. This system allows the application developer (Blackbaud)
to
efficiently surface

diagnostic,

security,

auditing, and

logging

information about the inner workings
of the application. An administrator then uses a built in configuration system to tap into this stream of
information and route the particular events of

interest to various consumers of the information.


See
Monitor Infinity Web Server Events with PowerShell and WMI

for more information.

5.1.3

Status Upda
ted

o

A row is inserted into the
BUSINESSPROCESSSTATUS

table and a row is inserted into the custom
Business
Process Parameter Status Table
.


This signifies that the BP instance started with the selected parameter set.

5.1.4

Simultaneous Run Check

o

A check for simultaneous runs of the business process instance is performed. The BusinessProcessSpec’s
AllowSimultaneousExecution

attribute determines whether instances
business

process should be allowed to
be started if another
business

process of the same type is

already running. If the attribute

is set to False
then the code will check the

BUSINESSPROCESSSTATUS

table using the BUSINESSPROCESSSTATUSID where
the StatusCode is 1 (
Running
)

and an application lock is currently in effect for the resource.

5.1.5

Validate() and Retrieving the Parameters

o

Validate()
subroutine
is called

which is
marked as
Overridable
. T
he

Overridable

keyword specifies that a
property or method can be overridden in a
sub
class.

Meaning your sub class, the class that inherits from the
Ap
pBusinessProcess base class, can override or replace its code.
By Overridding Validate() you can ensure
that your business process is prepared to do its work. A typical task for Validate is to retrieve the
parameters from the
parameter set
. See
Retrieve and Validate the Parameters
.

Once validation has
passed the base class will
an raise an ASP.NET WebHealth Event
named
InfoBusinessProcessDetailUserCodeStarted
.

5.1.6

StartBusinessProcess() Performs the Bulk of Data Processing

o

After Validate() has occurred, the base class will start the business processing by making a call to the
StartBusinessProcess() function which is marked as
MustOverride
. The MustOverride keyword
specifies
that a property or procedure in a base class must be overridden in a derived class before it can be used.

This
means you must
provide the code for

the StartBusinessP
rocess() function within your sub class. See
Start
the Business Process
.

It is here where the bulk of the data processing is conducted.

o

After processing has completed, the base class will raise
an ASP.NET WebHealth

Event named
InfoBusinessProcessDetailUserCodeCompleted
. Followed by marking the business process instance as
completed by updating the
BUSINESSPROCESSSTATUS table with a STATUSCODE of zero (), updating the
NUMBERPROCESSSED, NUMBEROFEXCEPTIONS, and ENDEDO
N values
.



Blackbaud



Internal Use Only

Page
29

7/16/2010

5.2

Typical Duties for your Sub Class

Your

business process

sub class

will need to accomplish the following duties:

o

Retrieve and validate the p
arameters

o

Start the
business p
rocess

and p
rocess the data

o

Create some type of output with columns

o

Optionally c
reate a selection of the results

o

Return a Result

5.2.1

Retrieve
and Validate the Parameters
: Validate()

The base class from which your sub class inherits will call your

V
alidate()
sub routine

to begin processing
.
Overriding the Validate() sub
routine
provides the developer with the opportunity to retrieve parameters
and
perform any other validation duties
for the business process. If there is an issue with parameter retr
ieval

or
validation
, then throw an exception.


In the sample below, we are using an InventoryParameters class to retrieve the
name of the “
output format


query
view
(OUTPUTVIEWID)
and
the “Selection” (IDSETID) parameters.


Blackbaud



Internal Use Only

Page
30

7/16/2010


Figure
20

-

Overriding the Validate() Sub


5.2.2

Start the Business Process
: StartBusinessProcess()

Prior to starting the business process, we should have the parameters retrieved and validated. See
Retrieve and Validate
the Parameters
:
Validate()

for details.

Generally speaking the most typical use of a business process is to create some type of output that
contains database records. The format of the output depends on your requirements. A common practice,
although not required, is to product a database table

containing your processing results.
No matter what
format you choose for your business process output, there is a good chance you will need to define the
columns for the output.

The best practice to define the output columns is to utilize a reference
to an “Output Format”
QueryViewSpec as

a parameter value into the business process instance.

The QueryViewSpec
i
s used to define a database view
.
See
Using a QueryViewSpec as a Parameter for Output
Formatting

f
or more information.


Blackbaud



Internal Use Only

Page
31

7/16/2010

5.2.2.1

Grab the Output Format

V
iew

Name and Join Field

So, our first major step within the StartBusinessProcess function is to take the id of
“Output Format”
QueryViewSpec
and retrieve the name of the view and its join field.
A helper f
unction within the base class
named OutputView is used to retrieve both the name of the view and the join field.

See
AppBusinessProcess base class' OutputView property

for more details

on retrieving t
he query view
name and join field.


5.2.2.2

Create the Output Table

Using the

Output Format


View Name

Often the result of a business process is the creation of a database table which contains the resulting data
of your process.
CreateOutputTableFromView
()

c
reates an output table in the business processor
database based on a view in the application database.

The function will return the name of the created
database table and a
ByRef array of TableColumn
s.

See
Creating

an Output Table via the CreateOutputTableFromView()

function

for more details.


5.2.2.3

Building the SQL to
Populate the Output Table
: Building a Field List

Using the table name and the
ByRef array of TableColumn
s returned from the base class’
CreateOutputT
ableFromView() function, begin the process of populating the output table by building an
INSERT T
-
SQL statement. Pass the table columns into the base class’ Cre
ate
FieldsList() function which
will return a comma delimited list of columns.

See
AppBusinessProcess base class’ CreateFieldsList Function

and

Creating an Output Table via the
CreateOutputTableFromView()

function

for details.


Blackbaud



Internal Use Only

Page
32

7/16/2010


5.2.2.4

Building the SQL to
Populate the Output Table
:
Joining the “Output Format” and
“Selection” Row Sets

After the field list has been built, the next step is to build the JOIN clauses that pulls in the records from

Output Format
” v
iew parameter utilizing the
join field

and also restricts the row set using the “
Selection

parameter. The table valued UFN_IDSETREADER_GETRESULTS user defined fun
ction is leveraged to
build a table of guids represented by the “Selection” parameter (IDSETID).


5.2.2.5

Executing the SQL Command to Populate the Output Table

and Return a Result


After the SQL has been dynamically built, we open a SQL connection to the database where we created
the output table. We execute the command, which is an INSERT SQL Statement. This populates the
output table. Finally, the
StartBusinessProcess() funciton

should return an object of type
Blackbaud.AppFx.Server.AppCatalog.AppBusinessProcessResult which includes the number of records
processed and the number of exceptions
, if any.


Blackbaud



Internal Use Only

Page
33

7/16/2010



5.3

AppBusinessProcess base class’ OutputView Property

OutputView

is a member of the inherited
Blackbaud.AppFx.Server.AppCatalog.AppBusinessProcess
base
class.

The OutputView property is used to retrieve both the name of the view and the join field used to
join the row set generated by the view to the base SQL that is
dynamically created within the business
processor code.
The AppBusinessProcess base class’ OutputView property accepts the ID of a
QueryViewSpec which represents the selected “Output Format” parameter and returns an object of type
OutputViewInformation.

A stored procedure named
USP_BUSINESSPROCESSVIEW_GETVIEWINFORMATION

is used to retrieve the view db object name,
join field, and query view spec information form the BUSINESSPROCESSVIEW and
QUERYVIEWCATALOG tables for the given ID.

See the appropriat
e
business process subject area ERD

for details on the tables surrounding
business processes.

Use the T
-
SQL View Defined by the QueryViewSpec to output format/columns


Blackbaud



Internal Use Only

Page
34

7/16/2010


Figure
21

-

Leveraging the Base Class' OutputView

propert
y to retrieve the name of the "Output Format" view name and join field


5.4

Creating an Output Table via the CreateOutputTableFromView() function

Often the result of a business process is the creation of a database table which contains the resulting data
of yo
ur process.
CreateOutputTableFromView
()

c
reates an output table in the business processor
database based on a view in the application database.
A

view

is a virtual table that consists of columns
from one or more tables.
The
CreateOutputTableFromView()

function will utilize the columns defined
within the view to create the structure/columns of the table. The table will be created with no data. Once
created,
you

can populate

the table with data within your
business processor

code.


Blackbaud



Internal Use Only

Page
35

7/16/2010

The function is overl
oaded meaning there is more than one definition of the function. The table name will
have a suffix containing the primary key of the current business process status.
The length of the table
name should not exceed 128 characters.

The
CreateOutputTableFro
mView() function

accepts
a ByRef array of TableColumn classes

as a
parameter. Since this parameter is marked as
ByRef,

your
business processor

code

can pass the
“returned” array of columns into the base class’
CreateFieldsList
() function which builds a comma delimited
list of fields. The comma delimited list of fields can be used within a T
-
SQL data manipulation statement,
such as an INSERT statement, to populate

the table with data.

Below is a table with a description of the parameters for the version of the
CreateOutputTableFromView

function that we are using in the code sample below.

Blackbaud.AppFx.Server.AppCatalog.AppBusinessProcess
.CreateOutputTableFromVi
ew() Function’s
Parameters

Parameter Name

Description

ByVal/ByRef

viewName

The name of the source view to be used to populate the table fields

ByVal

tableNamePrefix

The prefix of the table name to be created. Table name prefix will be
concatenated with
the id of the current business process run.

The length of the
table name should not exceed 128 characters

ByVal

tableKey

Used to uniquely identify the output table when a business process creates
multiple output tables in a single process run.

ByVal

tableColumns

A ByRef array of TableColumn classes that make up the output table. In the
example below this collection is passed to the
CreateFieldsList function which
returns a string of column named used within the dynamically generated SQL.

ByRef


Belo
w is a code sample
from the subclass
which

inherits from AppBusinessProcess. Note where we
override the StartBusinessProcess() funciton.
In the blue highlight,

we pass the name of the view. The
view name is derived from the
“Output format” parameter
.
The function returns the name of
an output table
named USR_INVENTORYPROCESS_<guid>
table name.

The value
"USR_INVENTORYPROCESS" is
used fo
r the tableNamePrefix parameter. Within the base class’
CreateOutputTableFromView

function, the
BusinessProcessSta
tusID value will be concatenated to the end of the table prefix.

Example: USR_INVENTORYPROCESS_03aab75b_798a_404b_962b_63a4f0ddcc10


Blackbaud



Internal Use Only

Page
36

7/16/2010


Figure
22

-

Creating the output table using
the

columns defined within the "Output Format" query view.

5.5

Optionally Creating

a Selection of Processed Records

via CreateIDSet() Function

The CreateIDSet() creates a selection which contains the ids of the records processed for a particular
record type. Cre
ateIDSet() function is used to support the "Create selection of processed records" option
found on most business process definitions. A selection can be used as an input into a business process
or created by a business process.

Selections can also be cr
eated using Blackbaud’s query tool by first creating either an ad
-
hoc query or
smart query and then saving the query results as a selection. A selection may be created by other business
processes as some processes employ an option to "Create selection of p
rocessed records”.
Within the
food bank inventory business process, the IDSETREGISTERID field points to a system table named
IDSETREGISTER.
E
ach row in the
IDSETREGISTER

table corresponds to a view or table
-
valued function
that returns a list of
Primary
Key ID values

of a particular record type (database table), such as Constituent
or Revenue
.

Note: Selections can be created via Blackbaud’s Query tool. A selection can be used as an input
parameter into a business process instance. A selection is a l
ist of record ids used within the
business process .net code to restrict the number of rows processed via a SQL JOIN or WHERE

Blackbaud



Internal Use Only

Page
37

7/16/2010

clause.

Check out the following materials on query and selections within the
Query and Export Guide

i
f you are
unfamiliar with either topic.

5.6

Creating an Output Table via the CreateOutputTable() function

Often the result of a business process is the creation of a database table which contains the r
esulting data
of your process.
The CreateOutputTable() function creates a table in the business process database

based on a list of TableColumn classes

which are passed into the function as a parameter
.

This function is
similar to the
CreateOutputTableFromView
() function in that it creates a table, accepts a name prefix and
key parameters to build the table name.
Table name prefix will be concatenated with the id of the current
business process run
. The table name can not exceed 128
characters. The
USP_BUSINESSPROCESS_CREATEOUTPUTTABLE stored procedure is used to create the table.

The
table will be created with no data.
The function
return
s the name of the database table created. Using the
returned database table name
, you can popu
late the table with data within your
business processor

code.

A primary difference between the CreateOutputTable() function and the
CreateOutputTableFromView()
function

is the
CreateOutputTable() function

accepts a
ByVal

Generic.IList(Of TableColumn) while the
CreateOutputTableFromView() function

accepts
a ByRef array of TableColumn classes
.

Blackbaud.AppFx.Server.AppCatalog.AppBusinessProcess
.
CreateOutputTable
() Function’s
Parameters

Parameter Name

Description

ByVal/ByRef

tableNamePrefix

The prefix of the table name to be created. Table name prefix will be
concatenated with the id of the current business process run.

ByVal

tableKey

Used to uniquely identify the output
table when a business process
creates multiple output tables in a single process run.

ByVal

columns

List of TableColumn classes to define the columns to be added to
the output table.

ByVal

overrideSuffixWithNewGuid

If true, name the table with a unique G
UID suffix; if false, use the
primary key of the current business process status as the GUID suffix.
If overrideSuffixWithNewGuid is true, the table name will have a
unique GUID suffix; if it is false, its suffix will be the primary key of
the current bus
iness process status.

ByVal

5.7

AppBusinessProcess base class’
CreateFieldsList

Function

Y
our
business processor

code

can pass
an
array of columns into the base class’ CreateFieldsList()
function which builds a comma delimited list of fields.
Within your
business processor code, t
he comma
delimited list of fields can be used within a T
-
SQL data manipulation statement, such as an INSERT
statement, to populate the table with data
.

See
Creating an Output Table via the
CreateOutputTableFromView()

function

for an example.




Blackbaud



Internal Use Only

Page
38

7/16/2010

6

Business Process Instance Status Page

A business process (BP) is started by selecting a parameter set followed by starting the BP via one of the
following options:



Manually from the business process
parameter set page



Job schedule



Queue



Windows script file



Infinity Task (Manually)

A business process instance status page or also known as the ‘status page’ is primarily used to view the
recent and historical statuses for a business process and its associ
ated parameter set. After a business
process is started manually, the task or action typically will redirect the user to the status page. Users
typically navigate to the status page from the parameter set page or from other pages or tasks, if needed.

H
ow you design your status page is up to you. Keep in mind that a typical business process instance
status page should provide the ability to:

1.

View business process instance parameter set information via a custom view data form

2.

View the recent status of
the business process instance by leveraging an out of the box view data form

3.

Re
-
Start the most recent business process instance using the parameter set provided for the instance via a
Start Process action button

4.

Edit the parameter set for the business proc
ess via an action that calls upon an edit data form

5.

Generate a windows script file that launches the business process with the current parameter set. The script
generation is kicked off via an action that calls upon out of the box CLR code.

6.

Create a job
schedule to launch the business process with the current parameter set by leveraging an out of
the box add data form

7.

Create an Infinity Task that launches the business process with the current parameter set via an action that
calls upon an out of the box a
dd data form

8.

Delete the current parameter set for the business process


Blackbaud



Internal Use Only

Page
39

7/16/2010


Figure
23

-

Status page, recent status tab, and actions

9.

View historical business process instances via a custom data list. See below.

10.

Delete status history an
d any related output tables, if they exist, by leveraging an out of the box record
operation. See below.


Figure
24

-

Status history requires a custom data list and an action to call a record operation that deletes the selected
history

11.

View and manage job schedules by leveraging out of the box data list, add data form, edit data form, and
delete record operation


Blackbaud



Internal Use Only

Page
40

7/16/2010


Figure
25

-

Job Schedules tab on the status page

Below is a UML Use Case diagram that repres
ents a typical business process instance status page. Each oval
represent a Use Case.
A
Use Case

is a UML modeling element that describes how a user of the proposed system
interacts with the system to perform a discrete unit of work. It describes and si
gnifies a single interaction over time
that has meaning for the end user (person, machine or other system). In this case the end user (actor) would
typically be a system administrator (not shown) or other role that has permission to the feature or ability

to perform
an action on the page. The use case ovals represent a feature or an action that references a feature. Green use
case ovals depict custom features while blue use case ovals depict existing features created by Blackbaud.


Figure
26
-

UML use case diagram depicting the status page


uc Business Process Instance Status Page
«View Data Form»
Inventory Business
Process View Data
Form
«View Data Form»
View BP Instance
Recent Status
«Data List»
Inventory Process
Business Process
Status List
«Data List»
View BP Job
Schedule List
«Delete Record
Operation»
Delete Status History
and Related Output
Table
«Edit Data Form»
Edit Job Schedule
«Delete Record
Operation»
Delete Job Schedule
«Business
Process»
Start Process
«Edit Data Form»
Inventory Process
Business Process
Edit Form
«CLR Action»
Generate WSF
Recent Status Tab
Summary Secti on
Hi story Tab
Job Schedul es Tab
«Add Data Form»
Create Job
Schedule
«Add Data Form»
Create Task to
Launch BP
«Delete Record
Operation»
Delete Process
Acti ons ("Tasks" Acti on Group)
Bl ackbaud Product Devel opment Feature
Custom Feature
Legend
«Add Data Form»
Add Job Schedule
Expressi on Data Forms
«Expression Data
Form»
Inventory Process
Business Process
Status View Form
Data form for edi ti ng
i nventory process
busi ness process
parameters. Edi ts the
parameter set for the
busi ness process.
Expressi on Data Form used by the
status page. Provi des data for use on
the i nventory process busi ness process
status page.
Summary Vi ew Data Form used
by the status page to vi ew BP
Parameter Set Informati on.
Returns a status l i st for the i nventory
process busi ness process. Referenced
wi thi n the page

s Hi story tab
Del etes the speci fi ed i nventory
process busi ness process.
Thi s acti on starts our
custom busi ness process
that we bui l d usi ng a
Busi nessProcessSpec
and CLR code.

Blackbaud



Internal Use Only

Page
41

7/16/2010

6.1

Expression Data Form Drives Expressions on the Status Page

A page may contain a reference to a
n

Expression
Data

Form

which is a type of
ViewDataForm
. An
Expression
Data

Form

is never actually displayed in the UI. Instead
it

acts behind the scenes to gather
important information about the displayed record and make it available to the page. This allows the page
author to write regular expressions to dynamically alter what is di
splayed on the page.

Within the
PageDefinitionSpec

xml element is an attribute named
ExpressionDataFormID
. The
ExpressionDataFormID

attribute specifies a
View Data Form

instance which can be used as a source for
expressions within a page. The expression

model similar to the one found in Microsoft Reporting Services
or in various dialects of Visual Basic.

Looking at the metadata for the completed food bank inventory business process status page below, we
can see it leverages an expression data form
named ‘
Inventory Process Business Process Status View
Form
’.


Figure
27

-

The status pages utilizes and expression view data form

We can click on the link for the expression data form (Inventory Process Business Process Status V
iew
Form) to view its metadata. See below.


Figure
28

-

Expression data form metadata page displays the form fields retrieved



Blackbaud



Internal Use Only

Page
42

7/16/2010

Three fields are provided by the data form: Name, BusinessProcessCatalogID, and ParameterSetID. The

Name form field represents the value of the USR_INVENTORYPROCESS.Name column which is the
name of the parameter set used to by this business process instance. The Name form field is used to
dynamically display the caption for page. The BusinessProcessC
atalogID form field represents the ID
attribute value from the BusinessProcessSpec used to create the food bank inventory business process.
The ParameterSetID form field represents the primary key value of the parameter set used to by this
business proc
ess instance. The ParameterSetID form field value is used within an expression to provide
the context for the Create job schedule action within the Tasks action group on the left hand side of the
page. See below.


Figure
29

-

Expression data dorm fields drive expressions on the status page

6.2

Summary View Data Form

The summary section below the caption of the status page should orient the user to the business process
instance including the any details on the parameters set. Ou
r status page uses a custom view data form to
retrieve the parameter set for a given parameter set id. For this business process, the parameter sets are
stored within a custom table named USR_InventoryProcess. See the section titled
Tables

for more
information on the entity relationship diagram supporting business processes.


Blackbaud



Internal Use Only

Page
43

7/16/2010


Figure
30

-

Summary View Data Form

6.3

Recent Status Tab

The Recent Status tab contains a single section that displays view data f
orm provided by Blackbaud
named ‘Business Process Parameter Set Recent Status View Form’. This view data form d
isplays the
most recent status information for the given business process parameter set. By passing in the parameter
set id, the view data f
orm will join the information from your
custom business process parameter set table

with the
BusinessProcessStatus

table and retrieve the relevant status infor