The communication record, AE2CI:
SET_NOTIFY_FLAG receives 1 character codes indicating the result of the CI processing and its default values/meaning are:
|Y||data successfully loaded by CI|
|N||data error, rejected by CI|
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
UPDATE PS_TCI_SOURCE SET SET_NOTIFY_FLAG = 'S' ,MESSAGE_TEXT_254 = ' ' WHERE SET_NOTIFY_FLAG NOT IN ('Y', 'B', 'D') ;
%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 ;
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)
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.