Import CSV File: AIF method – Part 3Continue reading
So far we have created and deployed Service and created the transformation, we are almost there, now we need to put this together and create inbound port.
First go to the System administration -> Setup -> Services and Application Integration Framework -> Inbound ports:
Click on New and create new inbound port, lets name it for example AttributeTableServices.
First we need to set Adapter to File system adapter and specify the URL which in our case is the folder to where you will drop your CSV files. Then click the Configure button and select Admin:
Then in Service contract customizations select Service operations and find AttributeTableConfigService.create in Remaining service operations and select it by clicking ‘<‘:
Next step is to check the Transform all request checkbox and load the dll for our transform (follow the red arrows J).
Remember that every time we modify that dll we need to change its version in Visual Studio:
Click button Activate:
First drop the CSV file into the URI directory. After execution it will disappear because it will be consumed by the service, so every time we want to test the execution we need to add a new file into the folder. Approach: Execute this following job:
static void AifProcessor(Args _args)
AifGatewayReceiveService agrs = new AifGatewayReceiveService( );
AifInboundProcessingService aip = new AifInboundProcessingService( );
AifGatewaySendService agss = new AifFatewaySendService( );
AifOutboundProcessingService aop = new AifOutboundProcessingService( );
Check AttributeTable, you should see changes!
Approach: Create batch job:
System administration -> Inquiries -> Batch jobs -> Batch jobs
- Add new batch job (Ctrl + N).
- Click on View tasks and add new tasks (Ctrl + N) in the given above order.
- Change status to waiting and wait for the execution.
When status changes to Ended check AttributeTable, you should see changes!