Message Detail using Custom Outbound Generator
To enable MessageDetail for an Outbound Interface with a Custom Outbound Generator. We have to select Format Type as "Custom".
Create an outbound interface of format type Custom.
Provide the fully-qualified name of a class implementing one or more of NetChangeOutboundGenerator, SysIdOutboundGenerator, ModelOutboundGenerator.
In the generate() of implemented class, you can add Message Detail as illustrated in the below example:
public
void
generate(SysIdOutboundProcessingContext outboundProcessingContext) {
for
(Long sysID : outboundProcessingContext.getSysIds()) {
...
JSONArray jsonArray =
new
JSONArray();
jsonArray.put(currentRecord.getBuyingOrgName());
jsonArray.put(currentRecord.getTestItemEnterpriseName());
outboundProcessingContext.addMessageDetail(sysID.toString(),
""
,
"PTA.TestModel"
, jsonArray.toString());
}
}
In case of Format Type CSV and Report MessageDetail will be automatically generated if appropriate external referece values are set.(Please refer the section called “Enabling Message Detail”)