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
| 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
| 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
| If | Condition | Results | Notes |
|---|---|---|---|
| ibmIntEndorseId | Not set | SUCCESS | Without doing the lookup |
| Lookup | Fails | FAILURE | |
| Lookup | Succeeds | SUCCESS |
Initialize
- Attempts to get the value from ibmIntDefaultEndorseId. If the value is not available, set it to 0.
- Open the table and locate the default endorse record.
- If not found, issue a WorkflowException. This exception causes the initialize message to fail and the client receives an initialize error.
- Build the default endorsement string into ibmIntDefaultEndorseData.
Process
- 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.
- Does the lookup in the endorse table.
- If the record is not found, the response for the node is set to failure and it goes to step 7.
- If the record is found, it reads the payload fields into DecisionRequest and the response for the node is set to success.
- If the user exit is present, it call the preProcess routine.
- Copies the three lines into the ibmSpxPrgEndDat field.
- If the user exit is present, it calls the buildClientResponse routine.
- Returns to the workflow controller.