Workflow Responses

The <responses> section in the workflow’s XML file provides a way to specify fields to be returned to the client applications.

The workflow response is comprised of the following parts:
  1. Fields to be returned
  2. Message on which to return the field (initialize or decision)
  3. ClientRef on which to return the field

The fields to be returned are pulled from the DecisionRequest object. They can be any internal fields, which begin with ibm, or user fields, which are pulled from the tables and added by user exits.

<responseField> is used to specify the name of the field. It also specifies the message (initialize, decision, or both if omitted) on which the field should be sent.

Some fields are returned as set by default. The normalized payment record fields (ibmNprXXXX) are returned automatically on the decision message. Only those fields which were updated by the workflow on a particular decision message are returned.

Fields listed in <responseField> are always returned regardless of whether they are set. The FieldHdr response indicates if it was set on the current pass.
  • 0 - unchanged, no node modified on this field on this pass
  • 1 - updated, could be updated with the same value
The clientRef attribute allows the response to be sent to a specific client. In the example shown here, the Business Rules Server has been directed to return:
  • a user field BankId on the initialize message
  • the internal process buffer header field on the decision message
to the Gateway Server (and only to the Gateway Server).
  <responses>
    <response clientRef="Payments Director Gateway">
      <responseFields>
        <responseField name="BankId"           message="init"/>
        <responseField name="ibmSPXProcBufHdr" message="decision"/>
      </responseFields>
    </response>
  </responses>

The normalized payment record fields are returned automatically. This can be explicitly controlled by the normalizePaymentRecord attribute.

In the example shown here, My Client has all of the normalized payment fields, except ibmNprPocket, filtered out. The TestServerFlag field indicates if the user exits should determine if the server is a test or production server and report back to the client. The client user exits interrogate the flag to prevent accidently running production work against a test server.
  <responses>
    <response clientRef="My Client" normalizePaymentRecord="false">
      <responseFields>
        <responseField name="TestServerFlag"  message="init"/>
        <responseField name="ibmNprPocket"    message="decision"/>
      </responseFields>
    </response>
    <response>
      <responseFields>
        <responseField name="BankId"          message="init"/>
        <responseField name="LargeDollarFlag" message="decision"/>
        <responseField name="ErrorCode"       message="decision"/>
      </responseFields>
    </response>
  </responses>

The clientRef attribute in the second response element is omitted because it is optional. If not specified, any client whose clientRef does not match a response will use this by default.