outbound exchange in AIF send a single record to outbound file

Hi ,

I did the all setup for outbound exchange in AIF using FileSystemAdapter .

After finishing the execution of Aifsend service function,the outbound is ready in Queue Manager.

code for this one is;

AifSendService::submitDefault( classnum(Villagegroupservice),aifEntityKey,aifConstraintList, AifSendMode::Async, axdSendContext.pack());

after this execution i run the AIF job,the outbound process is suceefully finished,even i saw the my channel report in Document history.

my code for aif job.

AifOutboundprocessingservice = new AifOutboundprocessingservice();

AifGateWaySendService = new AifGateWaySendService();

AifOutboundprocessingservice.run();

AifGateWaySendService.run();

My Table Having 1000 records but In OutBound file Shows only one record in xml format.

Thanks in advance.

Hi,

To send multiple records, you need to pack a query and use ‘sendByQuery’ value in ‘AifSendActionType’ enum like this -

query = new Query(querystr());

actionId = AifSendService::getDefaultSendAction(classnum(), AifSendActionType::SendByQuery);
aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint);
endpointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
AifSendService::submitFromQuery(actionId, endpointList, query, AifSendMode::Async);

Please let me know if you have any more questions.

Hi Harish Mohanbabu ,

As per your Guidence Outbound exchange is working fine.Inbound Exchange isnot working.

Created Local Endpoint - default to company Company - DAT Local endpoint - VillageLocal. Transport Adapters Adapter Class - AifFileSystemAdapter Name - File System Adapter Active - Yes Direction - Receive Or Send3.Channels Channel ID - Test Name - File System Channel Active - Yes Adapter - File System Adapter Direction - Outbound Parallel Processing - No Address - F:\Test Folder\ Response Channel - Channel ID - Test1 Name - File System Channel Active - Yes Adapter - File System Adapter Direction - Inbound Parallel Processing - Yes Address - F:\Test Folder 1\ Response Channel - Test. Endpoints Endpoint ID - VillageEnd Name - Item Inbound Active - Yes Propogate Errors - Yes Intercompany Organization - No Outbound channel ID - CHN003 Local endpointID - VillageLocal No Contraints Users - User group - Admin - Administrators Action Policies for this Endpoint Action ID - InventItemService.find Is default policy - No Status - Enabled External identifier override Class Name - InventItemService Logging mode - Log Original {Datapolicy - required all enabled fields

My JOB,

AifGatewayReceiveService.run();

AifInboundprocessingservice.run();

I debug the code line by line.

after execution of first line

the xml file in Inbound folder is disabled and Queue Manager shows the details as

Channel - Test1,Direction - InBound,Status - Ready,Source EndPoint -Village Local,Destination EndPoint - Village End

After execution of second Line

Queue Manager

Channel - Test1,Direction - InBound,Status - Error,Source EndPoint -Village Local,Destination EndPoint - Village End

Error message ->Endpoint villageLocal does not exist or is disabled.

In Exception form shows the details as

Exception - Error ,Module - AIF,Sub System - AifRequestProcessor-processServiceRequest,Exception MessageEndpoint villageLocal does not exist or is disabled.

please tell me where i did a mistake.Thanks in advance.

Hi,

Two possibilities -

  1. Either Endpoint is not correctly configured or
  2. Incorrect Endpoint has been specified in the file

Alternatively you can use ‘Default’ endpoint which is part of standard AIF

Hi Harish Mohanbabu,

Could u tell me the uses of INBOUND exchange using FileSystemAdapter in AIF?

Uses of service.find,service.create,service.read,service.delete?

For an INBOUND which service class is used? and what is the use of that specified service class?

Thanks in advance.