API Control Blocks

The following tables show the layout of the API control blocks for various requests. For the C/C++ API, they are structures. The control block fields are required in the Java™ API and are accessed through the getter and setter methods of the specific classes and interfaces.

Table 1. PDAPI_INIT_EX_REQUEST
Field Name Description Type Length Req Default
messageId Message ID. Must be a value of 1. short 2 Y  
version API version for entire message set short 2 Y 1
primaryIPHost DNS name or dotted decimal IP address of the primary Business Rules Server. Must be null terminated. char 256 N 127.0.0.1
primaryIPPort Port the primary Business Rules Server is listening on int 4 N 2005
secondayIPHost DNS name or dotted decimal IP address of the secondary Business Rules Server. Must be null terminated. char 256 N MY- MACHINE- NAME
secondaryIPPort Port the secondary Business Rules Server is listening on int 4 N 2005
decisionResponseTimer Maximum time, in milliseconds, the API waits for the decision response. Setting this to zero indicates an infinite wait. int 4 N 2000 (ms)
decisionRequestTimer Maximum time, in milliseconds, the Business Rules Server waits for inactivity between decision requests prior to stopping the connection.
0
Indicates to use the configuration parameter for the Business Rules Server
999999
Indicates an infinite wait
int 4 N 0
workflowName Name of the workflow to use char 256 N Unknown
clientReference Free form identifier of the client making the initialization request char 256 N Unknown
clientType Flag to set client type. Options are as follows:
0
General Client
1
IBM® 3890
2
SortLogic High Speed
3
SortLogic Low Speed
char 1 N 0
reqFieldsSize Overall size of the variable data of all fields int 4 Y 0
reqFieldCount Number of fields client is sending (0-N) int 4 N 0
reqPtrFields Pointer to field data array. Each field is a PD_FIELD_HDR structure pointer 4 N 0
rspFieldCount Number of fields the server is returning (0-M) int 4 N 0
rspPtrFields Pointer to field data array. Each field is a PD_FIELD_HDR structure. The data is maintained in the space of the API and is available until the next message is sent. pointer to struct 4 N 0
requestResponse REQUEST_RESPONSE block struct 204 Y  
Table 2. PD_API_DECISION_REQUEST
Field Name Description Type Length Req Default
messageId Message ID. Must be a value of 2. short 2 Y  
reqFieldsSize Overall size of the variable data of all fields int 4 Y 0
reqFieldCount Number of fields client is sending (0-N) int 4 N 0
reqPtrFields Pointer to field data array. Each field is a PD_FIELD_HDR structure. pointer 4 N 0
rspFieldCount Number of fields the server is returning (0-M) int 4 N 0
rspPtrFields Pointer to field data array. Each field is a PD_FIELD_HDR structure. The data is maintained in the space of the API and is available until the next message is sent. pointer to struct 4 N 0
requestResponse REQUEST_RESPONSE block struct 204 Y  
Table 3. PD_FIELD_HDR
Field Name Description Type Length Req Default
name Unique name identifying the field. The name is case sensitive and corresponds to the name of a field in the workflow. Names beginning with "ibm" are reserved. It can be up to 32 characters and a null terminator. char 33 Y  
dataType Numerical value defining the value of the field. Refer to Table 4 for the data types. char 1 Y 0
opId Reserved for use by IBM. short 2 Y 0
source Identifies where the payload was built or its category type. Refer to Table 5 for the source types. char 1 Y 2
response Value indicating success or failure. This only applies to fields returned from the server. Refer to Table 6 for the response defines. char 1 Y 0
length Number of bytes of the value. int 4 Y 0
ptrValue Pointer to the variable data. It should be zero if the length is zero. pointer 4 Y 0
Table 4. Data Types
Define Datatypes Signed Notes
0 NONE No unknown
1 BYTE No  
2 CHAR Yes 'String' and 'char' types
3 PACK No Seldom used
Table 5. Source Types
Define User Exit Field Pulled from Table
1 LastTask Payload comes from the last task in the workflow
2 User Exit Payload was reformulated by a user exit
3 SPX Document sorter field
4 Core Business Rules Server framework field
5 NPR Normalized Payment Record field
Table 6. Response Defines
Define Meaning Payload Type Notes
0 Miss LastTask Last task was a table and the look up failed. There is no associated payload (legacy only).
Unchanged   No node modified this field on this pass
1 Hit LastTask Last task was a table and the look up was successful (legacy only)
Updated   Could be updated with the same value
X User exit controlled UserExit The user exit can pass back any value
Table 7. PD_API_TERM REQUEST
Field Name Description Type Length Req Default
messageId Message ID. Must be a value of 3. short 2 Y  
requestResponse REQUEST_RESPONSE block struct 204 Y  
Table 8. REQUEST_RESPONSE
Field Name Description Type Length
returnCode Return code short 2
reasonCode A more detailed reason for failure code short 2
errorMessage Error message used to aid in problem determination char 200