Endorse node

The endorse node requires only the ibmIntEndorseId be set before it attempts a lookup in the endorse table. If the endorse ID is not there, the lookup is not attempted. The ibmIntEndorseId field is set by an upstream PVR node table lookup.

When the endorse table record is successfully located, the character lines are copied into the ibmSpxPrgEndDat field at offsets 0, 24, and 48.

This node requires a default record be configured in the table. The endorsement string is used when a lookup in the endorse table fails or the endorse node is skipped. The customer specifies the default value by setting the ibmIntDefaultEndorseId field during the initialize process in one of the upstream user exits. An example is the workflow that selects the user exit (see Workflow selection user exit) or the workflow user exit. This allows changing the default based on the type of run (for example, prime or rehandle) or what the business logic requires.

The ibmIntDefaultEndorseId field is an optional field and, if it is not set, a value of zero is assumed.

If the default record is not present in the table, the run is not allowed to proceed and the initialize message fails.

Table record layout

The endorse node has the table record layout that is shown in the following table.
Table 1. Endorse node table record layout
Field type Field name Data type Length
Key ibmIntEndorseId byte 2
Payload ibmSetEndorseLine1 char 24
ibmSetEndorseLine2 char 24
ibmSetEndorseLine3 char 24

Fields that can change

The endorse node has the following fields that can change:
Table 2. Endorse node fields that can change
Field name Data type Length Nodes
ibmSpxPrgEndDat byte 72 Makes sense to set this field only when you are running a document sorter with a programmable endorser.
ibmIntDefaultEndorseId byte 2 Set to 0 if the client code is not in the initialize function.
ibmIntDefaultEndorseData char 72 Built from the endorse record in the initialize function.

Results

The endorse node results are shown in the following table.
Table 3. Endorse node results
If Condition Results Notes
ibmIntEndorseId Not set SUCCESS Without doing the lookup
Lookup Fails FAILURE  
Lookup Succeeds SUCCESS  

Initialize

The endorse node does the following things in sequence:
  1. Attempts to get the value from ibmIntDefaultEndorseId. If the value is not available, set it to 0.
  2. Open the table and locate the default endorse record.
  3. If not found, issue a WorkflowException. This exception causes the initialize message to fail and the client receives an initialize error.
  4. Build the default endorsement string into ibmIntDefaultEndorseData.

Process

The endorse node does the following things in sequence:
  1. Checks that the ibmIntEndorseId field was set. If the field is not present, the response for the node is set to success and it goes to step 7.
  2. Does the lookup in the endorse table.
  3. If the record is not found, the response for the node is set to failure and it goes to step 7.
  4. If the record is found, it reads the payload fields into DecisionRequest and the response for the node is set to success.
  5. If the user exit is present, it call the preProcess routine.
  6. Copies the three lines into the ibmSpxPrgEndDat field.
  7. If the user exit is present, it calls the buildClientResponse routine.
  8. Returns to the workflow controller.