Try OpenEdge Now
skip to main content
BPM Events User's Guide
Persistent structures : Infopads : Creating infopads : Defining infopads
Defining infopads
Infopads are defined in the initialize section of a module. Although defined in the initialize section, they are accessible by all the rules of the module. An infopad is automatically persistent in the Business Process Server database; that is, it recovers from failure like other internal BPM Events objects (rules, events, etcetera.) The state (content) of a persistent infopad is automatically synchronized with its database image, each time the processing of an event is completed by the rule engine.
Note: You can also create or edit an infopad through the Infopad Editor in BPM Designer. Creating an infopad in the Infopad Editor automatically generates an initialize section for that infopad. For more information, see OpenEdge Getting Started: Developing BPM Applications with Developer Studio.
The following initialize section of a module is creating two persistent infopads:
initialize {
myPad1 :=
    new infopad < cell{avg_time:int, name:int}>[10][1]("myPad1");
myPad2 :=
    new persistent infopad<cell{name:string}>[10][4]("myPad2");
The infopad "myPad1" is created as a vector-like table of size 10 (only 1 column). The infopad "myPad2" is created with 10 rows and 4 columns. The internal name of an infopad—as shown between quotes—should be less than or equal to 21 characters.
The index values for infopad rows or columns always start at 1. For example, when a column dimension is specified as [4], that means the column index values range between 1 and 4.
The arguments of the action-item defineCell represent pairs <slot_name, slot_type>. The following are slot types:
*int (for integer values)
*string (for character strings)
*float (for real values)
The general declaration syntax is:
<infopad_creation_stmt> ::=
    <infoPad_name> ":=" "new" <persistent_status>
    "infopad" "<" <cell_definition> ">"
    "[" <row_size> "]" "[" <col_size> "]"
    "(" <infoPad_name> ")" ";"
<cell_definition> ::=
    "cell" "{" (<attr_name> ":" <attr_value>)* "}"
The <infoPad_name> is the local name of the infopad in the rule module where it is declared, as well as the actual ID of the infopad object, associated with the memory representation as well as the database representation.
Note: Infopads have rows and columns. Even if an infopad has a single column, then you declare and manipulate it as a two-dimensional structure.
A persistent version of the previous infopad myMonthlyTable is declared as:
initialize {
myMonthlyTable := new persistent infopad<cell{avg_resp_time:float, max_time:int, current_user:string}>[31][4]("myMonthlyTable");
myMonthlyTable.addRowTitle("Day of Request");
myMonthlyTable.addColLabels("Request Type", list {"Product Order",
"Support","Service Order", "Training" } );
The optional addition of labels to an infopad (row dimension title, column dimension title, label for each row, label for each column) is not considered as part of the infopad definition. It is supported by separate functions usable at any time after the creation (that is, inside the Initialize section, or inside a rule).
Note: Labels for rows and columns, as well as dimension titles (row & column), must all be different within the same infopad.
If you want to generate an Infopad Report using your infopad in Business Process Portal, then you must ensure that your infopad contains at least two row/columns in one dimension and one row/column in the other.