AVAIL_TASK task descriptor

The AVAIL_TASK uses the incoming data fields to determine the settlement date and the settlement day count. It does not perform any table look ups.

Table 1 shows the incoming data fields for this task.
Table 1. AVAIL_TASK incoming data fields
Field Name Required or optional Description
ibmIntBdDate Required The current processing date. It must be a valid date.
ibmIntEntryDate Required The effective entry date. It must be a valid date.
ibmIntPartner Optional The partner to whom the effective entry date is applied. It defaults to blank if no value is provided in this data field.
ibmIntPreferAvailDay Required The number of business days that the partner prefers to settle in.
ibmIntLatestAvailDay Required The minimum number of business days that the partner will settle in.
ibmIntInvalidAvailDay Optional The value to use for the settlement day count when the calculated day count is greater than the number of business days that the partner prefers to settle in. It defaults to zero if no value is provided in this data field.
ibmIntSameDay Optional Indicate if settlement should be on the same day. If this is set to no, the calculated settlement day count is adjusted so that it is not same day settlement. Valid values are:
  • Y - settlement should be on the same day
  • N - settlement should not be on the same day
The information returned to the client by this Business Rules task is shown in Table 2.
Table 2. AVAIL_TASK outgoing fields
Field Name Description
ibmIntAvailDayCount The settlement day count. It should be between the minimum number of business days the partner will settle in and the number of business days that the partner would prefer to settle in.
ibmIntAvailDate The settlement date. The date is formatted as YYYYMMDD.
ibmIntSameDay Indicates if the settlement day count is for same day settlement or not. Valid values are:
  • Y - same day settlement
  • N - not same day settlement

Task descriptor

The task descriptor for this task is shown in the following example:
<taskDescriptor name="SettlementAvailTask" type="AVAIL_TASK">
   <assignments>
      <assignment field="ibmIntPartnerId"       type="string"  value="ABC001"                    conditions="ibmIntPartnerId IS notCurrent"/>
      <assignment field="ibmIntPreferAvailDay"  type="field"   value="ibmIntPreferDistributeDay"/>
      <assignment field="ibmIntLatestAvailDay"  type="field"   value="ibmIntLatestDistributeDay"/>
      <assignment field="ibmIntSameDay"         type="string"  value="Y"                         conditions="ibmIntSameDay IS notCurrent"/>
      <assignment field="ibmIntBdDate"          type="field"   value="ibmNprBdDate"/>
      <assignment field="ibmIntEntryDate"       type="field"   value="ibmNprBdDate"/>
   </assignments>
</taskDescriptor>

Task steps

If any of the required data fields are not current, this task does not determine the settlement date or settlement day count and returns FAILURE in the results field. If all of the required fields are current, the results field is set to SUCCESS.

When all of the required input data fields are current, the task determines the settlement day count as follows:
  1. When the following input data fields are not current:
    1. ibmIntPartner is set to blank
    2. ibmIntInvalidAvailDay is set to zero (0)
  2. Initializes the settlement day count field to an invalid value. If the settlement day count is successfully calculated, the invalid value is overwritten.
    1. ibmIntAvailDayCount is set to ibmIntInvalidAvailDay
  3. Computes the number of business days between the current processing date (ibmIntBdDate) and the effective entry date (ibmIntEntryDate). The holiday table for the partner (ibmIntPartner) is used when determining this difference.
  4. Determines the value to be returned for the settlement day count, ibmIntAvailDayCount:
    1. If the number of business days between the current processing date and the effective entry date is greater than or equal to the minimum number of business days the partner will settle in (ibmIntLatestAvailDay) and less than or equal to the number of business days that the partner would prefer to settle in (ibmIntPreferAvailDay), the settlement day count returned by the task is the difference that was computed in step 3.
    2. If the number of business days between the current processing date and the effective entry date is less than the minimum number of business days the partner will settle in (ibmIntLatestAvailDay), the settlement day count returned by the task is ibmIntLatestAvailDay.
  5. Adjusts for same day settlement:
    1. If the incoming same day data field, ibmIntSameDay, is set to no and the calculated settlement day count is 0, the task changes the settlement day count to 1.
    2. If the incoming same day data field was not set and the calculated settlement day count is 0, the task sets the same day data field to yes.
    3. If the incoming same day data field was not set and the calculated settlement day count is not 0, the task sets the same day data field to no.

The settlement day count, ibmIntAvailDayCount, is used to calculate the settlement date returned in the ibmIntAvailDate data field.