static void AifSendCustomerFromQuery(Args _args)
{
AxdSendContext axdSendContext = AxdSendContext::construct();
AifAction aifAction;
AifConstraint aifConstraint = new AifConstraint();
AifConstraintList aifConstraintList = new AifConstraintList();
AifOutboundProcessingService aifOutboundProcessingService = new AifOutboundProcessingService();
AifGatewaySendService aifGatewaySendService = new AifGatewaySendService();
AifActionId actionId;
AifEndpointList endpointList;
Query query;
QueryBuildDataSource queryBuildDataSource;
;
query = new Query(queryStr(AxdCustomer));
AxdSend::removeChildDs(query);
queryBuildDataSource = query.dataSourceTable(tablenum(CustTable));
queryBuildDataSource.addRange(fieldnum(CustTable, RecId));
queryBuildDataSource.rangeField(fieldnum(CustTable, RecId)).value(strfmt('5637144577..5637144587'));
aifAction = AifAction::find(AifSendService::getDefaultSendAction(
classnum(CustCustomerService),
AifSendActionType::SendByQuery));
axdSendContext.parmXMLDocPurpose(XMLDocPurpose::Original);
axdSendContext.parmSecurity(false);
aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint) ;
endPointList = AifSendService::getEligibleEndpoints(aifAction.ActionId,aifConstraintList);
AifSendService::submitFromQuery(aifAction.ActionId, endpointList, query, AifSendMode::Sync);
AifGatewaySendService.run();
AifOutboundProcessingService.run();
}
Tuesday, May 3, 2016
Send via AIF multiple records to outbound file
If you have a requirement to send more than one record per XML as an outbound, then have a look on the following job:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment