The communication record, AE2CI:

Fairly basic record, which only has 2 fields the wrapper cares about.  Those fields are typically already present in this form in any recent PeopleTools environment.MESSAGE_TEXT_254 receives error/success messages intended for the end user.
SET_NOTIFY_FLAG receives 1 character codes indicating the result of the CI processing and its default values/meaning are:
Value Meaning
I initiated processing
Y data successfully loaded by CI
N data error, rejected by CI
F Technical/coding Exception

Both those field’s names can easily be overridden in the CI wrapper constructor and so can the status values the wrapper uses to communicate. This allows you to use fields and codes that correspond more closely to your requirements.

method Wrap_CI_JOB_DATA
   %Super = create AE2CI:CiWrapper(CompIntfc.CI_JOB_DATA);
   %Super.msg_fieldname = "MESSAGE254";
   %Super.notify_exception = "E";  /* E, instead of F, is how technical exceptions are notified */
end-method;

The sample data record, Record.TCI_SOURCE

It contains the notification and message fields. In this case our data is keyed by EMPLID and EFFDT. OFFICER_CD, DEPTID, MAR_STATUS are intended for JOB and PERSONAL_DATA.
ApplicationEngine.TCI_SOURCE

Main.reset
  UPDATE PS_TCI_SOURCE
  SET SET_NOTIFY_FLAG = 'S' ,MESSAGE_TEXT_254 = ' '
 WHERE SET_NOTIFY_FLAG NOT IN ('Y', 'B', 'D') ;
This is where we reset the rows for processing. As seen above, ‘Y’ means loaded already. B, which the CI wrapper does not care about, means Blocked. And D means Delete, which we are not using here.
Main.loop
%Select(EMPLID, AE2CIAET.SET_NOTIFY_FLAG)
 SELECT EMPLID
 , CASE SET_NOTIFY_FLAG WHEN 'D' THEN 'D' ELSE 'I' END
  FROM PS_TCI_SOURCE /* S stands for staged here */
 WHERE SET_NOTIFY_FLAG IN ('S','D')
  ORDER BY EMPLID ;
This loop selects any rows that have been set to S-staged by the reset and it will call the Section.load1row. Pretty standard AE processing.
load1row.updMsg
UPDATE PS_TCI_SOURCE
  SET MESSAGE_TEXT_254 = %Bind(AE2CIAET.MESSAGE_TEXT_254), SET_NOTIFY_FLAG = %Bind(AE2CIAET.SET_NOTIFY_FLAG)
 WHERE EMPLID = %Bind(EMPLID)
This step is very important for loop management and user feedback. Coming after load1row.callCI, which calls the wrapper, its job is to take the notification and message fields in Record.AE2CIAET and put them into the data record for that EMPLID. At this point, the CIs response codes have NOT been written to the database yet, since there was always the possibility of a rollback.
For reference a Test/Development data entry screen

It’s not very pretty, because it is really a test harness for this code rather than something intended for an end user. But it allows the user to visualize run results, correct data entry and block/re-run data on a row by row basis. This basically displays and allows partial editing of the data record, Record.TCI_SOURCE.

Keeping it simple.